This commit is contained in:
Vanessa 2023-10-12 20:23:18 +08:00
parent 40a1e6d5cc
commit 79a88dfbec
2 changed files with 4 additions and 4 deletions

View file

@ -746,7 +746,7 @@ export const openMenuPanel = (options: {
break; break;
} else if (type === "openAssetItem") { } else if (type === "openAssetItem") {
const assetLink = target.parentElement.dataset.content; const assetLink = target.parentElement.dataset.content;
const suffix = pathPosix().extname(assetLink) const suffix = pathPosix().extname(assetLink);
if (isLocalPath(assetLink) && !isMobile() && ( if (isLocalPath(assetLink) && !isMobile() && (
[".pdf"].concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO).includes(suffix) && ( [".pdf"].concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO).includes(suffix) && (
suffix !== ".pdf" || ( suffix === ".pdf" && !assetLink.startsWith("file://")) suffix !== ".pdf" || ( suffix === ".pdf" && !assetLink.startsWith("file://"))

View file

@ -21,7 +21,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
if (e.getAttribute("data-render") === "true") { if (e.getAttribute("data-render") === "true") {
return; return;
} }
let time: number let time: number;
if (e.firstElementChild.innerHTML === "") { if (e.firstElementChild.innerHTML === "") {
e.style.width = e.parentElement.clientWidth - 40 + "px"; e.style.width = e.parentElement.clientWidth - 40 + "px";
time = new Date().getTime(); time = new Date().getTime();
@ -34,8 +34,8 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div> <div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div> <div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
</div>`; </div>`;
}) });
e.firstElementChild.innerHTML = html e.firstElementChild.innerHTML = html;
} }
const left = e.querySelector(".av__scroll")?.scrollLeft || 0; const left = e.querySelector(".av__scroll")?.scrollLeft || 0;
const headerTransform = (e.querySelector(".av__row--header") as HTMLElement)?.style.transform; const headerTransform = (e.querySelector(".av__row--header") as HTMLElement)?.style.transform;