■ 概要(overview)
コンポーネント名
レベル (Atomic Design)
カテゴリー(category)
■ データ(data)
【reactive/ref】
selectedColor (string) - 選択された色
【props】
id (string) - カラーフィールドのID
class (string) - カラーフィールドのクラス
name (string) - カラーフィールドの名前
style (string) - カラーフィールドのスタイル
styleReset (boolean) - スタイルリセットフラグ
modelValue (string) - 初期選択色
isDisabled (boolean, default: false) - カラーフィールドの無効状態
isReadonly (boolean, default: false) - カラーフィールドの読み取り専用状態
【emit】
update:modelValue - カラーフィールドの色が変更されたときに発行されるイベント
【computed】
bindingClass - styleResetがtrueの場合はprops.class、falseの場合はrevuekitz-color-field ${props.class}をクラス名としてセットする
■ 使用例(usecase)
<script setup>
import { ref } from 'vue'
import { ColorField } from 'revuekitz'
import 'revuekitz/dist/style.css'
const selectedColor = ref('')
</script>
<template>
<ColorField
id="colorFieldId"
class="color-field-class"
style="border: 1px solid black"
:styleReset="false"
name="color_field_name"
:isDisabled="false"
:isReadonly="false"
v-model="selectedColor"
/>
</template>