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
+24
View File
@@ -0,0 +1,24 @@
import { useRect } from "@vant/use";
import { ref, onMounted, nextTick, watch } from "vue";
import { windowHeight, windowWidth } from "../utils/index.mjs";
import { onPopupReopen } from "./on-popup-reopen.mjs";
const useHeight = (element, withSafeArea) => {
const height = ref();
const setHeight = () => {
height.value = useRect(element).height;
};
onMounted(() => {
nextTick(setHeight);
if (withSafeArea) {
for (let i = 1; i <= 3; i++) {
setTimeout(setHeight, 100 * i);
}
}
});
onPopupReopen(() => nextTick(setHeight));
watch([windowWidth, windowHeight], setHeight);
return height;
};
export {
useHeight
};