Skip to content
加载中...

T-Text 文字

兼容端

安卓苹果Web鸿蒙微信小程序

使用示例

vue
<template>
    <t-card title="主题">
        <t-row>
            <t-text>默认文本</t-text>
            <t-text :ma="['0','5']" type="primary">主题文本</t-text>
            <t-text :ma="['0','5']" type="error">错误文本</t-text>
            <t-text :ma="['0','5']" type="success">成功文本</t-text>
            <t-text :ma="['0','5']" type="warning">警告文本</t-text>
        </t-row>
    </t-card>
    
    <t-card title="下划线">
        <t-row>
            <t-text decoration="underline">默认文本</t-text>
            <t-text decoration="underline" :ma="['0','5']" type="primary">主题文本</t-text>
            <t-text decoration="underline" :ma="['0','5']" type="error">错误文本</t-text>
            <t-text decoration="underline" :ma="['0','5']" type="success">成功文本</t-text>
            <t-text decoration="underline" :ma="['0','5']" type="warning">警告文本</t-text>
        </t-row>
    </t-card>
</template>

属性

属性名类型默认值说明
typeString"default"文本类型,可选值:default/primary/error/success/warning
colorString"#333333"文本颜色
sizeString"14"文本大小
showBarBooleanfalse显示标题块
barDirectionString"left"块方向
barWidthString"3"块宽度
barHeightString"10"块高度
barColorString""块颜色
barMxArray["0","4"]块左右外边距,[左边距,右边距]
barRoundString"8"块圆角
maArray[]外边距
darkBooleantrue是否暗黑模式自适应
decorationString""文本修饰线,可选值:underline/line-through/overline
boldString"normal"字体粗细,可选值:normal/bold/400/700
linesNumber-1文本行数限制,-1表示不限制

方法

方法名说明参数
该组件暂无事件方法

插槽

插槽名说明
default文本内容插槽