Browse Source

fix(tabs): taro env dev bug (#2002)

jiang577 2 years ago
parent
commit
3766a2dd40
2 changed files with 9 additions and 11 deletions
  1. 8 0
      src/packages/__VUE/tabs/index.scss
  2. 1 11
      src/packages/__VUE/tabs/index.taro.vue

+ 8 - 0
src/packages/__VUE/tabs/index.scss

@@ -191,3 +191,11 @@
     box-sizing: border-box;
   }
 }
+.tabs-scrollview {
+  white-space: nowrap;
+}
+.nut-tabs__titles-item .taro {
+  display: inline-block !important;
+  height: 46px;
+  line-height: 46px;
+}

+ 1 - 11
src/packages/__VUE/tabs/index.taro.vue

@@ -14,7 +14,7 @@
       <slot v-if="$slots.titles" name="titles"></slot>
       <template v-else>
         <view
-          class="nut-tabs__titles-item"
+          class="nut-tabs__titles-item taro"
           :style="titleStyle"
           @click="tabChange(item, index)"
           :class="{ active: item.paneKey == modelValue, disabled: item.disabled }"
@@ -329,13 +329,3 @@ export default create({
   }
 });
 </script>
-<style lang="less">
-.tabs-scrollview {
-  white-space: nowrap;
-}
-.nut-tabs__titles-item {
-  display: inline-block !important;
-  height: 46px;
-  line-height: 46px;
-}
-</style>