mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-22 06:49:57 +08:00
refactor(editor): cr修改
This commit is contained in:
parent
ff3adbb1d0
commit
5de3eeda71
@ -35,14 +35,14 @@
|
||||
"vue"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tmagic/schema": "1.1.6",
|
||||
"events": "^3.3.0"
|
||||
"@tmagic/schema": "1.1.5",
|
||||
"events": "^3.3.0",
|
||||
"lodash-es": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/events": "^3.0.0",
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/node": "^15.12.4",
|
||||
"lodash-es": "^4.17.21",
|
||||
"rimraf": "^3.0.2",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^3.1.3"
|
||||
|
@ -83,11 +83,12 @@ import { forIn, isEmpty } from 'lodash-es';
|
||||
|
||||
import type { CodeBlockContent, CodeDslList, ListState, Services } from '../../../type';
|
||||
import { EditorMode } from '../../../type';
|
||||
import MagicCodeEditor from '../../CodeEditor.vue';
|
||||
import Layout from '../../Layout.vue';
|
||||
|
||||
const services = inject<Services>('services');
|
||||
|
||||
const codeEditor = ref<any | null>(null);
|
||||
const codeEditor = ref<InstanceType<typeof MagicCodeEditor>>();
|
||||
const left = ref(200);
|
||||
const currentTitle = ref('');
|
||||
// 编辑器当前需展示的代码块内容
|
||||
@ -108,7 +109,7 @@ const editable = computed(() => services?.codeBlockService.getEditStatus());
|
||||
const selectedIds = computed(() => services?.codeBlockService.getCombineIds() || []);
|
||||
|
||||
watchEffect(async () => {
|
||||
codeConfig.value = (await services?.codeBlockService.getCodeContentById(id.value)) ?? null;
|
||||
codeConfig.value = (await services?.codeBlockService.getCodeContentById(id.value)) || null;
|
||||
});
|
||||
|
||||
watchEffect(async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user