chore: add trailingComma

This commit is contained in:
陈嘉涵
2020-01-19 11:57:09 +08:00
parent e841175fe8
commit 389d68884d
269 changed files with 2706 additions and 2702 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -21,5 +21,5 @@ export {
trigger,
triggerDrag,
mockScrollTop,
mockGetBoundingClientRect
mockGetBoundingClientRect,
};