调整dictvalue组件

This commit is contained in:
Jason 2022-10-14 15:28:44 +08:00
parent 3dd371161b
commit 61a9a453f4
1 changed files with 9 additions and 4 deletions

View File

@ -6,10 +6,15 @@
</div>
</template>
<script lang="ts" setup>
const props = defineProps<{
options: any[]
value: any
}>()
const props = withDefaults(
defineProps<{
options: any[]
value: any
}>(),
{
options: () => []
}
)
const values = computed(() => {
if (props.value !== null && typeof props.value !== 'undefined') {