Skip to content

Commit

Permalink
Feat: input disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Nov 27, 2023
1 parent 0e3c66f commit 47c6af8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -26,7 +27,7 @@ export const useSettings = () => {
};

const defaultDatabaseSettings: Map<string, settingType> = new Map([
["database_version", { value: "", name: "数据库版本" }]
["database_version", { value: "", name: "数据库版本", disabled: true }]
]);

const defaultRoomSettings: Map<string, settingType> = new Map([
Expand Down
1 change: 1 addition & 0 deletions src/views/admin/settings/SiteSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<template #append v-if="setting[1].append">{{ setting[1].append }}</template>
</el-input>
Expand Down

0 comments on commit 47c6af8

Please sign in to comment.