mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +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) {
|
export function readFileContent(file: File, resultType: ResultType) {
|
||||||
return new Promise((resolve) => {
|
return new Promise<string | ArrayBuffer | null | undefined>((resolve) => {
|
||||||
if (resultType === 'file') {
|
if (resultType === 'file') {
|
||||||
resolve();
|
resolve();
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { ComponentPublicInstance } from 'vue';
|
import { ComponentPublicInstance } from 'vue';
|
||||||
import { VueWrapper } from '@vue/test-utils';
|
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 {
|
return {
|
||||||
identifier: Date.now(),
|
identifier: Date.now(),
|
||||||
target: el,
|
target: el,
|
||||||
@ -47,7 +47,7 @@ export function trigger(
|
|||||||
|
|
||||||
// simulate drag gesture
|
// simulate drag gesture
|
||||||
export function triggerDrag(
|
export function triggerDrag(
|
||||||
el: Wrapper<Vue> | HTMLElement,
|
el: VueWrapper<ComponentPublicInstance> | HTMLElement,
|
||||||
x = 0,
|
x = 0,
|
||||||
y = 0
|
y = 0
|
||||||
): void {
|
): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user