Open ZeronoFreya opened 1 year ago
同样遇到该问题
I had the same issue when I tried to import VMdEditor locally.
What worked for me was to move the configuration to an external file ~/md-editor.js
:
import '@kangc/v-md-editor/lib/style/base-editor.css'
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index'
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css'
import VMdEditor, { xss } from '@kangc/v-md-editor'
VMdEditor.use(createEmojiPlugin())
export default VMdEditor
Then you can import VMdEditor from '~/md-editor'
without any errors because the plugins will only be registered once.
我有个更好的办法,把下面这三行干掉 import createTipPlugin from '@kangc/v-md-editor/lib/plugins/tip/index' import '@kangc/v-md-editor/lib/plugins/tip/tip.css'
TextareaEditor.use(createTipPlugin())
然后,直接在toolbar引入tip,就行了,这个错误应该是重复注册了
vue3 vite2
当组件使用v-if动态显示时出现
这个怎么解决呢?