chore: format code style and update linting configuration

This commit is contained in:
Megghy
2025-10-02 10:38:23 +08:00
parent 6fd046adcd
commit 758549d29d
253 changed files with 16258 additions and 15833 deletions

View File

@@ -1,22 +1,14 @@
<template>
<div
ref="editorContainer"
:style="`height: ${height}px;`"
/>
</template>
<script setup lang="ts">
import { editor } from 'monaco-editor'; // 全部导入
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
const value = defineModel<string>('value')
import { editor } from 'monaco-editor' // 全部导入
import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
const { language, height = 400 } = defineProps<{
language: string
height?: number
}>()
const value = defineModel<string>('value')
const editorContainer = ref<HTMLElement>()
let editorInstance: editor.IStandaloneCodeEditor | null = null
@@ -25,12 +17,12 @@ onMounted(() => {
editorInstance = editor.create(editorContainer.value, {
value: value.value,
language: language,
language,
minimap: {
enabled: true
enabled: true,
},
colorDecorators: true,
automaticLayout: true
automaticLayout: true,
})
editorInstance.onDidChangeModelContent(() => {
@@ -64,4 +56,11 @@ watch(() => language, (newLang) => {
}
}
})
</script>
</script>
<template>
<div
ref="editorContainer"
:style="`height: ${height}px;`"
/>
</template>