zl-arco-comp
Version:
install ``` npm install zl-arco-comp ```
428 lines (349 loc) • 11.9 kB
TypeScript
import { App } from 'vue';
import { Component } from 'vue';
import { ComponentOptionsMixin } from 'vue';
import { ComponentProvideOptions } from 'vue';
import { DefineComponent } from 'vue';
import { PaginationProps } from '@arco-design/web-vue';
import { PublicProps } from 'vue';
import { SlotsType } from 'vue';
import { TableColumnData } from '@arco-design/web-vue';
import { TableData } from '@arco-design/web-vue';
import { VNodeProps } from 'vue';
declare const __VLS_component: DefineComponent< {}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
declare const __VLS_component_2: DefineComponent<__VLS_Props, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
autoBorderRadius: boolean | Function;
occupiedHeight: number;
isFirst: () => boolean;
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
declare const __VLS_component_3: DefineComponent<ISearchBoxProps, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
search: (page?: number, limit?: number) => any;
reset: () => any;
}, string, PublicProps, Readonly<ISearchBoxProps> & Readonly<{
onSearch?: (page?: number, limit?: number) => any;
onReset?: () => any;
}>, {
hideLine: boolean;
formItemWidth: string;
openSearchItem: boolean;
defaultItem: string[];
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
declare const __VLS_component_4: DefineComponent<__VLS_PublicProps, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
"update:modelValue": (value: any) => any;
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
"onUpdate:modelValue"?: (value: any) => any;
}>, {
trigger: TTrigger_2;
position: TPosition;
duration: number;
popupOffset: number;
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
declare const __VLS_component_5: DefineComponent<ITableProps, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
pageChange: (page: number, limit: number) => any;
}, string, PublicProps, Readonly<ITableProps> & Readonly<{
onPageChange?: (page: number, limit: number) => any;
}>, {
data: TableData;
scroll: {
x?: number | string;
y?: number | string;
};
loading: boolean;
columns: TableColumnData[];
total: number;
page: number;
limit: number;
noCache: boolean;
hideOperate: boolean;
operateWidth: number;
pagination: PaginationProps;
pageSizeOptions: number[];
tableHeaderSplitLine: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare const __VLS_component_6: DefineComponent<IDialogProps, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
cancel: () => any;
"update:visible": (visible: boolean) => any;
ok: () => any;
}, string, PublicProps, Readonly<IDialogProps> & Readonly<{
onCancel?: () => any;
"onUpdate:visible"?: (visible: boolean) => any;
onOk?: () => any;
}>, {
width: number | string;
title: string;
visible: boolean;
titleAlign: TTitleAlign;
hideCustomFooter: boolean;
maskClosable: boolean;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare type __VLS_Props = {
autoBorderRadius?: boolean | Function;
occupiedHeight?: number;
isFirst?: () => boolean;
};
declare type __VLS_Props_2 = ITrigger_2;
declare type __VLS_Props_3 = ISelectProps;
declare type __VLS_PublicProps = __VLS_Props_2 & {
modelValue?: any;
};
declare type __VLS_PublicProps_2 = __VLS_Props_3 & {
modelValue?: TModelType;
};
declare type __VLS_Slots = {} & {
header?: (props: typeof __VLS_12) => any;
} & {
sider?: (props: typeof __VLS_24) => any;
} & {
content?: (props: typeof __VLS_31) => any;
} & {
footer?: (props: typeof __VLS_38) => any;
};
declare type __VLS_Slots_2 = {} & {
default?: (props: typeof __VLS_1) => any;
};
declare type __VLS_Slots_3 = {} & {
default?: (props: typeof __VLS_6) => any;
};
declare type __VLS_Slots_4 = {} & {
default?: (props: typeof __VLS_7) => any;
} & {
content?: (props: typeof __VLS_10) => any;
};
declare type __VLS_Slots_5 = {} & {
[K in NonNullable<typeof __VLS_53>]?: (props: typeof __VLS_54) => any;
} & {
[K in NonNullable<typeof __VLS_77>]?: (props: typeof __VLS_78) => any;
} & {
'custom-left'?: (props: typeof __VLS_6) => any;
} & {
'custom-right'?: (props: typeof __VLS_13) => any;
} & {
'table-extend'?: (props: typeof __VLS_30) => any;
} & {
columns?: (props: typeof __VLS_44) => any;
} & {
'table-operate'?: (props: typeof __VLS_73) => any;
};
declare type __VLS_Slots_6 = {} & {
[K in NonNullable<typeof __VLS_32>]?: (props: typeof __VLS_33) => any;
} & {
default?: (props: typeof __VLS_10) => any;
} & {
'custom-footer'?: (props: typeof __VLS_12) => any;
};
declare type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithSlots_2<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithSlots_3<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithSlots_4<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithSlots_5<T, S> = T & {
new (): {
$slots: S;
};
};
declare type __VLS_WithSlots_6<T, S> = T & {
new (): {
$slots: S;
};
};
export declare function clean(obj: object): {};
/**
* 防抖函数
* @param fn 需要防抖的函数
* @param delay 延迟时间
* @returns
*/
export declare function debounce(fn: Function, delay: number): (this: any, ...args: any[]) => void;
/**
* 深度克隆
* @param value 需要克隆的对象
* @param seen 以及经克隆过的对象
* 如果不传seen 则使用一个新的Map对象
* @returns
*/
export declare function deepClone(value: object, seen?: any): any;
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
declare const _default_2: __VLS_WithSlots_2<typeof __VLS_component_2, __VLS_Slots_2>;
declare const _default_3: __VLS_WithSlots_3<typeof __VLS_component_3, __VLS_Slots_3>;
declare const _default_4: __VLS_WithSlots_4<typeof __VLS_component_4, __VLS_Slots_4>;
declare const _default_5: __VLS_WithSlots_5<typeof __VLS_component_5, __VLS_Slots_5>;
declare const _default_6: DefineComponent<IIconProps, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IIconProps> & Readonly<{}>, {
size: string;
src: string;
icon: string;
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
declare const _default_7: DefineComponent<__VLS_PublicProps_2, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
change: (...args: any[]) => void;
"input-value-change": (...args: any[]) => void;
"update:modelValue": (value: TModelType) => void;
}, string, PublicProps, Readonly<__VLS_PublicProps_2> & Readonly<{
onChange?: (...args: any[]) => any;
"onUpdate:modelValue"?: (value: TModelType) => any;
"onInput-value-change"?: (...args: any[]) => any;
}>, {
loading: boolean;
disabled: boolean;
maxTagCount: number;
fieldNames: {
label: string;
value: string;
};
placeholder: string;
multiple: boolean;
hideClean: boolean;
allowCreate: boolean;
virtualListProps: {
height: number;
};
formatLabel: (option: any) => string;
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
declare const _default_8: __VLS_WithSlots_6<typeof __VLS_component_6, __VLS_Slots_6>;
/**
* 生成一个唯一的UUID
* UUID格式为xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx
* @returns 返回一个唯一的UUID
*/
export declare function getUUID(): string;
declare interface IContentBox extends TContentBox {
install(app: App): void;
}
declare interface IDialogProps {
visible: boolean;
title?: string;
width?: number | string;
titleAlign?: TTitleAlign;
hideCustomFooter?: boolean;
maskClosable?: boolean;
onBeforeOk?: TBeforeOk;
}
declare interface IIcon extends TIcon {
install(app: App): void;
}
declare interface IIconProps {
src?: string;
icon?: string;
size?: string;
style?: object;
}
export declare function isArray(value: any): boolean;
declare interface ISearchBox extends TSearchBox {
install(app: App): void;
}
declare interface ISearchBoxProps {
hideLine?: boolean;
formItemWidth?: string;
openSearchItem?: boolean;
defaultItem?: string[];
localKey?: string;
}
declare interface ISelectProps {
options: Array<any>;
maxTagCount?: number;
fieldNames?: {
label: string;
value: string;
};
placeholder?: string;
multiple?: boolean;
disabled?: boolean;
hideClean?: boolean;
allowCreate?: boolean;
virtualListProps?: {
height: number;
};
loading?: boolean;
formatLabel?: (option: any) => string;
}
export declare function isFunction(value: any): boolean;
export declare function isObject(value: any): boolean;
declare interface ITable extends TTable {
install(app: App): void;
}
declare interface ITableProps {
columns?: TableColumnData[];
data: TableData;
loading?: boolean;
scroll?: {
x?: number | string;
y?: number | string;
};
noCache?: boolean;
hideOperate?: boolean;
operateWidth?: number;
page?: number;
limit?: number;
total?: number;
pagination?: PaginationProps;
pageSizeOptions?: number[];
tableHeaderSplitLine?: boolean;
customColumnKey?: string;
}
declare interface ITrigger extends TTrigger {
install(app: App): void;
}
declare interface ITrigger_2 {
trigger?: TTrigger_2;
position?: TPosition;
duration?: number;
disabled?: boolean;
popupContainer?: string;
popupOffset?: number;
}
declare interface IZlDialog extends TDialog {
install(app: App): void;
}
declare interface IZlLayout extends TLayout {
install(app: App): void;
}
declare interface IZlSelect extends TSelect {
install(app: App): void;
}
export declare namespace showDialog {
export {
showDialog_2 as default
}
}
declare function showDialog_2(comp: Component, props: VNodeProps, slots: SlotsType): {
unmount: () => void;
};
declare type TBeforeOk = (done: (closed: boolean) => void) => void | boolean | Promise<void | boolean>;
declare type TContentBox = typeof _default_2;
declare type TDialog = typeof _default_8;
declare type TIcon = typeof _default_6;
declare type TLayout = typeof _default;
declare type TModelType = Array<number | string> | string | number;
declare type TPosition = 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';
declare type TSearchBox = typeof _default_3;
declare type TSelect = typeof _default_7;
declare type TTable = typeof _default_5;
declare type TTitleAlign = 'start' | 'center';
declare type TTrigger = typeof _default_4;
declare type TTrigger_2 = 'hover' | 'click' | 'focus' | 'contextMenu';
declare const ZlArcoComp: ZlArcoCompPlugin;
export default ZlArcoComp;
export declare interface ZlArcoCompPlugin {
install(app: App): void;
}
export declare const ZlContentBox: IContentBox;
export declare const ZlDialog: IZlDialog;
export declare const ZlIcon: IIcon;
export declare const ZlLayout: IZlLayout;
export declare const ZlSearchBox: ISearchBox;
export declare const ZlSelect: IZlSelect;
export declare const ZlTable: ITable;
export declare const ZlTrigger: ITrigger;
export { }