d.ts全局参数变更增加各组件全局参数定义

This commit is contained in:
yangd 2019-04-15 13:58:50 +08:00
parent 6e16a96e94
commit b5e0bdc2ee
2 changed files with 66 additions and 13 deletions

2
types/input.d.ts vendored
View file

@ -143,7 +143,7 @@ export declare interface Input extends Vue {
/**
* clearable
*/
$emit(eventName: 'on-clear', value: string): this;
$emit(eventName: 'on-clear'): this;
/**
*
*/

View file

@ -63,18 +63,74 @@ export { Transfer } from './transfer';
export { Tree, TreeChild } from './tree';
export { Upload } from './upload';
interface IViewGlobalOptions{
size?: string;
transfer?: string;
select: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
cell: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
menu: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
tree: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
cascader: {
arrow: string;
customArrow: string;
arrowSize: number | string;
itemArrow: string;
customItemArrow: string;
itemArrowSize: number | string;
};
colorPicker: {
arrow: string;
customArrow: string;
arrowSize: number | string;
};
datePicker: {
icon: string;
customIcon: string;
iconSize: number | string;
};
timePicker: {
icon: string;
customIcon: string;
iconSize: number | string;
};
tabs: {
closeIcon: string;
customCloseIcon: string;
closeIconSize: number | string;
};
modal: {
maskClosable: boolean | string;
};
}
interface IViewInstallOptions extends IViewGlobalOptions{
locale?: any;
i18n?: any;
}
declare const API: {
version: string;
locale: (l:any) => void;
i18n: (fn:any) => void;
locale: (l: any) => void;
i18n: (fn: any) => void;
install: (
Vue: Vue,
opts: {
locale?: any;
i18n?: any;
size?: any;
transfer?: any;
}
opts: IViewInstallOptions
) => void;
lang: (code: string) => void;
};
@ -83,9 +139,6 @@ export default API;
declare module 'vue/types/vue' {
interface Vue {
$IVIEW: {
size?: string;
transfer?: string;
};
$IVIEW: IViewGlobalOptions;
}
}