纸板小程序:订单/送货单:列表与详情功能
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// behaviors/common.ts 全局混入语言切换函数
|
||||
export const commonBehavior = Behavior({
|
||||
|
||||
data: {
|
||||
inputWidth: 0,
|
||||
inputWidthW: 0,
|
||||
safeAreaTop: 47
|
||||
},
|
||||
onLoad() {
|
||||
this.initInputWidth();
|
||||
},
|
||||
|
||||
// 2. 给 【Component 组件】 使用
|
||||
attached() {
|
||||
this.initInputWidth();
|
||||
},
|
||||
methods: {
|
||||
// 初始化组件宽度 / 头部高度
|
||||
initInputWidth() {
|
||||
const app = getApp();
|
||||
this.setData({
|
||||
inputWidth: app.globalData.inputWidth,
|
||||
inputWidthW: app.globalData.inputWidthW,
|
||||
safeAreaTop: app.globalData.safeAreaTop,
|
||||
})
|
||||
},
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user