Skip to content

颜色文字组件 - IkColorText

props

props类型说明默认值
colorString文本颜色false
typeString文本状态 <'info''success'

示例代码

vue
<script lang="ts" setup>
const types = ['info', 'success', 'error', 'default', 'info']

const colors = ['#1890ff', '#52c41a', '#f5222d', '#303133', '#1890ff']
</script>

<template>
  <IkPageMain fixed style="padding: 16px; box-sizing: border-box">
    <div style="width: 750px; height: 500px;">
      <h2>通过type属性展示</h2>
      <el-row>
        <IkColorText
          v-for="(item, index) in types"
          :key="index"
          style="font-size: 22px; margin-right: 16px"
          :type="item"
        >
          {{ item }}
        </IkColorText>
      </el-row>
      <h2>通过color属性展示</h2>
      <el-row>
        <IkColorText
          v-for="(item, index) in colors"
          :key="index"
          style="font-size: 22px; margin-right: 16px"
          :color="item"
        >
          {{ item }}
        </IkColorText>
      </el-row>
    </div>
  </IkPageMain>
</template>

<style scoped lang="scss">
</style>