feat(SwipeCell): left-width、right-width can be string

This commit is contained in:
陈嘉涵
2020-01-31 10:07:04 +08:00
parent e9f96393f9
commit 526202cc40
3 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -23,10 +23,10 @@ export default createComponent({
// @deprecated
// should be removed in next major version, use beforeClose instead
onClose: Function,
beforeClose: Function,
disabled: Boolean,
leftWidth: Number,
rightWidth: Number,
leftWidth: [Number, String],
rightWidth: [Number, String],
beforeClose: Function,
stopPropagation: Boolean,
name: {
type: [Number, String],
@@ -43,11 +43,11 @@ export default createComponent({
computed: {
computedLeftWidth() {
return this.leftWidth || this.getWidthByRef('left');
return +this.leftWidth || this.getWidthByRef('left');
},
computedRightWidth() {
return this.rightWidth || this.getWidthByRef('right');
return +this.rightWidth || this.getWidthByRef('right');
},
},