Vanessa 2025-08-11 22:33:18 +08:00
parent f15aca19d7
commit 23c6843803

View file

@ -571,20 +571,19 @@ const addAttrViewColAnimation = (options: {
}
const nodeId = options.blockElement.getAttribute("data-node-id");
if (options.blockElement.classList.contains("av")) {
options.blockElement.querySelectorAll(".av__row").forEach((item, index) => {
options.blockElement.querySelectorAll(".av__row").forEach((item) => {
let previousElement;
if (options.previousID) {
previousElement = item.querySelector(`[data-col-id="${options.previousID}"]`);
} else {
previousElement = item.lastElementChild.previousElementSibling;
previousElement = item.querySelector(".av__cell").previousElementSibling;
}
let html = "";
if (index === 0) {
// av__pulse 用于检测是否新增,和 render 中 isPulse 配合弹出菜单
if (item.classList.contains("av__row--header")) {
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 av__pulse"></div>
<div class="av__widthdrag"></div>
</div>`;
} else {
html = '<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>';