Browse Source

fix: NoticeBar修改height之后,垂直轮播会卡顿(#1809) (#1813)

* fix: 修复 ImagePreview 在Taro编译成H5后报错的问题

* fix: 地址关闭时, Close 事件触发两次问题解决

* feat: 组件DatePicker 添加双向绑定

* docs: 组件Picker文档修改

* feat: 组件Picker与DatePicker新增属性safe-area-inset-bottom

* feat: imagepreview

* fix: 组件imagepreview点击视频遮罩关闭(#1729)

* fix: 解决 Picker 在微信小程序中无法使用问题 (#1774)

* fix: 修改 Picker 组件 v-model 失效问题

* fix: 组件NoticeBar修改height之后,垂直轮播会卡顿
yangxiaolu1993 3 years ago
parent
commit
6a36ab8c89

+ 4 - 2
src/packages/__VUE/noticebar/index.taro.vue

@@ -48,7 +48,7 @@
             class="horseLamp_list_item"
             v-for="(item, index) in scrollList"
             :key="index"
-            :style="{ height: height }"
+            :style="{ height: pxCheck(height) }"
             @click="go(item)"
           >
             {{ item }}
@@ -82,6 +82,7 @@ import {
   h
 } from 'vue';
 import { createComponent } from '@/packages/utils/create';
+import { pxCheck } from '@/packages/utils/pxCheck';
 const { componentName, create } = createComponent('noticebar');
 import Taro from '@tarojs/taro';
 
@@ -409,7 +410,8 @@ export default create({
       onAnimationEnd,
       go,
       handleClickIcon,
-      slots
+      slots,
+      pxCheck
     };
   }
 });

+ 4 - 2
src/packages/__VUE/noticebar/index.vue

@@ -47,7 +47,7 @@
             class="horseLamp_list_item"
             v-for="(item, index) in scrollList"
             :key="index"
-            :style="{ height: height }"
+            :style="{ height: pxCheck(height) }"
             @click="go(item)"
           >
             {{ item }}
@@ -82,6 +82,7 @@ import {
 } from 'vue';
 import { createComponent } from '@/packages/utils/create';
 const { componentName, create } = createComponent('noticebar');
+import { pxCheck } from '@/packages/utils/pxCheck';
 
 interface StateProps {
   wrapWidth: number;
@@ -410,7 +411,8 @@ export default create({
       onAnimationEnd,
       go,
       handleClickIcon,
-      slots
+      slots,
+      pxCheck
     };
   }
 });

+ 1 - 0
src/sites/mobile-taro/vue/src/exhibition/pages/noticebar/index.vue

@@ -63,6 +63,7 @@
         :closeMode="true"
         :background="`rgba(251, 248, 220, 1)`"
         :color="`#D9500B`"
+        height="50"
       ></nut-noticebar>
     </div>