调整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> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
const props = defineProps<{ const props = withDefaults(
defineProps<{
options: any[] options: any[]
value: any value: any
}>() }>(),
{
options: () => []
}
)
const values = computed(() => { const values = computed(() => {
if (props.value !== null && typeof props.value !== 'undefined') { if (props.value !== null && typeof props.value !== 'undefined') {