Skip to content

Commit d56227c

Browse files
committed
feat(settings): 改进配置切换交互 | Improve configuration switching interaction.
1 parent 886598a commit d56227c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 更改日志 | CHANGE LOG
22

33
- [#7](https://github.com/Zuoqiu-Yingyi/utools-siyuan/issues/7) 支持在 uTools 窗口中打开搜索结果 | Support opening search results in uTools window.
4+
- 改进配置切换交互 | Improve configuration switching interaction.
45

56
## v0.1.2/2023-05-14
67

src/components/Settings.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const theme = inject("theme") as InstanceType<typeof Theme>; // 用户配置
131131
const configs = inject("configs") as UnwrapNestedRefs<Map<string, IConfig>>; // 用户配置列表
132132
const config_default = inject("config_default") as IConfig; // 用户默认配置
133133
const options = computed(() => [...configs.keys()]);
134-
const model_value = ref(""); // 选择框值
134+
const model_value = ref(config.server.url); // 选择框值
135135
136136
function saveOnClick(): void {
137137
configs.set(config.server.url, copy(config));
@@ -145,7 +145,7 @@ function deleteOnClick(): void {
145145
146146
function resetOnClick(): void {
147147
merge(config, config_default);
148-
model_value.value = "";
148+
model_value.value = config.server.url;
149149
}
150150
151151
function onChange(key: string | number | Record<string, unknown> | (string | number | Record<string, unknown>)[]): void {

0 commit comments

Comments
 (0)