TColorCheck / 颜色选择器(色块预设)
ColorCheck provides preset color swatches for selection. Supports single/multiple selection, rounded swatches, light mode, and color format conversion. / 色块预设选择器提供预设色块供选择,支持单选/多选、圆角色块、浅色模式和颜色格式转换。
Props / 属性
| Prop | Type / 类型 | Default / 默认值 | Description / 说明 |
|---|---|---|---|
color | string | '#066fd1' | Default color |
colors | ColorCheckOption[] | — | Color swatch list |
multiple | boolean | false | Multi-select |
rounded | boolean | false | Rounded swatches |
disabled | boolean | false | Disabled |
Basic Usage / 基础用法
vue
<script setup lang="ts">
import { TColorCheck } from '@gulcc/tabler-vue'
const color = ref('#206bc4')
</script>
<template>
<TColorCheck v-model="color" />
</template>Tips / 避坑指南
- Uses
colordlibrary for color parsing and format conversion multiple=truechanges v-model to array of selected colors- Default
colorsare the 12 Tabler brand colors if not specified