mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-28 19:26:09 +01:00
This commit is contained in:
parent
06d78e0333
commit
767971be43
4 changed files with 27 additions and 0 deletions
|
|
@ -296,3 +296,20 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
|
|||
}]);
|
||||
nameElement.dataset.title = nameElement.textContent.trim();
|
||||
};
|
||||
|
||||
export const insertAttrViewBlockAnimation = (blockElement: Element, size: number, previousId: string) => {
|
||||
const previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(`.av__row--header`);
|
||||
let colHTML = ""
|
||||
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {
|
||||
colHTML += `<div class="av__cell" style="width: ${item.style.width}"></div>`
|
||||
})
|
||||
|
||||
let html = ""
|
||||
new Array(size).fill(1).forEach(() => {
|
||||
html += `<div class="av__row">
|
||||
<div class="av__firstcol"><img src="/stage/loading-pure.svg"></div>
|
||||
${colHTML}
|
||||
</div>`
|
||||
})
|
||||
previousElement.insertAdjacentHTML("afterend", html)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue