diff --git a/pages.json b/pages.json
index 2eef633540c683152c58e5dbcf17f6fc6c890998..ce258e63f88a90219460e98cd87097fd7ddd359b 100644
--- a/pages.json
+++ b/pages.json
@@ -788,7 +788,16 @@
"enablePullDownRefresh": false
}
}
- ],
+ ,{
+ "path" : "pages/component/scroll-view/scroll-view-custom-refresher-props",
+ "style" :
+ {
+ "navigationBarTitleText": "自定义下拉刷新的scroll-view属性示例",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
"globalStyle": {
"pageOrientation": "portrait",
"navigationBarTitleText": "Hello uniapp x",
diff --git a/pages/component/scroll-view/scroll-view-custom-refresher-props.uvue b/pages/component/scroll-view/scroll-view-custom-refresher-props.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..56a8d5f499665f750eed2ba9c4130eabdbe86b56
--- /dev/null
+++ b/pages/component/scroll-view/scroll-view-custom-refresher-props.uvue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+ item-{{i}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/component/scroll-view/scroll-view.uvue b/pages/component/scroll-view/scroll-view.uvue
index 1aba4732d079c3c950ef0dfe04164781004a220e..a925221b692970b1702dc9cc604b20e75bf5ab9e 100644
--- a/pages/component/scroll-view/scroll-view.uvue
+++ b/pages/component/scroll-view/scroll-view.uvue
@@ -73,11 +73,15 @@
class="button default-button"
@click="moreProps"
>
- 非下拉刷新的scroll-view属性示例
+ 非下拉刷新的属性示例
+
+
@@ -132,7 +136,12 @@ export default {
uni.navigateTo({
url: '/pages/component/scroll-view/scroll-view-refresher-props',
})
- },
+ },
+ jumpToCustomRefresher() {
+ uni.navigateTo({
+ url: '/pages/component/scroll-view/scroll-view-custom-refresher-props',
+ })
+ }
},
}
diff --git a/pages/template/custom-refresher/custom-refresher.uvue b/pages/template/custom-refresher/custom-refresher.uvue
index 366a01aa56082d7771e732da2edb19a526ad91f5..02df00cf085946dbc871c34519a381fe3943ca88 100644
--- a/pages/template/custom-refresher/custom-refresher.uvue
+++ b/pages/template/custom-refresher/custom-refresher.uvue
@@ -23,11 +23,15 @@
return {
refresherTriggered:false,
refresherThreshold:40,
- pullingDistance:0
+ pullingDistance:0,
+ resetting: false
}
},
computed:{
state():number{
+ if (this.resetting) {
+ return 3;
+ }
if(this.refresherTriggered){
return 2
}
@@ -42,6 +46,9 @@
onRefresherpulling(e:RefresherEvent){
// console.log('onRefresherpulling',e.detail.dy)
this.pullingDistance = e.detail.dy
+ if (this.pullingDistance.toDouble() == 0.0) {
+ this.resetting = false;
+ }
},
onRefresherrefresh(){
this.refresherTriggered = true
diff --git a/pages/template/custom-refresher/refresh-box/refresh-box.uvue b/pages/template/custom-refresher/refresh-box/refresh-box.uvue
index 70a324d7c44e82d4f2ddaff2f5b741c0059db44f..f8e1eec66fa164f9341d6df8ef8d7ebc8251ff0b 100644
--- a/pages/template/custom-refresher/refresh-box/refresh-box.uvue
+++ b/pages/template/custom-refresher/refresh-box/refresh-box.uvue
@@ -11,7 +11,7 @@
export default {
data() {
return {
- text: ['继续下拉执行刷新', '释放立即刷新', '刷新中']
+ text: ['继续下拉执行刷新', '释放立即刷新', '刷新中', ""]
}
},
props: {