Fix capsule-aligned navigation and refresh mini program typography
ci-cd / verify (push) Successful in 6s
ci-cd / deploy (push) Skipped

This commit is contained in:
2026-10-04 10:30:17 +08:00
parent adfd0574cc
commit c2b51f96e0
45 changed files with 307 additions and 216 deletions
+33
View File
@@ -0,0 +1,33 @@
const { navigationGeometry } = require("../../utils/layout");
Component({
properties: {
title: String,
back: { type: Boolean, value: false },
},
data: navigationGeometry(),
lifetimes: {
attached() {
this.updateLayout();
},
},
pageLifetimes: {
resize() {
this.updateLayout();
},
},
methods: {
updateLayout() {
const info = wx.getWindowInfo ? wx.getWindowInfo() : wx.getSystemInfoSync();
let menu = {};
try {
menu = wx.getMenuButtonBoundingClientRect();
} catch (_) {}
this.setData(navigationGeometry(info, menu));
},
goBack() {
if (getCurrentPages().length > 1) wx.navigateBack({ delta: 1 });
else wx.reLaunch({ url: "/pages/home/home" });
},
},
});