mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-09 21:18:12 +08:00
feat(SwipeCell): add name prop (#2062)
This commit is contained in:
parent
aa32f2441e
commit
d1169348ae
@ -63,6 +63,7 @@ Page({
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
|------|------|------|------|------|
|
|------|------|------|------|------|
|
||||||
|
| name | 标识符,可以在 close 事件的参数中获取到 | *string \| number* | - | - |
|
||||||
| left-width | 左侧滑动区域宽度 | *number* | `0` | - |
|
| left-width | 左侧滑动区域宽度 | *number* | `0` | - |
|
||||||
| right-width | 右侧滑动区域宽度 | *number* | `0` | - |
|
| right-width | 右侧滑动区域宽度 | *number* | `0` | - |
|
||||||
| async-close | 是否异步关闭 | *boolean* | `false` | - |
|
| async-close | 是否异步关闭 | *boolean* | `false` | - |
|
||||||
|
@ -15,7 +15,11 @@ VantComponent({
|
|||||||
type: Number,
|
type: Number,
|
||||||
value: 0
|
value: 0
|
||||||
},
|
},
|
||||||
asyncClose: Boolean
|
asyncClose: Boolean,
|
||||||
|
name: {
|
||||||
|
type: [Number, String],
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [touch],
|
mixins: [touch],
|
||||||
@ -132,7 +136,7 @@ VantComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.data.asyncClose) {
|
if (this.data.asyncClose) {
|
||||||
this.$emit('close', { position, instance: this });
|
this.$emit('close', { position, instance: this, name: this.data.name });
|
||||||
} else {
|
} else {
|
||||||
this.swipeMove(0);
|
this.swipeMove(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user