Skip to content

Commit 59537f2

Browse files
committed
fix: readOnly 动态配置异常
1 parent cd657f6 commit 59537f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wangeditor5-for-vue2",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"description": "支持动态配置的 wangEditor5 for vue2 组件",
55
"author": "翠林 <[email protected]>",
66
"license": "MIT",

src/core/editable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,13 @@ export const WeEditable = Vue.extend<unknown, unknown, WeEditableComponentComput
282282

283283
this.$watch('option.config.readOnly', (nv) => {
284284
if (instance) {
285-
nv ? instance.enable() : instance.disable()
285+
nv ? instance.disable() : instance.enable()
286286
}
287287
})
288288

289289
this.$watch('option.config.placeholder', (nv) => {
290290
const target = (this.$refs.elem as HTMLDivElement | undefined)?.querySelector('.w-e-text-placeholder')
291-
if (target instanceof HTMLElement) target.innerText = nv ?? ''
291+
if (target instanceof HTMLElement) target.innerHTML = nv ?? ''
292292
})
293293

294294
this.$watch('option.config.scroll', (nv) => {

0 commit comments

Comments
 (0)