code-farmer-i / vue-markdown-editor

A markdown editor built on Vue
https://code-farmer-i.github.io/vue-markdown-editor/
MIT License
1.1k stars 109 forks source link

vue3+elementplus+vite3+ts出现bug #209

Open ttkican opened 1 year ago

ttkican commented 1 year ago

Uncaught TypeError: normalizeKey is not a function at createBaseVNode (runtime-core.esm-bundler.js:6731:23) at index.js:24:33 createBaseVNode @ runtime-core.esm-bundler.js:6731

puguojingm commented 1 year ago

我也出现

puguojingm commented 1 year ago

解决了 是因为 main.ts中import vue的顺序放到了 import elememt-plus 后面 调整一下顺序 `import './assets/main.css'

import { createApp } from 'vue' import { createPinia } from 'pinia'

import App from './App.vue' import router from './router'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import VMdPreview from '@kangc/v-md-editor/lib/preview'; import '@kangc/v-md-editor/lib/style/preview.css'; import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'; import '@kangc/v-md-editor/lib/theme/style/github.css';

// highlightjs // import hljs from 'highlight.js';

VMdPreview.use(githubTheme);

const app = createApp(App) app.use(VMdPreview); app.use(createPinia()) app.use(router)

`