mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-07 00:09:49 +08:00
feat(SwipeCell): support dynamic set width (#2607)
This commit is contained in:
parent
954bb21d40
commit
10f903f8bb
@ -11,11 +11,21 @@ VantComponent({
|
|||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
leftWidth: {
|
leftWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: 0
|
value: 0,
|
||||||
|
observer(leftWidth = 0) {
|
||||||
|
if (this.offset > 0) {
|
||||||
|
this.swipeMove(leftWidth);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
rightWidth: {
|
rightWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
value: 0
|
value: 0,
|
||||||
|
observer(rightWidth = 0) {
|
||||||
|
if (this.offset < 0) {
|
||||||
|
this.swipeMove(-rightWidth);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
asyncClose: Boolean,
|
asyncClose: Boolean,
|
||||||
name: {
|
name: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user