mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
types: fix errors
This commit is contained in:
parent
c57f4a80b4
commit
daa55f805b
@ -9,7 +9,7 @@ export function toArray<T>(item: T | T[]): T[] {
|
||||
}
|
||||
|
||||
export function readFileContent(file: File, resultType: ResultType) {
|
||||
return new Promise((resolve) => {
|
||||
return new Promise<string | ArrayBuffer | null | undefined>((resolve) => {
|
||||
if (resultType === 'file') {
|
||||
resolve();
|
||||
return;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ComponentPublicInstance } from 'vue';
|
||||
import { VueWrapper } from '@vue/test-utils';
|
||||
|
||||
function getTouch(el: HTMLElement | Window, x: number, y: number) {
|
||||
function getTouch(el: Element | Window, x: number, y: number) {
|
||||
return {
|
||||
identifier: Date.now(),
|
||||
target: el,
|
||||
@ -47,7 +47,7 @@ export function trigger(
|
||||
|
||||
// simulate drag gesture
|
||||
export function triggerDrag(
|
||||
el: Wrapper<Vue> | HTMLElement,
|
||||
el: VueWrapper<ComponentPublicInstance> | HTMLElement,
|
||||
x = 0,
|
||||
y = 0
|
||||
): void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user