wupengfei
4 天以前 d820b4d0fc01559e36484649c56bbc13b9cc551c
packages/components/src/Tabs/ProTabs.vue
@@ -2,7 +2,11 @@
  <view
    ref="container"
    class="nut-tabs"
    :class="[direction, { fullHeight, noContent: !showPaneContent, flexTitle }]"
    :class="[
      direction,
      { fullHeight, noContent: !showPaneContent, flexTitle, noSmile: !showSmile },
    ]"
    :style="tabsStyle"
  >
    <div :class="['pro-tabs__titles_wrapper', { isTransparent }]">
      <scroll-view
@@ -400,6 +404,16 @@
  return { marginLeft: px, marginRight: px };
});
const refRandomId = Math.random().toString(36).slice(-8);
const systemInfo = Taro.getSystemInfoSync();
const tabsStyle = computed(() => {
  if (systemInfo.platform.toLowerCase() === 'ios') {
    return { overflow: 'visible' };
  } else {
    return {};
  }
});
</script>
<style lang="scss">
@@ -533,4 +547,32 @@
    }
  }
}
.nut-tabs.noSmile {
  .nut-tabs__titles.tabs-scrollview {
    height: 86rpx;
    .nut-tabs__list {
      height: 86rpx;
    }
    .nut-tabs__titles-item__smile {
      display: none !important;
    }
    .nut-tabs__titles-item {
      .nut-tabs__titles-item__text {
        padding-top: 8rpx;
      }
      &.active {
        .nut-tabs__titles-item__text {
          padding-top: 0;
          font-size: 32rpx;
          transition: all 0.3s ease;
        }
      }
    }
  }
}
</style>