@shijunhao/tyler-element
Version:
仿elementUI的学习项目,提供一些基础组件
1,067 lines (942 loc) • 38.5 kB
TypeScript
import { AllowedComponentProps } from 'vue';
import { App } from 'vue';
import { ComponentCustomProperties } from 'vue';
import { ComponentCustomProps } from 'vue';
import { ComponentInternalInstance } from 'vue';
import { ComponentOptionsBase } from 'vue';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { ComponentPublicInstance } from 'vue';
import { DebuggerEvent } from 'vue';
import { DefineComponent } from 'vue';
import { FontAwesomeIconProps } from '@fortawesome/vue-fontawesome';
import { FunctionalComponent } from 'vue';
import { GlobalComponents } from 'vue';
import { GlobalDirectives } from 'vue';
import { InjectionKey } from 'vue';
import { nextTick } from 'vue';
import { OnCleanup } from '@vue/reactivity';
import { Placement } from '@floating-ui/vue';
import { Placement as Placement_2 } from '@floating-ui/utils';
import { PublicProps } from 'vue';
import { Ref } from 'vue';
import { RendererElement } from 'vue';
import { RendererNode } from 'vue';
import { RuleItem } from 'async-validator';
import { ShallowUnwrapRef } from 'vue';
import { Slot } from 'vue';
import { ValidateError } from 'async-validator';
import { ValidateFieldsError } from 'async-validator';
import { VNode } from 'vue';
import { VNodeProps } from 'vue';
import { WatchOptions } from 'vue';
import { WatchStopHandle } from 'vue';
declare const __VLS_component: DefineComponent<ButtonProps, {
buttonEl: Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
nativeType: NativeType;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
_refButton: HTMLButtonElement;
}, HTMLButtonElement>;
declare const __VLS_component_10: DefineComponent<UploadProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<UploadProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
input: HTMLInputElement;
}, HTMLDivElement>;
declare const __VLS_component_11: DefineComponent<DropperProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
fileDrop: (file: FileList) => any;
}, string, PublicProps, Readonly<DropperProps> & Readonly<{
onFileDrop?: ((file: FileList) => any) | undefined;
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare const __VLS_component_2: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (value: NameType[]) => any;
} & {
"update:modelValue": (values: NameType[]) => any;
change: (values: NameType[]) => any;
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:modelValue"?: ((value: NameType[]) => any) | undefined;
onChange?: ((values: NameType[]) => any) | undefined;
}>, {
modelValue: CollapseProps["modelValue"];
accordion: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
declare const __VLS_component_3: DefineComponent<CollapseItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
declare const __VLS_component_4: DefineComponent<DropdownProps, {
show: () => void;
hide: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
select: (value: MenuOption) => any;
"visible-change": (value: boolean) => any;
}, string, PublicProps, Readonly<DropdownProps> & Readonly<{
onSelect?: ((value: MenuOption) => any) | undefined;
"onVisible-change"?: ((value: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
tooltipRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly content?: string | undefined;
readonly trigger?: ("hover" | "click") | undefined;
readonly placement?: Placement_2 | undefined;
readonly transition?: string | undefined;
readonly openDelay?: number | undefined;
readonly closeDelay?: number | undefined;
readonly "onVisible-change"?: ((value: boolean) => any) | undefined;
readonly "onClick-outside"?: ((value: boolean) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
popperContainerNode: HTMLDivElement;
triggerNode: HTMLDivElement;
popperNode: HTMLDivElement;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "visible-change", value: boolean) => void) & ((event: "click-outside", value: boolean) => void);
$el: HTMLDivElement;
$options: ComponentOptionsBase<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, {
show: () => void;
hide: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"visible-change": (value: boolean) => any;
"click-outside": (value: boolean) => any;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, "show" | "hide"> & ShallowUnwrapRef< {
show: () => void;
hide: () => void;
}> & {} & ComponentCustomProperties & {} & {
$slots: {
default?(_: {}): any;
content?(_: {}): any;
};
}) | null;
}, HTMLDivElement>;
declare const __VLS_component_5: DefineComponent<FormProps, {
validate: () => Promise<any>;
resetFields: (props?: string[]) => void;
clearValidate: (props?: string[]) => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FormProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLFormElement>;
declare const __VLS_component_6: DefineComponent<FormItemProps, {
validateStatus: ValidateStatusProp;
validate: (trigger?: string) => Promise<any>;
resetField(): void;
clearValidate(): void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FormItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
declare const __VLS_component_7: DefineComponent<MessageProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MessageProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
messageRef: HTMLDivElement;
}, any>;
declare const __VLS_component_8: DefineComponent<__VLS_PublicProps_2, {
ref: Ref<HTMLInputElement | HTMLTextAreaElement | undefined, HTMLInputElement | HTMLTextAreaElement | undefined>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (value: string | number | undefined) => any;
} & {
input: (value: string | number) => any;
clear: () => any;
change: (value: string | number) => any;
blur: (value: FocusEvent) => any;
focus: (value: FocusEvent) => any;
"update:modalValue": (value: string | number) => any;
}, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
onInput?: ((value: string | number) => any) | undefined;
onClear?: (() => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
onChange?: ((value: string | number) => any) | undefined;
onBlur?: ((value: FocusEvent) => any) | undefined;
onFocus?: ((value: FocusEvent) => any) | undefined;
"onUpdate:modalValue"?: ((value: string | number) => any) | undefined;
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
inputRef: HTMLTextAreaElement;
}, any>;
declare const __VLS_component_9: DefineComponent<TooltipProps, {
show: () => void;
hide: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"visible-change": (value: boolean) => any;
"click-outside": (value: boolean) => any;
}, string, PublicProps, Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
popperContainerNode: HTMLDivElement;
triggerNode: HTMLDivElement;
popperNode: HTMLDivElement;
}, HTMLDivElement>;
declare type __VLS_Props = CollapseProps;
declare type __VLS_Props_2 = InputProps;
declare type __VLS_PublicProps = {
modelValue?: CollapseProps['modelValue'];
} & __VLS_Props;
declare type __VLS_PublicProps_2 = {
modelValue?: InputProps['modalValue'];
} & __VLS_Props_2;
declare function __VLS_template(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {
_refButton: HTMLButtonElement;
};
rootEl: HTMLButtonElement;
};
declare function __VLS_template_10(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
default?(_: {
handle: () => void;
}): any;
};
refs: {
input: HTMLInputElement;
};
rootEl: HTMLDivElement;
};
declare function __VLS_template_11(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {};
rootEl: any;
};
declare function __VLS_template_2(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {};
rootEl: HTMLDivElement;
};
declare function __VLS_template_3(): {
attrs: Partial<{}>;
slots: {
title?(_: {}): any;
default?(_: {}): any;
};
refs: {};
rootEl: HTMLDivElement;
};
declare function __VLS_template_4(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {
tooltipRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly content?: string | undefined;
readonly trigger?: ("hover" | "click") | undefined;
readonly placement?: Placement_2 | undefined;
readonly transition?: string | undefined;
readonly openDelay?: number | undefined;
readonly closeDelay?: number | undefined;
readonly "onVisible-change"?: ((value: boolean) => any) | undefined;
readonly "onClick-outside"?: ((value: boolean) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
popperContainerNode: HTMLDivElement;
triggerNode: HTMLDivElement;
popperNode: HTMLDivElement;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "visible-change", value: boolean) => void) & ((event: "click-outside", value: boolean) => void);
$el: HTMLDivElement;
$options: ComponentOptionsBase<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, {
show: () => void;
hide: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"visible-change": (value: boolean) => any;
"click-outside": (value: boolean) => any;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, "show" | "hide"> & ShallowUnwrapRef< {
show: () => void;
hide: () => void;
}> & {} & ComponentCustomProperties & {} & {
$slots: {
default?(_: {}): any;
content?(_: {}): any;
};
}) | null;
};
rootEl: HTMLDivElement;
};
declare function __VLS_template_5(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {};
rootEl: HTMLFormElement;
};
declare function __VLS_template_6(): {
attrs: Partial<{}>;
slots: {
label?(_: {
label: string;
}): any;
default?(_: {
validate: (trigger?: string) => Promise<true | void>;
}): any;
};
refs: {};
rootEl: HTMLDivElement;
};
declare function __VLS_template_7(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
};
refs: {
messageRef: HTMLDivElement;
};
rootEl: any;
};
declare function __VLS_template_8(): {
attrs: Partial<{}>;
slots: Readonly<InputSlots> & InputSlots;
refs: {
inputRef: HTMLTextAreaElement;
};
rootEl: any;
};
declare function __VLS_template_9(): {
attrs: Partial<{}>;
slots: {
default?(_: {}): any;
content?(_: {}): any;
};
refs: {
popperContainerNode: HTMLDivElement;
triggerNode: HTMLDivElement;
popperNode: HTMLDivElement;
};
rootEl: HTMLDivElement;
};
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
declare type __VLS_TemplateResult_5 = ReturnType<typeof __VLS_template_5>;
declare type __VLS_TemplateResult_6 = ReturnType<typeof __VLS_template_6>;
declare type __VLS_TemplateResult_7 = ReturnType<typeof __VLS_template_7>;
declare type __VLS_TemplateResult_8 = ReturnType<typeof __VLS_template_8>;
declare type __VLS_TemplateResult_9 = ReturnType<typeof __VLS_template_9>;
declare type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_10<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_11<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_5<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_6<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_7<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_8<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithTemplateSlots_9<T, S> = T & {
new (): {
$slots: S;
};
};
export declare const Button: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
export declare interface ButtonInstance {
buttonEl: HTMLButtonElement;
}
export declare interface ButtonProps {
type?: ButtonType;
size?: ButtonSize;
plain?: boolean;
round?: boolean;
circle?: boolean;
disabled?: boolean;
nativeType?: NativeType;
autofocus?: boolean;
icon?: string;
loading?: boolean;
}
export declare type ButtonSize = 'large' | 'small';
export declare type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
export declare const Collapse: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
export declare interface CollapseContext {
activeNames: Ref<NameType[]>;
handleItemClick: (itemName: NameType) => void;
}
export declare const CollapseContextKey: InjectionKey<CollapseContext>;
export declare interface CollapseEmites {
(e: 'update:modelValue', values: NameType[]): void;
(e: 'change', values: NameType[]): void;
}
export declare const CollapseItem: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
export declare interface CollapseItemProps {
name: NameType;
title?: string;
disabled?: boolean;
}
export declare interface CollapseProps {
modelValue: NameType[];
accordion?: boolean;
}
export declare const createMessage: (props: CreateMessageProps) => {
id: string;
vnode: VNode<RendererNode, RendererElement, {
[key: string]: any;
}>;
destroy: () => void;
container: HTMLDivElement;
originPropOffset: number;
};
export declare type CreateMessageProps = Omit<MessageProps, 'destroy' | 'id' | 'zIndex' | 'onClickClose'>;
export declare type CustomFilterFunc = (value: string) => SelectOption[];
export declare type CustomFilterRemoteFunc = (value: string) => Promise<SelectOption[]>;
declare const _default: {
install: (app: App) => void;
};
export default _default;
export declare const destroyAll: () => void;
export declare const Dropdown: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
export declare interface DropdownEmits {
(e: 'visible-change', value: boolean): void;
(e: 'select', value: MenuOption): void;
}
export declare interface DropdownInstance {
show: () => void;
hide: () => void;
}
export declare interface DropdownProps extends TooltipProps {
menuOptions: MenuOption[];
hideAfterClick?: boolean;
}
export declare interface DropperEmits {
fileDrop(files: FileList): void;
}
export declare interface DropperProps {
is?: string;
}
export declare const DropZone: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
export declare const Form: __VLS_WithTemplateSlots_5<typeof __VLS_component_5, __VLS_TemplateResult_5["slots"]>;
export declare interface FormContext extends FormProps {
addField: (field: FormItemContext) => void;
removeField: (field: FormItemContext) => void;
}
export declare const formContextKey: InjectionKey<FormContext>;
export declare interface FormInstance {
validate: () => Promise<any>;
resetFields: (props?: string[]) => void;
clearValidate: (props?: string[]) => void;
}
export declare const FormItem: __VLS_WithTemplateSlots_6<typeof __VLS_component_6, __VLS_TemplateResult_6["slots"]>;
export declare interface FormItemContext {
prop: string;
validate: (trigger?: string) => Promise<any>;
resetField(): void;
clearValidate(): void;
}
export declare const formItemContextKey: InjectionKey<FormItemContext>;
export declare interface FormItemInstance {
validateStatus: ValidateStatusProp;
validate: (trigger?: string) => Promise<any>;
resetField(): void;
clearValidate(): void;
}
export declare interface FormItemProps {
label: string;
prop?: string;
}
export declare interface FormItemRule extends RuleItem {
trigger?: string;
}
export declare interface FormProps {
model: Record<string, any>;
rules: FormRules;
}
export declare type FormRules = Record<string, FormItemRule[]>;
export declare interface FormValidateFailure {
errors: ValidateError[] | null;
fields: ValidateFieldsError;
}
export declare const Icon: DefineComponent<IconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
export declare interface IconProps extends FontAwesomeIconProps {
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
color?: string;
}
export declare const Input: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
export declare interface InputEmits {
(e: 'update:modalValue', value: string | number): void;
(e: 'input', value: string | number): void;
(e: 'change', value: string | number): void;
(e: 'focus', value: FocusEvent): void;
(e: 'blur', value: FocusEvent): void;
(e: 'clear'): void;
}
export declare interface InputInstance {
ref: HTMLInputElement | HTMLTextAreaElement;
}
export declare interface InputProps {
type?: string;
modalValue?: string | number;
size?: 'large' | 'small';
disabled?: boolean;
clearable?: boolean;
showPassword?: boolean;
placeholder?: string;
readonly?: boolean;
autocomplete?: string;
autofocus?: boolean;
form?: string;
}
export declare interface InputSlots {
prepend?: () => void;
prefix?: () => void;
suffix?: () => void;
append?: () => void;
}
export declare const install: (app: App) => void;
export declare interface MenuOption {
label: string | VNode;
key: string | number;
disabled?: boolean;
divided?: boolean;
}
export declare const Message: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
export declare interface MessageContext {
id: string;
vnode: VNode;
container: HTMLElement;
originPropOffset: number;
destroy: () => void;
}
export declare interface MessageProps {
message: string | VNode;
duration?: number;
showClose?: boolean;
type?: 'success' | 'info' | 'warning' | 'danger';
destroy: () => void;
zIndex: number;
offset?: number;
transitionName?: string;
disableEsc?: boolean;
}
/**
* $END$
* @author tylerzzheng
*/
export declare type NameType = string | number;
export declare type NativeType = 'button' | 'submit' | 'reset';
export declare const Progress: FunctionalComponent<ProgressProps>;
export declare interface ProgressProps {
percent: number;
strokeHeight?: number;
showText?: boolean;
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
}
export declare type RenderLabelFunc = (option: SelectOption) => VNode;
export declare const Select: DefineComponent<SelectProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
clear: () => any;
"update:modelValue": (value: string) => any;
change: (value: string) => any;
"visible-change": (value: boolean) => any;
}, string, PublicProps, Readonly<SelectProps> & Readonly<{
onClear?: (() => any) | undefined;
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
onChange?: ((value: string) => any) | undefined;
"onVisible-change"?: ((value: boolean) => any) | undefined;
}>, {
options: SelectOption[];
}, {}, {}, {}, string, ComponentProvideOptions, false, {
tooltipRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly content?: string | undefined;
readonly trigger?: ("hover" | "click") | undefined;
readonly placement?: Placement_2 | undefined;
readonly transition?: string | undefined;
readonly openDelay?: number | undefined;
readonly closeDelay?: number | undefined;
readonly "onVisible-change"?: ((value: boolean) => any) | undefined;
readonly "onClick-outside"?: ((value: boolean) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
popperContainerNode: HTMLDivElement;
triggerNode: HTMLDivElement;
popperNode: HTMLDivElement;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "visible-change", value: boolean) => void) & ((event: "click-outside", value: boolean) => void);
$el: HTMLDivElement;
$options: ComponentOptionsBase<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, {
show: () => void;
hide: () => void;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"visible-change": (value: boolean) => any;
"click-outside": (value: boolean) => any;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<TooltipProps> & Readonly<{
"onVisible-change"?: ((value: boolean) => any) | undefined;
"onClick-outside"?: ((value: boolean) => any) | undefined;
}>, "show" | "hide"> & ShallowUnwrapRef< {
show: () => void;
hide: () => void;
}> & {} & ComponentCustomProperties & {} & {
$slots: {
default?(_: {}): any;
content?(_: {}): any;
};
}) | null;
inputRef: ({
$: ComponentInternalInstance;
$data: {};
$props: {
readonly modelValue?: InputProps["modalValue"];
readonly type?: string | undefined;
readonly modalValue?: (string | number) | undefined;
readonly size?: ("large" | "small") | undefined;
readonly disabled?: boolean | undefined;
readonly clearable?: boolean | undefined;
readonly showPassword?: boolean | undefined;
readonly placeholder?: string | undefined;
readonly readonly?: boolean | undefined;
readonly autocomplete?: string | undefined;
readonly autofocus?: boolean | undefined;
readonly form?: string | undefined;
readonly onInput?: ((value: string | number) => any) | undefined;
readonly onClear?: (() => any) | undefined;
readonly "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
readonly onChange?: ((value: string | number) => any) | undefined;
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
readonly onFocus?: ((value: FocusEvent) => any) | undefined;
readonly "onUpdate:modalValue"?: ((value: string | number) => any) | undefined;
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
} & {
inputRef: HTMLTextAreaElement;
};
$slots: Readonly<{
[name: string]: Slot<any> | undefined;
}>;
$root: ComponentPublicInstance | null;
$parent: ComponentPublicInstance | null;
$host: Element | null;
$emit: ((event: "input", value: string | number) => void) & ((event: "clear") => void) & ((event: "update:modelValue", value: string | number | undefined) => void) & ((event: "change", value: string | number) => void) & ((event: "blur", value: FocusEvent) => void) & ((event: "focus", value: FocusEvent) => void) & ((event: "update:modalValue", value: string | number) => void);
$el: any;
$options: ComponentOptionsBase<Readonly<{
modelValue?: InputProps["modalValue"];
} & InputProps> & Readonly<{
onInput?: ((value: string | number) => any) | undefined;
onClear?: (() => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
onChange?: ((value: string | number) => any) | undefined;
onBlur?: ((value: FocusEvent) => any) | undefined;
onFocus?: ((value: FocusEvent) => any) | undefined;
"onUpdate:modalValue"?: ((value: string | number) => any) | undefined;
}>, {
ref: Ref<HTMLInputElement | HTMLTextAreaElement | undefined, HTMLInputElement | HTMLTextAreaElement | undefined>;
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (value: string | number | undefined) => any;
} & {
input: (value: string | number) => any;
clear: () => any;
change: (value: string | number) => any;
blur: (value: FocusEvent) => any;
focus: (value: FocusEvent) => any;
"update:modalValue": (value: string | number) => any;
}, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
beforeCreate?: (() => void) | (() => void)[];
created?: (() => void) | (() => void)[];
beforeMount?: (() => void) | (() => void)[];
mounted?: (() => void) | (() => void)[];
beforeUpdate?: (() => void) | (() => void)[];
updated?: (() => void) | (() => void)[];
activated?: (() => void) | (() => void)[];
deactivated?: (() => void) | (() => void)[];
beforeDestroy?: (() => void) | (() => void)[];
beforeUnmount?: (() => void) | (() => void)[];
destroyed?: (() => void) | (() => void)[];
unmounted?: (() => void) | (() => void)[];
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
};
$forceUpdate: () => void;
$nextTick: nextTick;
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
} & Readonly<{}> & Omit<Readonly<{
modelValue?: InputProps["modalValue"];
} & InputProps> & Readonly<{
onInput?: ((value: string | number) => any) | undefined;
onClear?: (() => any) | undefined;
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
onChange?: ((value: string | number) => any) | undefined;
onBlur?: ((value: FocusEvent) => any) | undefined;
onFocus?: ((value: FocusEvent) => any) | undefined;
"onUpdate:modalValue"?: ((value: string | number) => any) | undefined;
}>, "ref"> & ShallowUnwrapRef< {
ref: Ref<HTMLInputElement | HTMLTextAreaElement | undefined, HTMLInputElement | HTMLTextAreaElement | undefined>;
}> & {} & ComponentCustomProperties & {} & {
$slots: Readonly<InputSlots> & InputSlots;
}) | null;
}, HTMLDivElement>;
export declare interface SelectEmits {
(e: 'change', value: string): void;
(e: 'update:modelValue', value: string): void;
(e: 'visible-change', value: boolean): void;
(e: 'clear'): void;
}
export declare interface SelectOption {
label: string;
value: string;
disabled?: boolean;
}
export declare interface SelectProps {
modelValue: string;
options?: SelectOption[];
placeholder: string;
disabled?: boolean;
clearable?: boolean;
renderLabel?: RenderLabelFunc;
filterable?: boolean;
filterMethod?: CustomFilterFunc;
remote?: boolean;
remoteMethod?: CustomFilterRemoteFunc;
}
export declare interface SelectStates {
inputValue: string;
selectedOption: null | SelectOption;
mouseHover: boolean;
loading: boolean;
highlightIndex: number;
}
export declare const Switch: DefineComponent<SwtichProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
"update:modelValue": (value: SwitchValueType) => any;
change: (value: SwitchValueType) => any;
}, string, PublicProps, Readonly<SwtichProps> & Readonly<{
"onUpdate:modelValue"?: ((value: SwitchValueType) => any) | undefined;
onChange?: ((value: SwitchValueType) => any) | undefined;
}>, {
activeValue: SwitchValueType;
inactiveValue: SwitchValueType;
}, {}, {}, {}, string, ComponentProvideOptions, false, {
inputEl: HTMLInputElement;
}, any>;
export declare type SwitchValueType = boolean | string | number;
export declare interface SwtichEmits {
(e: 'update:modelValue', value: SwitchValueType): void;
(e: 'change', value: SwitchValueType): void;
}
export declare interface SwtichProps {
modelValue: SwitchValueType;
disabled?: boolean;
activeText?: string;
inactiveText?: string;
activeValue?: SwitchValueType;
inactiveValue?: SwitchValueType;
name?: string;
id?: string;
size?: 'small' | 'large';
}
export declare const Tooltip: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
export declare interface TooltipEmits {
(e: 'visible-change', value: boolean): void;
(e: 'click-outside', value: boolean): void;
}
export declare interface TooltipInstance {
show: () => void;
hide: () => void;
}
export declare interface TooltipProps {
content?: string;
trigger?: 'hover' | 'click';
placement?: Placement;
transition?: string;
openDelay?: number;
closeDelay?: number;
}
export declare const Upload: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
export declare interface UploadFile {
name: string;
size: number;
uid: string;
status: UploadFileStatus;
percent?: number;
raw?: File;
response?: any;
error?: any;
}
export declare type UploadFileStatus = 'ready' | 'uploading' | 'success' | 'error';
export declare const UploadList: DefineComponent<UploadListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<UploadListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLUListElement>;
export declare interface UploadListProps {
fileList: UploadFile[];
onRemove: (_file: UploadFile) => void;
}
export declare interface UploadProps {
action: string;
multiple?: boolean;
defaultFileList?: UploadFile[];
beforeUpload?: (file: File) => boolean | Promise<File>;
onProgress?: (percentage: number, file: File) => void;
onSuccess?: (data: any, file: File) => void;
onError?: (error: any, file: File) => void;
onChange?: (file: File) => void;
onRemove?: (file: UploadFile) => void;
headers?: {
[key: string]: any;
};
name?: string;
data?: {
[key: string]: any;
};
withCredentials?: boolean;
accept?: string;
drag?: boolean;
}
export declare interface ValidateStatusProp {
state: 'init' | 'success' | 'error';
errorMsg: string;
loading: boolean;
}
export { }