diff --git a/src/swipe-cell/README.md b/src/swipe-cell/README.md index 2aebf36e9..139cd124f 100644 --- a/src/swipe-cell/README.md +++ b/src/swipe-cell/README.md @@ -103,10 +103,10 @@ export default { | Attribute | Description | Type | Default | |------|------|------|------| | name `v2.0.4` | Identifier of SwipeCell | *number \| string* | - | +| left-width | Width of the left swipe area | *number \| string* | `auto` | +| right-width | Width of the right swipe area | *number \| string* | `auto` | | before-close `v2.3.0` | Callback function before close | *Function* | - | | disabled | Whether to disabled swipe | *boolean* | `false` | -| left-width | Width of the left swipe area | *number* | `auto` | -| right-width | Width of the right swipe area | *number* | `auto` | | stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | *boolean* | `false` | ### Slots diff --git a/src/swipe-cell/README.zh-CN.md b/src/swipe-cell/README.zh-CN.md index 14a0c811c..cf4e58e99 100644 --- a/src/swipe-cell/README.zh-CN.md +++ b/src/swipe-cell/README.zh-CN.md @@ -111,10 +111,10 @@ export default { | 参数 | 说明 | 类型 | 默认值 | |------|------|------|------| | name `v2.0.4` | 标识符,可以在事件参数中获取到 | *number \| string* | - | +| left-width | 指定左侧滑动区域宽度,单位为`px` | *number \| string* | `auto` | +| right-width | 指定右侧滑动区域宽度,单位为`px` | *number \| string* | `auto` | | before-close `v2.3.0` | 关闭前的回调函数 | *Function* | - | | disabled | 是否禁用滑动 | *boolean* | `false` | -| left-width | 指定左侧滑动区域宽度 | *number* | `auto` | -| right-width | 指定右侧滑动区域宽度 | *number* | `auto` | | stop-propagation `v2.1.0` | 是否阻止滑动事件冒泡 | *boolean* | `false` | ### Slots diff --git a/src/swipe-cell/index.js b/src/swipe-cell/index.js index 4c0fea514..e8b778c27 100644 --- a/src/swipe-cell/index.js +++ b/src/swipe-cell/index.js @@ -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'); }, },