|
@@ -2,7 +2,7 @@
|
|
|
<view class="container" :style="{ background: boxBackground }">
|
|
|
<view id="mylisttop" />
|
|
|
<scroll-view class="scroll-view" scroll-y :refresher-enabled='pullDown' :refresher-triggered='inRefresh'
|
|
|
- :style="{ height: height || defaultHeight + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
|
|
|
+ :style="{ height: (height || defaultHeight) + 'px' }" :triggered='true' @refresherrefresh='pullToRefresh'
|
|
|
:scroll-into-view="scrollIntoView" :lower-threshold='300' :scroll-with-animation="true"
|
|
|
@scrolltolower='loadThePage'>
|
|
|
<view id="header">
|
|
@@ -47,7 +47,8 @@ export default {
|
|
|
default: ""
|
|
|
},
|
|
|
defaultHeight: {
|
|
|
- type: [String, Number]
|
|
|
+ type: [String, Number],
|
|
|
+ default: 0
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -61,7 +62,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.automatic) this.setHeight()
|
|
|
+ if (this.automatic) setTimeout(() => {
|
|
|
+ this.setHeight()
|
|
|
+ }, 100);
|
|
|
},
|
|
|
methods: {
|
|
|
/* 下拉刷新 */
|
|
@@ -92,6 +95,7 @@ export default {
|
|
|
height = res - num;
|
|
|
break;
|
|
|
}
|
|
|
+ console.log("高度", height)
|
|
|
if (this.height != height) this.height = height;
|
|
|
resolve(height)
|
|
|
});
|