From 38430ddb8612fce15a2f1c940f9bd57d4da3e70b Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期四, 16 九月 2021 11:59:39 +0800 Subject: [PATCH] add new key --- components/uni-list/uni-refresh.vue | 130 +++++++++++++++++++++--------------------- 1 files changed, 65 insertions(+), 65 deletions(-) diff --git a/components/uni-list/uni-refresh.vue b/components/uni-list/uni-refresh.vue index 2c64158..3b4c5a2 100644 --- a/components/uni-list/uni-refresh.vue +++ b/components/uni-list/uni-refresh.vue @@ -1,65 +1,65 @@ -<template> - <!-- #ifdef APP-NVUE --> - <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown"> - <slot /> - </refresh> - <!-- #endif --> - <!-- #ifndef APP-NVUE --> - <view ref="uni-refresh" class="uni-refresh" v-show="isShow"> - <slot /> - </view> - <!-- #endif --> -</template> - -<script> - export default { - name: 'UniRefresh', - props: { - display: { - type: [String], - default: "hide" - } - }, - data() { - return { - pulling: false - } - }, - computed: { - isShow() { - if (this.display === "show" || this.pulling === true) { - return true; - } - return false; - } - }, - created() {}, - methods: { - onchange(value) { - this.pulling = value; - }, - onrefresh(e) { - this.$emit("refresh", e); - }, - onpullingdown(e) { - // #ifdef APP-NVUE - this.$emit("pullingdown", e); - // #endif - // #ifndef APP-NVUE - var detail = { - viewHeight: 90, - pullingDistance: e.height - } - this.$emit("pullingdown", detail); - // #endif - } - } - } -</script> - -<style> - .uni-refresh { - height: 0; - overflow: hidden; - } -</style> +<template> + <!-- #ifdef APP-NVUE --> + <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown"> + <slot /> + </refresh> + <!-- #endif --> + <!-- #ifndef APP-NVUE --> + <view ref="uni-refresh" class="uni-refresh" v-show="isShow"> + <slot /> + </view> + <!-- #endif --> +</template> + +<script> + export default { + name: 'UniRefresh', + props: { + display: { + type: [String], + default: "hide" + } + }, + data() { + return { + pulling: false + } + }, + computed: { + isShow() { + if (this.display === "show" || this.pulling === true) { + return true; + } + return false; + } + }, + created() {}, + methods: { + onchange(value) { + this.pulling = value; + }, + onrefresh(e) { + this.$emit("refresh", e); + }, + onpullingdown(e) { + // #ifdef APP-NVUE + this.$emit("pullingdown", e); + // #endif + // #ifndef APP-NVUE + var detail = { + viewHeight: 90, + pullingDistance: e.height + } + this.$emit("pullingdown", detail); + // #endif + } + } + } +</script> + +<style> + .uni-refresh { + height: 0; + overflow: hidden; + } +</style> -- Gitblit v1.8.0