chore: add trailingComma
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ const Empty = {
|
||||
render(h: CreateElement): ReturnType<CreateElement> {
|
||||
return h('div', [(this as any).$slots.default]);
|
||||
},
|
||||
inheritAttrs: false
|
||||
inheritAttrs: false,
|
||||
};
|
||||
|
||||
Vue.component('demo-block', Empty);
|
||||
|
||||
+6
-6
@@ -5,28 +5,28 @@ function mockHTMLElementOffset() {
|
||||
offsetParent: {
|
||||
get() {
|
||||
return this.parentNode || {};
|
||||
}
|
||||
},
|
||||
},
|
||||
offsetLeft: {
|
||||
get() {
|
||||
return parseFloat(window.getComputedStyle(this).marginLeft) || 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
offsetTop: {
|
||||
get() {
|
||||
return parseFloat(window.getComputedStyle(this).marginTop) || 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
offsetHeight: {
|
||||
get() {
|
||||
return parseFloat(window.getComputedStyle(this).height) || 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
offsetWidth: {
|
||||
get() {
|
||||
return parseFloat(window.getComputedStyle(this).width) || 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -12,7 +12,7 @@ function getTouch(el: HTMLElement | Window, x: number, y: number) {
|
||||
radiusX: 2.5,
|
||||
radiusY: 2.5,
|
||||
rotationAngle: 10,
|
||||
force: 0.5
|
||||
force: 0.5,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,14 +39,18 @@ export function trigger(
|
||||
clientY: y,
|
||||
touches: touchList,
|
||||
targetTouches: touchList,
|
||||
changedTouches: touchList
|
||||
changedTouches: touchList,
|
||||
});
|
||||
|
||||
el.dispatchEvent(event);
|
||||
}
|
||||
|
||||
// simulate drag gesture
|
||||
export function triggerDrag(el: Wrapper<Vue> | HTMLElement, x = 0, y = 0): void {
|
||||
export function triggerDrag(
|
||||
el: Wrapper<Vue> | HTMLElement,
|
||||
x = 0,
|
||||
y = 0
|
||||
): void {
|
||||
trigger(el, 'touchstart', 0, 0);
|
||||
trigger(el, 'touchmove', x / 4, y / 4);
|
||||
trigger(el, 'touchmove', x / 3, y / 3);
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ export {
|
||||
trigger,
|
||||
triggerDrag,
|
||||
mockScrollTop,
|
||||
mockGetBoundingClientRect
|
||||
mockGetBoundingClientRect,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user