Commit 6c08dae92107def0eea4717368d89de21b44a2ce

Authored by 无木
1 parent 02eabe1f

fix: build error for `CodeEditor`

src/components/CodeEditor/src/CodeEditor.vue
@@ -8,18 +8,11 @@ @@ -8,18 +8,11 @@
8 /> 8 />
9 </div> 9 </div>
10 </template> 10 </template>
11 -  
12 -<script lang="ts">  
13 - export const MODE = {  
14 - JSON: 'application/json',  
15 - html: 'htmlmixed',  
16 - js: 'javascript',  
17 - };  
18 -</script>  
19 <script lang="ts" setup> 11 <script lang="ts" setup>
20 import { computed } from 'vue'; 12 import { computed } from 'vue';
21 import CodeMirrorEditor from './codemirror/CodeMirror.vue'; 13 import CodeMirrorEditor from './codemirror/CodeMirror.vue';
22 import { isString } from '/@/utils/is'; 14 import { isString } from '/@/utils/is';
  15 + import type { MODE } from './typing';
23 16
24 const props = defineProps({ 17 const props = defineProps({
25 value: { type: [Object, String] as PropType<Record<string, any> | string> }, 18 value: { type: [Object, String] as PropType<Record<string, any> | string> },
src/components/CodeEditor/src/typing.ts 0 → 100644
  1 +export const MODE = {
  2 + JSON: 'application/json',
  3 + html: 'htmlmixed',
  4 + js: 'javascript',
  5 +};