Skip to content

323 - Prop验证 #2953

Open
Open
@myltx

Description

@myltx
<script setup lang="ts">
defineProps({
  type: {
    detault: 'default',
    requitrd: true,
    validator: (value: string) => {
      return ["primary" , "ghost", "dashed", "link" , "text" ,"default"].includes(value)
    }
  },
})
</script>

<template>
  <button>Button</button>
</template>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions