Browse Source

fix(address): 内嵌 elevator 滑动问题修复

suzigang 4 years ago
parent
commit
f05394fe66

+ 1 - 0
src/packages/__VUE/address/index.taro.vue

@@ -137,6 +137,7 @@ import Taro from '@tarojs/taro';
 const { create, componentName } = createComponent('address');
 
 interface RegionData {
+  id: string;
   name: string;
   [key: string]: any;
 }

+ 4 - 1
src/packages/__VUE/elevator/index.taro.vue

@@ -23,7 +23,7 @@
         ></view>
       </view>
     </scroll-view>
-    <view class="nut-elevator__code--current" v-show="scrollStart" v-if="indexList.length">
+    <view class="nut-elevator__code--current" v-show="scrollStart" v-if="indexList.length > 0">
       {{ indexList[currentIndex][acceptKey] }}
     </view>
     <view class="nut-elevator__bars" @touchstart="touchStart" @touchmove.stop.prevent="touchMove" @touchend="touchEnd">
@@ -179,6 +179,9 @@ export default create({
     };
 
     onMounted(() => {
+      Taro.nextTick(() => {
+        calculateHeight();
+      });
       if (Taro.getEnv() === 'WEB') {
         calculateHeight();
       } else {