mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 17:24:21 +01:00
🎨 改进数据库
This commit is contained in:
parent
39e89fc791
commit
540af4051b
2 changed files with 4 additions and 2 deletions
|
|
@ -439,10 +439,11 @@ const addAttrViewColAnimation = (options: {
|
|||
}
|
||||
let html = "";
|
||||
if (index === 0) {
|
||||
// av__pulse 用于检测是否新增,和 render 中 isPulse 配合弹出菜单
|
||||
html = `<div class="av__cell av__cell--header" draggable="true" data-icon="${options.icon || ""}" data-col-id="${options.id}" data-dtype="${options.type}" data-wrap="false" style="width: 200px;">
|
||||
${options.icon ? unicode2Emoji(options.icon, "av__cellheadericon", true) : `<svg class="av__cellheadericon"><use xlink:href="#${getColIconByType(options.type)}"></use></svg>`}
|
||||
<span class="av__celltext fn__flex-1">${options.name}</span>
|
||||
<div class="av__widthdrag"></div>
|
||||
<div class="av__widthdrag av__pulse"></div>
|
||||
</div>`;
|
||||
} else {
|
||||
html = '<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>';
|
||||
|
|
|
|||
|
|
@ -290,8 +290,9 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
} else {
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||
item.removeAttribute("data-render");
|
||||
const isPulse = item.querySelector(".av__pulse");
|
||||
avRender(item, protyle, () => {
|
||||
if (operation.action === "addAttrViewCol" && item.querySelector(".av__pulse")) {
|
||||
if (operation.action === "addAttrViewCol" && isPulse) {
|
||||
openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id});
|
||||
}
|
||||
}, ["addAttrViewView", "duplicateAttrViewView"].includes(operation.action) ? operation.id :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue