refactor(编辑器): 去掉 vue-codemirror,代码编辑器、协作编辑器、教程编辑器改用自己的薄外壳
三个编辑器只用到它的 v-model、extensions、只读、缩进、占位文字、尺寸和 ready, shared/components/CodeMirror.vue 照它的做法写了这几样,功能和手感不变: - 它默认带的 basicSetup(行号、撤销、折叠、搜索、括号……)照样带上 - 各项配置的先后顺序和它一致;外部改代码仍是一次不带 userEvent 的 changes, 提交时的编辑过程统计不受影响 - @codemirror/commands 现在直接 import,显式声明进依赖 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6216e1cf22
commit
d2b8a1ce4a
7 files changed
+133
-24
No files matched your search
@@ -12,6 +12,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.20.3",
|
||||
"@codemirror/commands": "^6.10.4",
|
||||
"@codemirror/lang-cpp": "^6.0.3",
|
||||
"@codemirror/lang-markdown": "^6.5.2",
|
||||
"@codemirror/lang-python": "^6.2.1",
|
||||
@@ -47,7 +48,6 @@
|
||||
"pinyin-pro": "^3.29.5",
|
||||
"vue": "^3.5.43",
|
||||
"vue-chartjs": "^5.3.4",
|
||||
"vue-codemirror": "^6.1.1",
|
||||
"vue-router": "^5.4.0",
|
||||
"y-codemirror.next": "^0.3.6",
|
||||
"y-protocols": "1.0.7",
|
||||
|
||||
Reference in new issue
Block a user