mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-10 06:29:46 +08:00
fix(SwipeCell): should not trigger open event when opened (#10059)
This commit is contained in:
parent
0e0339ef6b
commit
be7a08bd20
@ -80,13 +80,15 @@ export default defineComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const open = (side: SwipeCellSide) => {
|
const open = (side: SwipeCellSide) => {
|
||||||
opened = true;
|
|
||||||
state.offset = side === 'left' ? leftWidth.value : -rightWidth.value;
|
state.offset = side === 'left' ? leftWidth.value : -rightWidth.value;
|
||||||
|
|
||||||
emit('open', {
|
if (!opened) {
|
||||||
name: props.name,
|
opened = true;
|
||||||
position: side,
|
emit('open', {
|
||||||
});
|
name: props.name,
|
||||||
|
position: side,
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const close = (position: SwipeCellPosition) => {
|
const close = (position: SwipeCellPosition) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user