Skip to content

vText 文本

基础文本显示组件。

基础用法

vue
<script setup>
import { vText } from '@twi1i9ht/visual-lib'
</script>

<template>
  <vText content="Hello World" />
</template>

自定义样式

vue
<template>
  <vText
    content="重要提示"
    :font-size="24"
    color="#ff6b6b"
    font-weight="bold"
    text-align="center"
  />
</template>

Props

属性类型默认值说明
contentstring文本内容
fontSizenumber14字体大小 (px)
colorstring'#333'文字颜色
fontWeightstring | number'normal'字体粗细
textAlign'left' | 'center' | 'right''left'对齐方式
lineHeightnumber行高
fontFamilystring字体

Released under the MIT License.