mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
f15aca19d7
commit
23c6843803
1 changed files with 4 additions and 5 deletions
|
@ -571,20 +571,19 @@ const addAttrViewColAnimation = (options: {
|
||||||
}
|
}
|
||||||
const nodeId = options.blockElement.getAttribute("data-node-id");
|
const nodeId = options.blockElement.getAttribute("data-node-id");
|
||||||
if (options.blockElement.classList.contains("av")) {
|
if (options.blockElement.classList.contains("av")) {
|
||||||
options.blockElement.querySelectorAll(".av__row").forEach((item, index) => {
|
options.blockElement.querySelectorAll(".av__row").forEach((item) => {
|
||||||
let previousElement;
|
let previousElement;
|
||||||
if (options.previousID) {
|
if (options.previousID) {
|
||||||
previousElement = item.querySelector(`[data-col-id="${options.previousID}"]`);
|
previousElement = item.querySelector(`[data-col-id="${options.previousID}"]`);
|
||||||
} else {
|
} else {
|
||||||
previousElement = item.lastElementChild.previousElementSibling;
|
previousElement = item.querySelector(".av__cell").previousElementSibling;
|
||||||
}
|
}
|
||||||
let html = "";
|
let html = "";
|
||||||
if (index === 0) {
|
if (item.classList.contains("av__row--header")) {
|
||||||
// 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;">
|
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>`}
|
${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>
|
<span class="av__celltext fn__flex-1">${options.name}</span>
|
||||||
<div class="av__widthdrag av__pulse"></div>
|
<div class="av__widthdrag"></div>
|
||||||
</div>`;
|
</div>`;
|
||||||
} else {
|
} else {
|
||||||
html = '<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>';
|
html = '<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue