fix(reader): render PDF pages on initial layout

Defer EmbedPDF's Vue scroll readiness signal until the page DOM is committed so initial visibility metrics trigger rendering.
This commit is contained in:
neon
2026-07-12 05:00:06 +00:00
parent eda48ff641
commit 00951219b2
3 changed files with 29 additions and 12 deletions
@@ -0,0 +1,13 @@
diff --git a/dist/vue/index.js b/dist/vue/index.js
index e84f7ff256267d787787b779f51f69e7586fbe63..ce58323b4028f164037d3b045331572fb75b055c 100644
--- a/dist/vue/index.js
+++ b/dist/vue/index.js
@@ -81,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
if (!plugin || !docId || !layout) return;
plugin.setLayoutReady(docId);
},
- { immediate: true }
+ { immediate: true, flush: "post" }
);
return (_ctx, _cache) => {
return scrollerLayout.value ? (openBlock(), createElementBlock("div", mergeProps({