imzbf / md-editor-v3

Markdown editor for vue3, developed in jsx and typescript, dark theme、beautify content by prettier、render articles directly、paste or clip the picture and upload it...
https://imzbf.github.io/md-editor-v3
MIT License
1.51k stars 145 forks source link

MdCatalog组件目录点击没有反应 #623

Closed linyuanjie closed 1 month ago

linyuanjie commented 1 month ago

Describe the issue

代码示例,麻烦帮忙看一下,谢谢 image

Procedure version

"md-editor-v3": "^4.15.2",

Reproduction link

No response

linyuanjie commented 1 month ago

版本更新到最近版本"md-editor-v3": "^4.18.0", 点击目录也是没有反应;

linyuanjie commented 1 month ago

滑动dom元素 image

imzbf commented 1 month ago

editorId就是基础id,这样设置冲突了,移除id属性

linyuanjie commented 1 month ago

移除id属性还是不行,我翻看了所有的MdCatalog issue,理解了不滚动还是scrollElement的绑定不对,每个人写的滚动条绑定可能会不一样,所以才会出现没有反应,我的这个这样给赋值之后就可以了,const scrollElement = ref('.h-full .n-scrollbar .n-scrollbar-container') 感谢楼主。