Initial commit: GamePortrait 竖屏版 - 深色豪华主题

This commit is contained in:
li
2026-01-16 17:47:53 +08:00
commit 40976e4b45
26611 changed files with 2843638 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import Lazy from "./lazy.mjs";
import LazyComponent from "./lazy-component.mjs";
import LazyContainer from "./lazy-container.mjs";
import LazyImage from "./lazy-image.mjs";
const Lazyload = {
/*
* install function
* @param {App} app
* @param {object} options lazyload options
*/
install(app, options = {}) {
const LazyClass = Lazy();
const lazy = new LazyClass(options);
const lazyContainer = new LazyContainer({ lazy });
app.config.globalProperties.$Lazyload = lazy;
if (options.lazyComponent) {
app.component("LazyComponent", LazyComponent(lazy));
}
if (options.lazyImage) {
app.component("LazyImage", LazyImage(lazy));
}
app.directive("lazy", {
beforeMount: lazy.add.bind(lazy),
updated: lazy.update.bind(lazy),
unmounted: lazy.remove.bind(lazy)
});
app.directive("lazy-container", {
beforeMount: lazyContainer.bind.bind(lazyContainer),
updated: lazyContainer.update.bind(lazyContainer),
unmounted: lazyContainer.unbind.bind(lazyContainer)
});
}
};
export {
Lazyload
};