From 47c6af8d906c6951e95a303b35ff366ef4caa82d Mon Sep 17 00:00:00 2001 From: Lazy <2211717435@qq.com> Date: Mon, 27 Nov 2023 22:55:28 +0800 Subject: [PATCH] Feat: input disabled --- src/hooks/useSettings.ts | 3 ++- src/views/admin/settings/SiteSetting.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useSettings.ts b/src/hooks/useSettings.ts index 7a92cb1..8245c7d 100644 --- a/src/hooks/useSettings.ts +++ b/src/hooks/useSettings.ts @@ -6,6 +6,7 @@ export interface settingType { placeholder?: string; comment?: string; name?: string; + disabled?: boolean; } export type settingGroupName = "all" | "database" | "room" | "proxy" | "rtmp" | "user" | "oauth2"; @@ -26,7 +27,7 @@ export const useSettings = () => { }; const defaultDatabaseSettings: Map = new Map([ - ["database_version", { value: "", name: "数据库版本" }] + ["database_version", { value: "", name: "数据库版本", disabled: true }] ]); const defaultRoomSettings: Map = new Map([ diff --git a/src/views/admin/settings/SiteSetting.vue b/src/views/admin/settings/SiteSetting.vue index 1e48aad..5fcb385 100644 --- a/src/views/admin/settings/SiteSetting.vue +++ b/src/views/admin/settings/SiteSetting.vue @@ -108,6 +108,7 @@ onMounted(async () => { @change="updateSet(setting[0], setting[1].value)" v-model.trim.lazy="setting[1].value" :placeholder="setting[1].placeholder" + :disabled="setting[1].disabled" >