Vanessa 2024-12-01 12:18:41 +08:00
parent fa14fdc2e6
commit 2e2e2f331b
2 changed files with 4 additions and 1 deletions

View file

@ -1835,7 +1835,7 @@ const genImageHeightMenu = (label: string, imgElement: HTMLElement, protyle: IPr
click() {
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
imgElement.style.height = label === window.siyuan.languages.default ? "" : parseInt(label) + "vh";
imgElement.style.width = "";
imgElement.parentElement.style.width = "";
updateTransaction(protyle, id, nodeElement.outerHTML, html);
focusBlock(nodeElement);
}

View file

@ -444,6 +444,9 @@ export class Background {
let html = "";
const colors = ["secondary", "primary", "info", "success", "warning", "error", "pink"];
tags.split(",").forEach((item, index) => {
if (!item) {
return;
}
html += `<div class="b3-chip b3-chip--middle b3-chip--pointer b3-chip--${colors[index % 7]}" data-type="open-search">${escapeHtml(item)}<svg class="b3-chip__close" data-type="remove-tag"><use xlink:href="#iconCloseRound"></use></svg></div>`;
});
this.tagsElement.innerHTML = `${html}