增加前端格式检查配置

This commit is contained in:
yml2213
2026-06-08 06:40:33 +08:00
parent 79ea3a476c
commit 500f511185
150 changed files with 7254 additions and 4013 deletions
@@ -21,7 +21,7 @@ const description = ref('')
watch(
() => props.modelValue,
(val) => {
val => {
if (val) {
value.value = props.config.value || ''
description.value = props.config.description || ''
@@ -38,7 +38,7 @@ const isStructuredConfig = computed(() => {
const selectOptions = computed<SystemConfigOption[] | null>(() => {
const options = getSystemConfigSelectOptions(props.config.key)
if (!options) return null
if (!value.value || options.some((item) => item.value === value.value)) {
if (!value.value || options.some(item => item.value === value.value)) {
return options
}
return [{ label: `当前值:${value.value}`, value: value.value }, ...options]
@@ -78,7 +78,9 @@ function readError(error: unknown, fallback: string) {
@update:model-value="emit('update:modelValue', $event)"
>
<div class="dialog-body">
<p class="config-key-label"><strong>{{ config.key }}</strong></p>
<p class="config-key-label">
<strong>{{ config.key }}</strong>
</p>
<el-form-item v-if="isStructuredConfig" label="配置值 (JSON)" class="full-control">
<el-input v-model="value" type="textarea" :rows="12" placeholder="配置值 JSON" />