|
@@ -3,16 +3,22 @@ Component({
|
|
|
properties: {
|
|
properties: {
|
|
|
show: Boolean,
|
|
show: Boolean,
|
|
|
handle: Function, //按钮回调函数
|
|
handle: Function, //按钮回调函数
|
|
|
- zIndex:{
|
|
|
|
|
- type:String,
|
|
|
|
|
- value:99999,
|
|
|
|
|
|
|
+ zIndex: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ value: 99999,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
lifetimes: {
|
|
lifetimes: {
|
|
|
ready() {
|
|
ready() {
|
|
|
- getHeight.getHeight('.head', this).then(res => this.setData({
|
|
|
|
|
- listHeight: res - 130
|
|
|
|
|
- }));
|
|
|
|
|
|
|
+ let windowHeight = 0,
|
|
|
|
|
+ that = this;
|
|
|
|
|
+ wx.getSystemInfo({
|
|
|
|
|
+ success: (res => windowHeight = res.windowHeight)
|
|
|
|
|
+ });
|
|
|
|
|
+ let query = wx.createSelectorQuery().in(that).select(".head").boundingClientRect();
|
|
|
|
|
+ query.exec(res => that.setData({
|
|
|
|
|
+ listHeight: (windowHeight - res[0].bottom - 80) * 2
|
|
|
|
|
+ }))
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -22,7 +28,7 @@ Component({
|
|
|
} = e.target.dataset;
|
|
} = e.target.dataset;
|
|
|
if (name) this.triggerEvent("handle", name)
|
|
if (name) this.triggerEvent("handle", name)
|
|
|
},
|
|
},
|
|
|
- onClose(){
|
|
|
|
|
|
|
+ onClose() {
|
|
|
this.triggerEvent("handle", "close")
|
|
this.triggerEvent("handle", "close")
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|