fix(breadcrumb): update size prop type and add validator (#3037)

This commit is contained in:
Gweesin Chan 2025-03-07 09:57:49 +08:00 committed by GitHub
parent 09fef37a4a
commit a210f5a5ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View File

@ -41,7 +41,7 @@ export default {
},
{
name: 'size',
type: 'string',
type: "'medium'",
defaultValue: "'medium'",
desc: {
'zh-CN': '设置面包屑尺寸大小',
@ -107,7 +107,7 @@ export default {
},
{
name: 'size',
type: 'string',
type: "'medium'",
defaultValue: "'medium'",
desc: {
'zh-CN': '设置面包屑尺寸大小',

View File

@ -19,7 +19,11 @@ export const breadcrumbItemProps = {
type: Boolean,
default: false
},
size: String,
size: {
type: String,
default: '',
validator: (val: string) => [/* 'large', */ 'medium', /* 'small', 'mini', */ ''].includes(val)
},
option: {
type: Object,
default: () => ({})

View File

@ -35,7 +35,11 @@ export const breadcrumbProps = {
type: String,
default: 'label'
},
size: String,
size: {
type: String,
default: '',
validator: (val: string) => [/* 'large', */ 'medium', /* 'small', 'mini', */ ''].includes(val)
},
options: {
type: Array,
default: () => []