From 923465274e2d4ebee64af6ec4c811c2389cb534c Mon Sep 17 00:00:00 2001 From: sakuya <81883387@qq.com> Date: Fri, 20 May 2022 22:45:48 +0800 Subject: [PATCH] =?UTF-8?q?ADD=20scDataCard=20=E4=BB=A3=E7=A0=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/scCodeEditor/index.vue | 115 ++++++++++++++++++++++++++ src/views/vab/codeeditor.vue | 88 ++++++++++++++++++++ vue.config.js | 4 + 4 files changed, 208 insertions(+) create mode 100644 src/components/scCodeEditor/index.vue create mode 100644 src/views/vab/codeeditor.vue 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[\\/]/ } } }