|
@@ -18,7 +18,7 @@
|
|
|
v-for="(item, index) in tabs"
|
|
|
:key="index"
|
|
|
@click="setActive(index)">
|
|
|
- {{item.name}}
|
|
|
+ <slot :item="item" :index="index">{{item.name}}</slot>
|
|
|
<view
|
|
|
v-if="type === 'line' && index == curIndex"
|
|
|
class="fs-tab-item-bar"
|
|
@@ -79,7 +79,7 @@ const props = defineProps({
|
|
|
const emits = defineEmits(['change', 'update:modelValue'])
|
|
|
|
|
|
const scrollable = computed(() => props.scrollThreshold <= props.tabs.length)
|
|
|
-const itemStyle = computed(() => scrollable.value ? `flex: 0 0 ${88 / props.scrollThreshold}%;` : '1')
|
|
|
+const itemStyle = computed(() => scrollable.value ? `flex: 0 0 ${88 / props.scrollThreshold}%;` : '')
|
|
|
const curIndex = computed(() => props.modelValue)
|
|
|
|
|
|
const setActive = index => {
|