/my-playground

my personal project include sql executor and vue-playground, powered by monaco-editor

Primary LanguageTypeScript

vue-project

This template should help get you started developing with Vue 3 in Vite.

踩的一些坑

el-menu组件

element-plusel-menu组件如果设置为router模式,组件默认的background-color, active-text-color会失效

解决办法就是设置组件属性:default-active="route.path"

不要把monaco的editor对象ref,否则监听Editor.onDidChangeModelContent()页面会卡死

type IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;
// wrong
const editor = ref<IStandaloneCodeEditor>()
// right
const Editor: IStandaloneCodeEditor
// ...then init

参考文章

在vue中使用monaco-editor elementPlus-issue

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint