Skip to content

Commit 54c9ee7

Browse files
committed
closest(".b3-label") 改为 closest(".config-item")
1 parent 6f0fa54 commit 54c9ee7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/config/ai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function buildAiSections(): SettingSection[] {
7272
return;
7373
}
7474
const toggleVersionWrap = () => {
75-
root.querySelector(`#${CSS.escape("ai.openAI.apiVersion")}`)?.closest(".b3-label")?.classList.toggle("fn__none", providerSelect.value !== "Azure");
75+
root.querySelector(`#${CSS.escape("ai.openAI.apiVersion")}`)?.closest(".config-item")?.classList.toggle("fn__none", providerSelect.value !== "Azure");
7676
};
7777
providerSelect.addEventListener("change", toggleVersionWrap);
7878
toggleVersionWrap();

app/src/config/appearance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export function buildAppearanceSections(): SettingSection[] {
370370
value: window.siyuan.config.editor.floatWindowMode,
371371
bind: (root) => {
372372
const fwModeEl = root.querySelector<HTMLSelectElement>(`#${CSS.escape("editor.floatWindowMode")}`);
373-
const delayRow = root.querySelector(`#${CSS.escape("editor.floatWindowDelay")}`)?.closest(".b3-label");
373+
const delayRow = root.querySelector(`#${CSS.escape("editor.floatWindowDelay")}`)?.closest(".config-item");
374374
if (!fwModeEl || !delayRow) {
375375
return;
376376
}

app/src/config/editor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function buildEditorSections(): SettingSection[] {
110110
return;
111111
}
112112
const toggleSpellcheckLanguagesWrap = () => {
113-
root.querySelector(`#${CSS.escape("editor.spellcheckLanguages")}`)?.closest(".b3-label")?.classList.toggle("fn__none", !spellcheckSwitch.checked);
113+
root.querySelector(`#${CSS.escape("editor.spellcheckLanguages")}`)?.closest(".config-item")?.classList.toggle("fn__none", !spellcheckSwitch.checked);
114114
};
115115
spellcheckSwitch.addEventListener("change", toggleSpellcheckLanguagesWrap);
116116
toggleSpellcheckLanguagesWrap();
@@ -124,7 +124,7 @@ export function buildEditorSections(): SettingSection[] {
124124
window.siyuan.languages.spellcheck,
125125
window.siyuan.languages.spellcheckTip2,
126126
],
127-
html: () => `<div class="fn__flex b3-label fn__none">
127+
html: () => `<div class="fn__flex b3-label config-item fn__none">
128128
<div class="b3-chips" id="editor.spellcheckLanguages"></div>
129129
</div>`,
130130
bind: async (root) => {

0 commit comments

Comments
 (0)