Selaa lähdekoodia

优化:修复mescroll报错问题

haiyang 1 viikko sitten
vanhempi
commit
ddf784ec33

+ 10 - 8
src/custom-components/custom-mescroll/wxs/wxs.wxs

@@ -63,14 +63,16 @@ me.clearTransform = function (ins){
  * 监听逻辑层数据的变化 (实时更新数据)
  */
 function propObserver(wxsProp) {
-	me.optDown = wxsProp.optDown
-	me.scrollTop = wxsProp.scrollTop
-	me.bodyHeight = wxsProp.bodyHeight
-	me.isDownScrolling = wxsProp.isDownScrolling
-	me.isUpScrolling = wxsProp.isUpScrolling
-	me.isUpBoth = wxsProp.isUpBoth
-	me.isScrollBody = wxsProp.isScrollBody
-	me.startTop = wxsProp.scrollTop // 及时更新touchstart触发的startTop, 避免scroll-view快速惯性滚动到顶部取值不准确
+    if(wxsProp) {
+        me.optDown = wxsProp.optDown
+        me.scrollTop = wxsProp.scrollTop
+        me.bodyHeight = wxsProp.bodyHeight
+        me.isDownScrolling = wxsProp.isDownScrolling
+        me.isUpScrolling = wxsProp.isUpScrolling
+        me.isUpBoth = wxsProp.isUpBoth
+        me.isScrollBody = wxsProp.isScrollBody
+        me.startTop = wxsProp.scrollTop // 及时更新touchstart触发的startTop, 避免scroll-view快速惯性滚动到顶部取值不准确
+    }
 }
 
 /**

+ 2 - 1
src/pages-A/settingPage/index.vue

@@ -160,7 +160,8 @@ function onChooseAvatar(e) {
                         </template>
                     </up-cell>
                 </button>
-                <up-cell title="昵称" :is-link="true" :value="userInfo.nickname" @tap="nickNameVisible = true" />
+                <up-cell title="昵称" :is-link="true" :value="userInfo.nickname" :border="false"
+                    @tap="nickNameVisible = true" />
             </up-cell-group>
         </view>