Files
doodle-mini/miniprogram/components3.0/nav-bar/nav-bar.ts
T
2026-04-03 15:21:04 +08:00

23 lines
558 B
TypeScript

import { NAV_INNER_PX } from '../../utils/navMetrics';
Component({
options: { multipleSlots: true },
properties: {
title: { type: String, value: '' },
background: { type: String, value: '' },
},
data: {
statusBarHeight: 0,
navBlockHeight: 0,
},
lifetimes: {
attached() {
const { statusBarHeight } = wx.getWindowInfo();
this.setData({
statusBarHeight,
navBlockHeight: statusBarHeight + NAV_INNER_PX,
});
},
},
});