mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
chore: remove legacy type folder (#8266)
This commit is contained in:
parent
00f637da43
commit
7f91b4a6bb
5
types/address-edit.d.ts
vendored
5
types/address-edit.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class AddressEdit extends VanComponent {
|
|
||||||
setAddressDetail(val: string): void;
|
|
||||||
}
|
|
5
types/area.d.ts
vendored
5
types/area.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Area extends VanComponent {
|
|
||||||
reset(code?: string): void;
|
|
||||||
}
|
|
7
types/calendar.d.ts
vendored
7
types/calendar.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Calendar extends VanComponent {
|
|
||||||
reset(date?: Date | Date[]): void;
|
|
||||||
|
|
||||||
scrollToDate(date: Date): void;
|
|
||||||
}
|
|
10
types/checkbox-group.d.ts
vendored
10
types/checkbox-group.d.ts
vendored
@ -1,10 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export type ToggleAllOptions = {
|
|
||||||
checked?: boolean;
|
|
||||||
skipDisabled?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export class CheckboxGroup extends VanComponent {
|
|
||||||
toggleAll(options?: boolean | ToggleAllOptions): void;
|
|
||||||
}
|
|
5
types/checkbox.d.ts
vendored
5
types/checkbox.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Checkbox extends VanComponent {
|
|
||||||
toggle(checked?: boolean): void;
|
|
||||||
}
|
|
5
types/collapse-item.d.ts
vendored
5
types/collapse-item.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class CollapseItem extends VanComponent {
|
|
||||||
toggle(expanded?: boolean): void;
|
|
||||||
}
|
|
9
types/component.d.ts
vendored
9
types/component.d.ts
vendored
@ -1,9 +0,0 @@
|
|||||||
import { App } from 'vue';
|
|
||||||
|
|
||||||
export class VanComponent {
|
|
||||||
static name: string;
|
|
||||||
|
|
||||||
static install: (app: App) => any;
|
|
||||||
|
|
||||||
$props: Record<string, any>;
|
|
||||||
}
|
|
9
types/count-down.d.ts
vendored
9
types/count-down.d.ts
vendored
@ -1,9 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class CountDown extends VanComponent {
|
|
||||||
start(): void;
|
|
||||||
|
|
||||||
pause(): void;
|
|
||||||
|
|
||||||
reset(): void;
|
|
||||||
}
|
|
6
types/datetime-picker.d.ts
vendored
6
types/datetime-picker.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
import { Picker } from './picker';
|
|
||||||
|
|
||||||
export class DatetimePicker extends VanComponent {
|
|
||||||
getPicker(): Picker;
|
|
||||||
}
|
|
49
types/dialog.d.ts
vendored
49
types/dialog.d.ts
vendored
@ -1,49 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
import { TeleportProps } from 'vue';
|
|
||||||
|
|
||||||
type DialogAction = 'confirm' | 'cancel';
|
|
||||||
type DialogDone = (close?: boolean) => void;
|
|
||||||
|
|
||||||
export type DialogOptions = {
|
|
||||||
title?: string;
|
|
||||||
width?: string | number;
|
|
||||||
message?: string;
|
|
||||||
theme?: string;
|
|
||||||
overlay?: boolean;
|
|
||||||
teleport?: TeleportProps['to'];
|
|
||||||
className?: any;
|
|
||||||
allowHtml?: boolean;
|
|
||||||
lockScroll?: boolean;
|
|
||||||
transition?: string;
|
|
||||||
messageAlign?: string;
|
|
||||||
overlayClass?: string;
|
|
||||||
overlayStyle?: Record<string, any>;
|
|
||||||
closeOnPopstate?: boolean;
|
|
||||||
cancelButtonText?: string;
|
|
||||||
cancelButtonColor?: string;
|
|
||||||
confirmButtonText?: string;
|
|
||||||
confirmButtonColor?: string;
|
|
||||||
showConfirmButton?: boolean;
|
|
||||||
showCancelButton?: boolean;
|
|
||||||
closeOnClickOverlay?: boolean;
|
|
||||||
beforeClose?: (action: DialogAction, done: DialogDone) => void;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface Dialog {
|
|
||||||
(options: DialogOptions): Promise<DialogAction>;
|
|
||||||
alert(options: DialogOptions): Promise<DialogAction>;
|
|
||||||
confirm(options: DialogOptions): Promise<DialogAction>;
|
|
||||||
close(): void;
|
|
||||||
install(): void;
|
|
||||||
setDefaultOptions(options: DialogOptions): void;
|
|
||||||
resetDefaultOptions(): void;
|
|
||||||
Component: typeof VanComponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
|
||||||
$dialog: Dialog;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Dialog: Dialog;
|
|
5
types/dropdown-item.d.ts
vendored
5
types/dropdown-item.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class DropdownItem extends VanComponent {
|
|
||||||
toggle(show?: boolean): void;
|
|
||||||
}
|
|
7
types/field.d.ts
vendored
7
types/field.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Field extends VanComponent {
|
|
||||||
focus(): void;
|
|
||||||
|
|
||||||
blur(): void;
|
|
||||||
}
|
|
11
types/form.d.ts
vendored
11
types/form.d.ts
vendored
@ -1,11 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Form extends VanComponent {
|
|
||||||
submit(): void;
|
|
||||||
|
|
||||||
validate(name?: string | string[]): Promise<void>;
|
|
||||||
|
|
||||||
resetValidation(name?: string | string[]): void;
|
|
||||||
|
|
||||||
scrollToField(name: string, options?: boolean | ScrollIntoViewOptions): void;
|
|
||||||
}
|
|
42
types/image-preview.d.ts
vendored
42
types/image-preview.d.ts
vendored
@ -1,42 +0,0 @@
|
|||||||
import { TeleportProps } from 'vue';
|
|
||||||
import { VanComponent } from './component';
|
|
||||||
import { SwipeToOptions } from './swipe';
|
|
||||||
|
|
||||||
export type ImagePreviewOptions =
|
|
||||||
| string[]
|
|
||||||
| {
|
|
||||||
loop?: boolean;
|
|
||||||
images: string[];
|
|
||||||
maxZoom?: number;
|
|
||||||
minZoom?: number;
|
|
||||||
teleport?: TeleportProps['to'];
|
|
||||||
className?: any;
|
|
||||||
showIndex?: boolean;
|
|
||||||
closeable?: boolean;
|
|
||||||
closeIcon?: string;
|
|
||||||
beforeClose?: (active: number) => boolean | Promise<boolean>;
|
|
||||||
swipeDuration?: number;
|
|
||||||
startPosition?: number;
|
|
||||||
showIndicators?: boolean;
|
|
||||||
closeOnPopstate?: boolean;
|
|
||||||
closeIconPosition?: string;
|
|
||||||
onClose?(): void;
|
|
||||||
onChange?(index: number): void;
|
|
||||||
swipeTo?(index: number, options?: SwipeToOptions): void;
|
|
||||||
};
|
|
||||||
|
|
||||||
export class VanImagePreview {
|
|
||||||
images: string[];
|
|
||||||
|
|
||||||
showIndex: boolean;
|
|
||||||
|
|
||||||
startPosition: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ImagePreview {
|
|
||||||
(options: ImagePreviewOptions, startPosition?: number): VanImagePreview;
|
|
||||||
install(): void;
|
|
||||||
Component: typeof VanComponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ImagePreview: ImagePreview;
|
|
5
types/index-bar.d.ts
vendored
5
types/index-bar.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class IndexBar extends VanComponent {
|
|
||||||
scrollTo(index: number | string): void;
|
|
||||||
}
|
|
126
types/index.d.ts
vendored
126
types/index.d.ts
vendored
@ -1,126 +0,0 @@
|
|||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
import { App } from 'vue';
|
|
||||||
import { VanComponent } from './component';
|
|
||||||
import { AddressEdit } from './address-edit';
|
|
||||||
import { Area } from './area';
|
|
||||||
import { Calendar } from './calendar';
|
|
||||||
import { Checkbox } from './checkbox';
|
|
||||||
import { CheckboxGroup } from './checkbox-group';
|
|
||||||
import { CollapseItem } from './collapse-item';
|
|
||||||
import { CountDown } from './count-down';
|
|
||||||
import { DatetimePicker } from './datetime-picker';
|
|
||||||
import { Dialog } from './dialog';
|
|
||||||
import { DropdownItem } from './dropdown-item';
|
|
||||||
import { Field } from './field';
|
|
||||||
import { Form } from './form';
|
|
||||||
import { ImagePreview } from './image-preview';
|
|
||||||
import { IndexBar } from './index-bar';
|
|
||||||
import { Lazyload } from './lazyload';
|
|
||||||
import { List } from './list';
|
|
||||||
import { Locale } from './locale';
|
|
||||||
import { Notify } from './notify';
|
|
||||||
import { Picker } from './picker';
|
|
||||||
import { Progress } from './progress';
|
|
||||||
import { Search } from './search';
|
|
||||||
import { Sku } from './sku';
|
|
||||||
import { Swipe } from './swipe';
|
|
||||||
import { SwipeCell } from './swipe-cell';
|
|
||||||
import { Tabs } from './tabs';
|
|
||||||
import { Toast } from './toast';
|
|
||||||
import { Uploader } from './uploader';
|
|
||||||
|
|
||||||
export const version: string;
|
|
||||||
|
|
||||||
export const install: (app: App) => any;
|
|
||||||
|
|
||||||
export class ActionSheet extends VanComponent {}
|
|
||||||
export class AddressList extends VanComponent {}
|
|
||||||
export class Badge extends VanComponent {}
|
|
||||||
export class Button extends VanComponent {}
|
|
||||||
export class Card extends VanComponent {}
|
|
||||||
export class Cascader extends VanComponent {}
|
|
||||||
export class Cell extends VanComponent {}
|
|
||||||
export class CellGroup extends VanComponent {}
|
|
||||||
export class Circle extends VanComponent {}
|
|
||||||
export class Col extends VanComponent {}
|
|
||||||
export class Collapse extends VanComponent {}
|
|
||||||
export class ContactCard extends VanComponent {}
|
|
||||||
export class ContactEdit extends VanComponent {}
|
|
||||||
export class ContactList extends VanComponent {}
|
|
||||||
export class CouponCell extends VanComponent {}
|
|
||||||
export class CouponList extends VanComponent {}
|
|
||||||
export class Divider extends VanComponent {}
|
|
||||||
export class DropdownMenu extends VanComponent {}
|
|
||||||
export class Empty extends VanComponent {}
|
|
||||||
export class Grid extends VanComponent {}
|
|
||||||
export class GridItem extends VanComponent {}
|
|
||||||
export class ActionBar extends VanComponent {}
|
|
||||||
export class ActionBarIcon extends VanComponent {}
|
|
||||||
export class ActionBarButton extends VanComponent {}
|
|
||||||
export class Icon extends VanComponent {}
|
|
||||||
export class Image extends VanComponent {}
|
|
||||||
export class IndexAnchor extends VanComponent {}
|
|
||||||
export class Info extends VanComponent {}
|
|
||||||
export class Loading extends VanComponent {}
|
|
||||||
export class NavBar extends VanComponent {}
|
|
||||||
export class NoticeBar extends VanComponent {}
|
|
||||||
export class NumberKeyboard extends VanComponent {}
|
|
||||||
export class Overlay extends VanComponent {}
|
|
||||||
export class Pagination extends VanComponent {}
|
|
||||||
export class Panel extends VanComponent {}
|
|
||||||
export class PasswordInput extends VanComponent {}
|
|
||||||
export class Popover extends VanComponent {}
|
|
||||||
export class Popup extends VanComponent {}
|
|
||||||
export class PullRefresh extends VanComponent {}
|
|
||||||
export class Radio extends VanComponent {}
|
|
||||||
export class RadioGroup extends VanComponent {}
|
|
||||||
export class Rate extends VanComponent {}
|
|
||||||
export class Row extends VanComponent {}
|
|
||||||
export class ShareSheet extends VanComponent {}
|
|
||||||
export class Sidebar extends VanComponent {}
|
|
||||||
export class SidebarItem extends VanComponent {}
|
|
||||||
export class Skeleton extends VanComponent {}
|
|
||||||
export class Slider extends VanComponent {}
|
|
||||||
export class Step extends VanComponent {}
|
|
||||||
export class Stepper extends VanComponent {}
|
|
||||||
export class Steps extends VanComponent {}
|
|
||||||
export class Sticky extends VanComponent {}
|
|
||||||
export class SubmitBar extends VanComponent {}
|
|
||||||
export class SwipeItem extends VanComponent {}
|
|
||||||
export class Switch extends VanComponent {}
|
|
||||||
export class SwitchCell extends VanComponent {}
|
|
||||||
export class Tab extends VanComponent {}
|
|
||||||
export class Tabbar extends VanComponent {}
|
|
||||||
export class TabbarItem extends VanComponent {}
|
|
||||||
export class Tag extends VanComponent {}
|
|
||||||
export class TreeSelect extends VanComponent {}
|
|
||||||
|
|
||||||
export {
|
|
||||||
AddressEdit,
|
|
||||||
Area,
|
|
||||||
Calendar,
|
|
||||||
Checkbox,
|
|
||||||
CheckboxGroup,
|
|
||||||
CollapseItem,
|
|
||||||
CountDown,
|
|
||||||
DatetimePicker,
|
|
||||||
Dialog,
|
|
||||||
DropdownItem,
|
|
||||||
Form,
|
|
||||||
Field,
|
|
||||||
ImagePreview,
|
|
||||||
IndexBar,
|
|
||||||
Lazyload,
|
|
||||||
List,
|
|
||||||
Locale,
|
|
||||||
Notify,
|
|
||||||
Picker,
|
|
||||||
Progress,
|
|
||||||
Search,
|
|
||||||
Sku,
|
|
||||||
Swipe,
|
|
||||||
SwipeCell,
|
|
||||||
Tabs,
|
|
||||||
Toast,
|
|
||||||
Uploader,
|
|
||||||
};
|
|
5
types/lazyload.d.ts
vendored
5
types/lazyload.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { Plugin } from 'vue';
|
|
||||||
|
|
||||||
export type Lazyload = Plugin;
|
|
||||||
|
|
||||||
export const Lazyload: Lazyload;
|
|
5
types/list.d.ts
vendored
5
types/list.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class List extends VanComponent {
|
|
||||||
check(): void;
|
|
||||||
}
|
|
7
types/locale.d.ts
vendored
7
types/locale.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
export interface Locale {
|
|
||||||
install(): void;
|
|
||||||
use(lang: string, messages: Object): void;
|
|
||||||
add(messages: Object): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Locale: Locale;
|
|
42
types/notify.d.ts
vendored
42
types/notify.d.ts
vendored
@ -1,42 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export type NotifyMessage = string | number;
|
|
||||||
|
|
||||||
export type NotifyOptions = {
|
|
||||||
type?: 'primary' | 'success' | 'danger' | 'warning';
|
|
||||||
value?: boolean;
|
|
||||||
color?: string;
|
|
||||||
message?: NotifyMessage;
|
|
||||||
duration?: number;
|
|
||||||
className?: any;
|
|
||||||
background?: string;
|
|
||||||
onClose?: (() => void) | null;
|
|
||||||
onOpened?: (() => void) | null;
|
|
||||||
onClick?: ((event: Event) => void) | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface VanNotify {
|
|
||||||
message: NotifyMessage;
|
|
||||||
color: string;
|
|
||||||
background: string;
|
|
||||||
duration: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Notify {
|
|
||||||
(message: NotifyOptions | NotifyMessage): VanNotify;
|
|
||||||
clear(): void;
|
|
||||||
install(): void;
|
|
||||||
currentOptions: NotifyOptions;
|
|
||||||
defaultOptions: NotifyOptions;
|
|
||||||
setDefaultOptions(options: NotifyOptions): void;
|
|
||||||
resetDefaultOptions(): void;
|
|
||||||
Component: typeof VanComponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
|
||||||
$notify: Notify;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Notify: Notify;
|
|
25
types/picker.d.ts
vendored
25
types/picker.d.ts
vendored
@ -1,25 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Picker extends VanComponent {
|
|
||||||
getValues<T = string>(): T[];
|
|
||||||
|
|
||||||
setValues<T = string>(values: T[]): void;
|
|
||||||
|
|
||||||
getIndexes(): number[];
|
|
||||||
|
|
||||||
setIndexes(indexes: number[]): void;
|
|
||||||
|
|
||||||
getColumnValue<T = string>(columnIndex: number): T;
|
|
||||||
|
|
||||||
setColumnValue<T = string>(columnIndex: number, value: T): void;
|
|
||||||
|
|
||||||
getColumnIndex(columnIndex: number): number;
|
|
||||||
|
|
||||||
setColumnIndex(columnIndex: number, optionIndex: number): void;
|
|
||||||
|
|
||||||
getColumnValues<T = string>(columnIndex: number): T[];
|
|
||||||
|
|
||||||
setColumnValues<T = string>(columnIndex: number, values: T[]): void;
|
|
||||||
|
|
||||||
confirm(): void;
|
|
||||||
}
|
|
5
types/progress.d.ts
vendored
5
types/progress.d.ts
vendored
@ -1,5 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Progress extends VanComponent {
|
|
||||||
resize(): void;
|
|
||||||
}
|
|
7
types/search.d.ts
vendored
7
types/search.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Search extends VanComponent {
|
|
||||||
focus(): void;
|
|
||||||
|
|
||||||
blur(): void;
|
|
||||||
}
|
|
72
types/sku.d.ts
vendored
72
types/sku.d.ts
vendored
@ -1,72 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export type SkuData = {
|
|
||||||
price: string;
|
|
||||||
none_sku: boolean;
|
|
||||||
stock_num: number;
|
|
||||||
hide_stock: boolean;
|
|
||||||
collection_id: number;
|
|
||||||
tree: SkuTreeItemData[];
|
|
||||||
list: SkuListItemData[];
|
|
||||||
messages: SkuMessageData[];
|
|
||||||
properties: SkuPropItemData[];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuTreeItemData = {
|
|
||||||
k: string;
|
|
||||||
v: SkuTreeItemValueData[];
|
|
||||||
k_s: string;
|
|
||||||
is_multiple: never;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuTreeItemValueData = {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
imgUrl?: string;
|
|
||||||
img_url?: string;
|
|
||||||
previewImgUrl?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuPropItemData = {
|
|
||||||
k: string;
|
|
||||||
v: SkuPropItemValueData[];
|
|
||||||
k_id: number;
|
|
||||||
is_multiple?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuPropItemValueData = {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
price?: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuListItemData = {
|
|
||||||
id: number;
|
|
||||||
s1: string;
|
|
||||||
s2: string;
|
|
||||||
s3: string;
|
|
||||||
price: number;
|
|
||||||
stock_num: number;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuMessageData = {
|
|
||||||
name: string;
|
|
||||||
type: string;
|
|
||||||
required?: string;
|
|
||||||
datetime?: string;
|
|
||||||
multiple?: string;
|
|
||||||
placeholder?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SkuGoodsData = {
|
|
||||||
title: string;
|
|
||||||
picture: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SelectedSkuData = Record<string, string>;
|
|
||||||
|
|
||||||
export class Sku extends VanComponent {
|
|
||||||
getSkuData(): SkuData;
|
|
||||||
|
|
||||||
resetSelectedSku(): void;
|
|
||||||
}
|
|
7
types/swipe-cell.d.ts
vendored
7
types/swipe-cell.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class SwipeCell extends VanComponent {
|
|
||||||
open(position: 'left' | 'right'): void;
|
|
||||||
|
|
||||||
close(): void;
|
|
||||||
}
|
|
15
types/swipe.d.ts
vendored
15
types/swipe.d.ts
vendored
@ -1,15 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export type SwipeToOptions = {
|
|
||||||
immediate?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export class Swipe extends VanComponent {
|
|
||||||
prev(): void;
|
|
||||||
|
|
||||||
next(): void;
|
|
||||||
|
|
||||||
swipeTo(index: number, options?: SwipeToOptions): void;
|
|
||||||
|
|
||||||
resize(): void;
|
|
||||||
}
|
|
7
types/tabs.d.ts
vendored
7
types/tabs.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Tabs extends VanComponent {
|
|
||||||
resize(): void;
|
|
||||||
|
|
||||||
scrollTo(name: string | number): void;
|
|
||||||
}
|
|
60
types/toast.d.ts
vendored
60
types/toast.d.ts
vendored
@ -1,60 +0,0 @@
|
|||||||
import { TeleportProps } from 'vue';
|
|
||||||
|
|
||||||
type ToastMessage = string | number;
|
|
||||||
type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
|
|
||||||
type ToastPosition = 'top' | 'middle' | 'bottom';
|
|
||||||
type ToastLoadingType = 'circular' | 'spinner';
|
|
||||||
|
|
||||||
export type ToastOptions = {
|
|
||||||
icon?: string;
|
|
||||||
type?: ToastType;
|
|
||||||
mask?: boolean;
|
|
||||||
message?: ToastMessage;
|
|
||||||
onClose?: () => void;
|
|
||||||
onOpened?: () => void;
|
|
||||||
overlay?: boolean;
|
|
||||||
duration?: number;
|
|
||||||
teleport?: TeleportProps['to'];
|
|
||||||
position?: ToastPosition;
|
|
||||||
className?: any;
|
|
||||||
transition?: string;
|
|
||||||
iconPrefix?: string;
|
|
||||||
loadingType?: ToastLoadingType;
|
|
||||||
forbidClick?: boolean;
|
|
||||||
closeOnClick?: boolean;
|
|
||||||
overlayClass?: any;
|
|
||||||
overlayStyle?: Record<string, any>;
|
|
||||||
closeOnClickOverlay?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export interface VanToast {
|
|
||||||
type: ToastType;
|
|
||||||
position: ToastPosition;
|
|
||||||
loadingType: ToastLoadingType;
|
|
||||||
forbidClick: boolean;
|
|
||||||
message: ToastMessage;
|
|
||||||
clear(): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Toast {
|
|
||||||
(message: ToastOptions | ToastMessage, options?: ToastOptions): VanToast;
|
|
||||||
loading(options?: ToastOptions | ToastMessage): VanToast;
|
|
||||||
success(options?: ToastOptions | ToastMessage): VanToast;
|
|
||||||
fail(options?: ToastOptions | ToastMessage): VanToast;
|
|
||||||
clear(all?: boolean): void;
|
|
||||||
install(): void;
|
|
||||||
setDefaultOptions(
|
|
||||||
type: ToastType | ToastOptions,
|
|
||||||
options?: ToastOptions
|
|
||||||
): void;
|
|
||||||
resetDefaultOptions(options?: string): void;
|
|
||||||
allowMultiple(allow: boolean): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
|
||||||
interface ComponentCustomProperties {
|
|
||||||
$toast: Toast;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const Toast: Toast;
|
|
7
types/uploader.d.ts
vendored
7
types/uploader.d.ts
vendored
@ -1,7 +0,0 @@
|
|||||||
import { VanComponent } from './component';
|
|
||||||
|
|
||||||
export class Uploader extends VanComponent {
|
|
||||||
closeImagePreview(): void;
|
|
||||||
|
|
||||||
chooseFile(): void;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user