yangzongzhuan / RuoYi-Vue3

:tada: (RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue3 & Vite、Element Plus 的前后端分离权限管理系统
http://ruoyi.vip
MIT License
4.82k stars 1.96k forks source link

进入页面表单时富文本框TypeError: Cannot read properties of null (reading 'slice') #185

Closed 1759176121 closed 11 months ago

1759176121 commented 1 year ago

1.错误提示 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'slice') at maybeClone (vue-quill.esm-bundler.js:208:54) at setContents (vue-quill.esm-bundler.js:297:29) at initialize (vue-quill.esm-bundler.js:146:13) at vue-quill.esm-bundler.js:118:13 2.问题场景 a.进入页面先点击修改按钮,富文本框赋值正常,再点击新增按钮,富文本框数据没有被清空,还是上次修改时的数据 b.刷新页面,先点击新增按钮,控制台报上述错误提示,同时当前页面按钮点击全部失效报上述错误

L-2945841899 commented 1 year ago

问题解决了嘛?我也遇到了这个问题

1759176121 commented 1 year ago

我的解决方案是:找到添加按钮,重新给富文本框赋空字符串,data.form.content = ""; /* 新增按钮操作 / function handleAdd() { reset(); data.form.content = ""; open.value = true; title.value = "添加商品信息"; }

minliuhua commented 1 year ago

editor富文本组件,判空导致的,正确判空就可以了

image

yangzongzhuan commented 11 months ago

前后端分离版本问题请到这里提问 https://gitee.com/y_project/RuoYi-Vue/issues 需要提供出能复现问题详细步骤。