-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
What problem does this feature solve?
When a component has many props, I want to wrap the props as an object, and at the same time I want some props of the object can have a default value.
What does the proposed API look like?
pageInfo: {
type: Object,
default: function() {
return {
ellipsis: {type: String, default: '...'},
totalPage: {type: Number, default: 40},
currentPage: {type: Number, default: 10},
pagePad: {type: Number, default: 2},
pageSize: {type: Number, default: 10},
preText: {type: String, default: '前一页'},
nextText: {type: String, default: '后一页'},
firstText: {type: String, default: '首页'},
lastText: {type: String, default: '尾页'},
onPageClick: {type: Function, default: function(){}}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels