chore(Select)!: rename text-attribute to option-attribute and defaults to label

This commit is contained in:
Benjamin Canac
2023-06-12 14:42:16 +02:00
parent bc81d45b2b
commit b4a96a8b01
3 changed files with 57 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
<script setup>
const countries = [{
name: 'United States',
value: 'US'
}, {
name: 'Canada',
value: 'CA'
}, {
name: 'Mexico',
value: 'MX'
}]
const country = ref('CA')
</script>
<template>
<USelect v-model="country" :options="countries" option-attribute="name" />
</template>