Shimada666 / v-code-diff

A vue code diff display plugin, support Vue2 / Vue3
https://shimada666.github.io/v-code-diff/
MIT License
406 stars 67 forks source link

Error in render: "TypeError: Cannot read properties of undefined (reading 'isUnifiedViewer') #126

Open wenlongchen1247258316 opened 9 months ago

wenlongchen1247258316 commented 9 months ago

装的版本是1.9.0

main.js 里加了两行 import CodeDiff from 'v-code-diff' Vue.use(CodeDiff) 页面里加的如下代码 <CodeDiff :old-string="12345" :new-string="3456" output-format="side-by-side">

运行的时候报错: vue.esm.js:629 [Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'isUnifiedViewer')" found in --->

at packages/dialog/src/component.vue at src/views/demos/ApiDemoDiffTask.vue at packages/main/src/main.vue at packages/container/src/main.vue... (1 recursive calls) at src/App.vue vue.esm.js:1905 TypeError: Cannot read properties of undefined (reading 'isUnifiedViewer') at Proxy.mr (index.es.js:5125:185) at Vue._render (vue.esm.js:3577:22) at VueComponent.updateComponent (vue.esm.js:4089:21) at Watcher.get (vue.esm.js:4503:25) at new Watcher (vue.esm.js:4492:12) at mountComponent (vue.esm.js:4096:3) at Vue.$mount (vue.esm.js:9106:10) at Vue.$mount (vue.esm.js:12021:16) at init (vue.esm.js:3145:13) at createComponent (vue.esm.js:6032:9)
wenlongchen1247258316 commented 9 months ago

vue版本是2.9.6 麻烦帮忙看一下,是哪里出问题了呢

Shimada666 commented 9 months ago

vue 没有 2.9.6 的版本,你检查下版本号。 另外错误是怎么触发的呢?可否提供下引用代码