Tencent / cherry-markdown

✨ A Markdown Editor
Other
3.53k stars 411 forks source link

[Bug Report] 光标位置报错 #747

Closed oneMeterSunshine-y closed 5 months ago

oneMeterSunshine-y commented 6 months ago

Prerequisites

Describe the Bug

在vue3中,使用Markdown的写法,写的文档,有引入图片的情况下,点击切换光标位置的时候,报错 Uncaught TypeError: Cannot read properties of undefined (reading 'length') at If (cherry-markdown-7f1d788b.js:6:9586) at Dd (cherry-markdown-7f1d788b.js:6:10306) at b6 (cherry-markdown-7f1d788b.js:6:16147) at xm (cherry-markdown-7f1d788b.js:6:15636) at Yb (cherry-markdown-7f1d788b.js:6:19337) at gh.F9 (cherry-markdown-7f1d788b.js:13:3290) at HTMLDivElement. (cherry-markdown-7f1d788b.js:11:10329)

Reproduction Steps

No response

System Information

System:
    OS: Windows 10 10.0.19043
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
    Memory: 962.84 MB / 15.89 GB
  Binaries:
    Node: 16.19.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.9 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 123.0.6312.107
    Edge: Spartan (44.19041.1266.0), Chromium (123.0.2420.97)
    Internet Explorer: 11.0.19041.1566

    "vue": "^3.3.4",
    "vue-router": "^4.2.4",
    "vuex": "^4.1.0",
    "splitpanes": "^3.1.5",
    "cherry-markdown": "^0.8.40"

Contributing

None

humyfred commented 6 months ago

你好,cherry-markdown用的是什么版本呢?另外你可看https://github.com/Tencent/cherry-markdown/issues/401#issue-1608099939 此处的issue能否帮助到你

oneMeterSunshine-y commented 5 months ago

你好,cherry-markdown 用的是什么版本呢?另外你可以看#401(评论)这里的问题能否对你有帮助

厉害,解决了,就是vue3 ref代理造成的问题