first commit

This commit is contained in:
lingxiao865
2026-02-10 08:05:03 +08:00
commit c5af079d8c
1094 changed files with 97530 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import { systemInfo } from '../common/utils';
const useCustomNavbarBehavior = {
data() {
return {
distanceTop: 0,
};
},
props: {
usingCustomNavbar: {
type: Boolean,
default: false,
},
customNavbarHeight: {
type: Number,
default: 0,
},
},
created() {
if (this.usingCustomNavbar) {
this.calculateCustomNavbarDistanceTop();
}
},
methods: {
calculateCustomNavbarDistanceTop() {
const { statusBarHeight } = systemInfo;
let distance = 0;
// #ifndef H5
// #ifndef APP-PLUS
const menuButton = uni.getMenuButtonBoundingClientRect();
distance = menuButton.top + menuButton.bottom - statusBarHeight;
// #endif
// #endif
this.distanceTop = Math.max(distance, this.customNavbarHeight + statusBarHeight);
},
},
};
export default useCustomNavbarBehavior;