mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 08:37:23 +00:00
[Improvement] Tabs: use touchend event to handle swipe (#695)
This commit is contained in:
@@ -147,12 +147,15 @@ describe('Tabs', () => {
|
||||
wrapper.vm.$nextTick(() => {
|
||||
triggerTouch(tabContent, 'touchstart', 0, 0);
|
||||
triggerTouch(tabContent, 'touchmove', -100, 0);
|
||||
triggerTouch(tabContent, 'touchend', 0, 0);
|
||||
|
||||
setTimeout(() => {
|
||||
expect(tabsContainer.vNode.child.curActive).to.equal(1);
|
||||
|
||||
triggerTouch(tabContent, 'touchstart', 0, 0);
|
||||
triggerTouch(tabContent, 'touchmove', 100, 0);
|
||||
triggerTouch(tabContent, 'touchend', 0, 0);
|
||||
|
||||
setTimeout(() => {
|
||||
expect(tabsContainer.vNode.child.curActive).to.equal(0);
|
||||
done();
|
||||
|
Reference in New Issue
Block a user