cherry-markdown
cherry-markdown copied to clipboard
[Bug Report] VUE下控制台报错 Uncaught (in promise)
Prerequisites
-
[ ] There isn't an existing issue that reports the same bug to avoid duplicates.
-
[ ] The provided information offers a minimal reproducible example of the bug, (Why create a Minimal).
-
[ ] For Q&A, please open a GitHub Discussion instead.
Version
0.10.0
Reproduction Link
No response
Describe the Bug
在VUE项目中使用报错
<template>
<div id="markdown-container" class="!h-[300px]" />
</template>
<script setup lang="ts">
import 'cherry-markdown/dist/cherry-markdown.css';
import Cherry from 'cherry-markdown';
import { onMounted } from 'vue';
import echarts from 'echarts';
onMounted(() => {
new Cherry({
id: 'markdown-container',
value: '# welcome to cherry editor!',
externals: {
echarts
},
});
});
</script>
System Information
"dependencies": {
"@nuxt/ui": "^4.0.0-alpha.2",
"cherry-markdown": "^0.10.0",
"echarts": "^4.6.0",
"mermaid": "^9.4.3",
"vue": "^3.5.21",
"vue-router": "^4.5.1"
}
Contributing
None
抱歉,从截图看不太出来是哪里的问题,不过可以安装 npm i [email protected] 这个版本再试试哈