mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 16:41:07 +08:00
This commit is contained in:
parent
41cdf8b660
commit
4cc06c4824
@ -347,6 +347,22 @@ const initSearchEvent = (app: App, element: Element, config: Config.IUILayoutTab
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (target.parentElement.classList.contains("b3-chip--current")) {
|
||||||
|
updateConfig(element, {
|
||||||
|
removed: true,
|
||||||
|
sort: 0,
|
||||||
|
group: 0,
|
||||||
|
hasReplace: false,
|
||||||
|
method: 0,
|
||||||
|
hPath: "",
|
||||||
|
idPath: [],
|
||||||
|
k: "",
|
||||||
|
r: "",
|
||||||
|
page: 1,
|
||||||
|
types: getDefaultType(),
|
||||||
|
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||||
|
}, config);
|
||||||
|
}
|
||||||
if (target.parentElement.parentElement.childElementCount === 1) {
|
if (target.parentElement.parentElement.childElementCount === 1) {
|
||||||
target.parentElement.parentElement.classList.add("fn__none");
|
target.parentElement.parentElement.classList.add("fn__none");
|
||||||
}
|
}
|
||||||
|
@ -634,16 +634,11 @@ export const initCriteriaMenu = (element: HTMLElement, data: Config.IUILayoutTab
|
|||||||
html += `<div data-type="set-criteria" class="${isSame ? "b3-chip--current " : ""}b3-chip b3-chip--middle b3-chip--pointer b3-chip--${["secondary", "primary", "info", "success", "warning", "error", ""][index % 7]}">${escapeHtml(item.name)}<svg class="b3-chip__close" data-type="remove-criteria"><use xlink:href="#iconCloseRound"></use></svg></div>`;
|
html += `<div data-type="set-criteria" class="${isSame ? "b3-chip--current " : ""}b3-chip b3-chip--middle b3-chip--pointer b3-chip--${["secondary", "primary", "info", "success", "warning", "error", ""][index % 7]}">${escapeHtml(item.name)}<svg class="b3-chip__close" data-type="remove-criteria"><use xlink:href="#iconCloseRound"></use></svg></div>`;
|
||||||
});
|
});
|
||||||
/// #if MOBILE
|
/// #if MOBILE
|
||||||
element.innerHTML = `<div class="b3-chips">
|
element.innerHTML = `<div class="b3-chips${html?"":" fn__none"}">
|
||||||
${html}
|
${html}
|
||||||
</div>`;
|
</div>`;
|
||||||
if (html === "") {
|
|
||||||
element.classList.add("fn__none");
|
|
||||||
} else {
|
|
||||||
element.classList.remove("fn__none");
|
|
||||||
}
|
|
||||||
/// #else
|
/// #else
|
||||||
element.innerHTML = `<div class="b3-chips">
|
element.innerHTML = `<div class="b3-chips${html ? "" : " fn__none"}">
|
||||||
${html}
|
${html}
|
||||||
</div>
|
</div>
|
||||||
<span class="fn__flex-1"></span>
|
<span class="fn__flex-1"></span>
|
||||||
|
Loading…
Reference in New Issue
Block a user