■ コンポーネントデモ(demo)
50
■ 概要(overview)
コンポーネント名
- MoneyField
レベル (Atomic Design)
- Atoms(原子)
カテゴリー(category)
- fields
■ データ(data)
【props】
id(string): 金額フィールドのIDclass(string): 金額フィールドのクラスname(string): 金額フィールドの名前style(string): 金額フィールドのスタイルstyleReset(boolean): スタイルリセットフラグmoney(number): 初期金額値min(number): 最小金額max(number): 最大金額isDisabled(boolean): 金額フィールドの無効状態isReadonly(boolean): 金額フィールドの読み取り専用状態
【emit】
update:moneyValue- 金額が変更されたときに発行されるイベント
【computed】
bindingClass-styleResetがtrueの場合はprops.classを返し、それ以外の場合はrevuekitz-money-field ${props.class}をクラス名として返す
■ 使用例(usecase)
<script setup>
import { MoneyField } from 'revuekitz'
import 'revuekitz/dist/style.css'
const moneyValue = ref(50)
</script>
<template>
<MoneyField
id="moneyFieldId"
class="money-field-class"
style="background-color: #f0f0f0; border: 1px solid #ccc;"
name="money_field_name"
:min="0"
:max="100000"
:isDisabled="false"
:isReadonly="false"
v-model="moneyValue"
/>
</template>