@@ -25,7 +25,7 @@ const props = withDefaults(
25
25
}>(),
26
26
{
27
27
readonly: false ,
28
- }
28
+ },
29
29
)
30
30
31
31
const emit = defineEmits <{
@@ -43,7 +43,7 @@ const lang = computed(() => (props.mode === 'css' ? 'css' : 'javascript'))
43
43
44
44
const replTheme = inject <Ref <' dark' | ' light' >>(' theme' )!
45
45
onMounted (async () => {
46
- const theme = await import (' ./highlight' ).then (r => r .registerHighlighter ())
46
+ const theme = await import (' ./highlight' ).then (( r ) => r .registerHighlighter ())
47
47
ready .value = true
48
48
await nextTick ()
49
49
@@ -76,7 +76,7 @@ onMounted(async () => {
76
76
t .getTokenStyleMetadata = (
77
77
type : string ,
78
78
modifiers : string [],
79
- _language : string
79
+ _language : string ,
80
80
) => {
81
81
const _readonly = modifiers .includes (' readonly' )
82
82
switch (type ) {
@@ -99,11 +99,11 @@ onMounted(async () => {
99
99
if (editorInstance .getValue () === value ) return
100
100
editorInstance .setValue (value || ' ' )
101
101
},
102
- { immediate: true }
102
+ { immediate: true },
103
103
)
104
104
105
105
watch (lang , (lang ) =>
106
- monaco .editor .setModelLanguage (editorInstance .getModel ()! , lang )
106
+ monaco .editor .setModelLanguage (editorInstance .getModel ()! , lang ),
107
107
)
108
108
109
109
if (! props .readonly ) {
@@ -116,7 +116,7 @@ onMounted(async () => {
116
116
const model = getOrCreateModel (
117
117
monaco .Uri .parse (` file:///${props .filename } ` ),
118
118
file .language ,
119
- file .code
119
+ file .code ,
120
120
)
121
121
122
122
const oldFile = oldFilename ? store .state .files [oldFilename ] : null
@@ -131,7 +131,7 @@ onMounted(async () => {
131
131
editorInstance .focus ()
132
132
}
133
133
},
134
- { immediate: true }
134
+ { immediate: true },
135
135
)
136
136
}
137
137
0 commit comments