添加全局字号,动态调整大小

This commit is contained in:
icssoa
2025-08-13 15:21:16 +08:00
parent b04cfb0066
commit e7b17195dd
49 changed files with 682 additions and 292 deletions

View File

@@ -35,19 +35,21 @@
@tap="change(index)"
>
<slot name="item" :item="item" :active="item.isActive">
<text
class="cl-tabs__item-label"
:class="[
{
'is-active': item.isActive,
'is-disabled': item.disabled,
'is-dark': isDark,
'is-fill': fill
},
pt.text?.className
]"
<cl-text
:pt="{
className: parseClass([
'cl-tabs__item-label',
{
'is-active': item.isActive,
'is-disabled': item.disabled,
'is-dark': isDark,
'is-fill': fill
},
pt.text?.className
])
}"
:style="getTextStyle(item)"
>{{ item.label }}</text
>{{ item.label }}</cl-text
>
</slot>
</view>
@@ -73,7 +75,7 @@
<script lang="ts" setup>
import { type PropType, computed, getCurrentInstance, nextTick, onMounted, ref, watch } from "vue";
import { isDark, isEmpty, isHarmony, isNull, parsePt, parseRpx, rpx2px } from "@/cool";
import { isDark, isEmpty, isHarmony, isNull, parseClass, parsePt, parseRpx, rpx2px } from "@/cool";
import type { ClTabsItem, PassThroughProps } from "../../types";
// 定义标签类型