Skip to content

323 - Prop验证 #3051

@kwxiao111

Description

@kwxiao111
// 你的答案

BUtton.vue

<script setup lang="ts"> withDefaults( defineProps<{ type ?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default' }>(),{ type:'default' }) </script> Button App.vue <script setup lang="ts"> import Button from "./Button.vue"

let type="primary1"
</script>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions