fix(SwipeCell): should not trigger open event when opened (#10059)

This commit is contained in:
neverland 2021-12-17 20:59:48 +08:00 committed by GitHub
parent 0e0339ef6b
commit be7a08bd20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,13 +80,15 @@ export default defineComponent({
);
const open = (side: SwipeCellSide) => {
opened = true;
state.offset = side === 'left' ? leftWidth.value : -rightWidth.value;
emit('open', {
name: props.name,
position: side,
});
if (!opened) {
opened = true;
emit('open', {
name: props.name,
position: side,
});
}
};
const close = (position: SwipeCellPosition) => {