diff --git a/package.json b/package.json index cd4db6f7..e24cf991 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@element-plus/icons-vue": "1.1.4", "@tinymce/tinymce-vue": "5.0.0", "axios": "0.27.2", + "codemirror": "5.65.3", "core-js": "3.22.5", "cropperjs": "1.5.12", "crypto-js": "4.1.1", diff --git a/src/components/scCodeEditor/index.vue b/src/components/scCodeEditor/index.vue new file mode 100644 index 00000000..4a9c29e6 --- /dev/null +++ b/src/components/scCodeEditor/index.vue @@ -0,0 +1,115 @@ + + + + + + + + + + + diff --git a/src/views/vab/codeeditor.vue b/src/views/vab/codeeditor.vue new file mode 100644 index 00000000..aa4dd3f7 --- /dev/null +++ b/src/views/vab/codeeditor.vue @@ -0,0 +1,88 @@ + + + + + + + + + 获取v-model + getValue() + setValue() + + + + + + + + + + + + + + + + + + + + + diff --git a/vue.config.js b/vue.config.js index 5714e369..0160d4f1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -61,6 +61,10 @@ module.exports = { xgplayer: { name: "xgplayer", test: /[\\/]node_modules[\\/]xgplayer.*[\\/]/ + }, + codemirror: { + name: "codemirror", + test: /[\\/]node_modules[\\/]codemirror[\\/]/ } } }