mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 16:41:07 +08:00
💄 database loading
This commit is contained in:
parent
2872dab9eb
commit
40a1e6d5cc
@ -21,9 +21,12 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
|
||||
if (e.getAttribute("data-render") === "true") {
|
||||
return;
|
||||
}
|
||||
let time: number
|
||||
if (e.firstElementChild.innerHTML === "") {
|
||||
e.style.width = e.parentElement.clientWidth - 40 + "px";
|
||||
time = new Date().getTime();
|
||||
let html = "";
|
||||
[1, 2, 3].forEach(item => {
|
||||
[1, 2, 3].forEach(() => {
|
||||
html += `<div class="av__row">
|
||||
<div style="width: 24px"></div>
|
||||
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
|
||||
@ -166,6 +169,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
|
||||
e.style.width = e.parentElement.clientWidth + "px";
|
||||
}
|
||||
e.style.alignSelf = "center";
|
||||
setTimeout(() => {
|
||||
e.firstElementChild.outerHTML = `<div>
|
||||
<div class="av__header" style="padding-left: ${paddingLeft};padding-right: ${paddingRight};">
|
||||
<div class="layout-tab-bar fn__flex">
|
||||
@ -211,6 +215,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
|
||||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
}, time ? 256 - (new Date().getTime() - time) : 0); // 为了让动画更好看,需延时到 256ms
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user