Open liux-pro opened 2 years ago
element-ui太坑了,现在也没人维护,还是不要用了,换vuetify
想不到vuetify也有坑 默认加载图标会从cdn加载,即使是生产环境 默认情况下,如果没有外网环境,图标都显示不出来,下面是说明以及解决方法 https://vuetifyjs.com/en/features/icon-fonts/#material-design-icons https://stackoverflow.com/questions/60983551/how-to-remove-google-font-roboto-from-head-in-nuxt-vuetify
添加依赖 yarn add @mdi/font -D
nuxt.config.js里添加
{
css: ['@mdi/font/css/materialdesignicons.css'],
vuetify: {
defaultAssets: false //阻止自动从cdn拉资源
}
}
集成milkdown https://milkdown.dev/#/zh-hans/vue2
yarn add @milkdown/core @milkdown/preset-commonmark @milkdown/theme-nord @milkdown/plugin-listener
milkdown api设计让我看不懂,算了不用了
集成tui.editor https://github.com/nhn/tui.editor
vue开箱即用 https://github.com/nhn/tui.editor/tree/master/apps/vue-editor
坑1:深色模式需要额外引用css,文档里没说
集成vditor https://github.com/Vanessa219/vditor
拖了这么久,搞个博客吧