■ 概要(Overview)
コンポーネント名
レベル (Atomic Design)
カテゴリー(Category)
■ データ(Data)
【reactive/ref】
items: 現在のリストアイテムの配列 (Reactive list of items)
【props】
id (string) - コンポーネントのID
class (string) - コンポーネントのクラス
style (string) - コンポーネントのスタイル
styleReset (boolean) - スタイルリセットフラグ
items (Array) - 表示するアイテムの配列
【emit】
update:value: アイテムがクリックされたときに発火 (Emits item value on click)
【computed】
bindingClass: スタイルリセットフラグに応じたクラス名を返す (Returns class name based on styleReset flag)
■ イベント(Event)
deleteItem(index: number): アイテムをリストから削除する (Deletes an item from the list)
■ 使用例(Usecase)
<script setup lang="ts">
import { BasicList } from 'revuekitz'
import 'revuekitz/dist/style.css'
</script>
<template>
<BasicList
id="basicListId"
class="basic-list-class"
:style="{ color: 'black', backgroundColor: 'white' }"
:styleReset="false"
:items="[
{ id: '1', title: 'Custom Item #1', value: 1, href: '#' },
{ id: '2', title: 'Custom Item #2', value: 2 }
]"
/>
</template>