tiny-vue_version0/examples/sites/demos/pc/app/checkbox/group-options-composition-a...

18 lines
485 B
Vue

<template>
<tiny-checkbox-group v-model="checkList" type="checkbox" :options="options"></tiny-checkbox-group>
</template>
<script setup>
import { ref } from 'vue'
import { CheckboxGroup as TinyCheckboxGroup, Modal } from '@opentiny/vue'
function handleClick() {
Modal.message({ message: 'click', status: 'info' })
}
const checkList = ref(['A'])
const options = ref([
{ label: 'A', text: '很好', events: { click: handleClick } },
{ label: 'B', text: '一般' }
])
</script>