You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
385 B

// eslint-disable-next-line no-undef
export default Behavior({
behaviors: [],
properties: {},
data: {
distance: 0
},
attached(){
this.offsetMargin();
},
methods: {
offsetMargin() {
const { windowHeight, screenHeight } = wx.getSystemInfoSync();
this.setData({
distance: (screenHeight-windowHeight )
});
}
}
});