Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/sites/demos/apis/breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
},
{
name: 'size',
type: 'string',
type: "'medium'",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from type: 'string' to type: 'medium' seems incorrect. The type should likely remain string to allow for different size values, unless 'medium' is intended as a default or constant value.

defaultValue: "'medium'",
desc: {
'zh-CN': '设置面包屑尺寸大小',
Expand Down Expand Up @@ -107,7 +107,7 @@ export default {
},
{
name: 'size',
type: 'string',
type: "'medium'",
defaultValue: "'medium'",
desc: {
'zh-CN': '设置面包屑尺寸大小',
Expand Down
6 changes: 5 additions & 1 deletion packages/vue/src/breadcrumb-item/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => ({})
Expand Down
6 changes: 5 additions & 1 deletion packages/vue/src/breadcrumb/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => []
Expand Down
Loading