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 * 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 { Tree, TreeChild } from './tree';
export { Upload } from './upload'; export { Upload } from './upload';
declare const API: { interface IViewGlobalOptions{
version: string; size?: string;
locale: (l:any) => void; transfer?: string;
i18n: (fn:any) => void; select: {
install: ( arrow: string;
Vue: Vue, customArrow: string;
opts: { 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; locale?: any;
i18n?: any; i18n?: any;
size?: any; }
transfer?: any;
} declare const API: {
version: string;
locale: (l: any) => void;
i18n: (fn: any) => void;
install: (
Vue: Vue,
opts: IViewInstallOptions
) => void; ) => void;
lang: (code: string) => void; lang: (code: string) => void;
}; };
@ -83,9 +139,6 @@ export default API;
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
interface Vue { interface Vue {
$IVIEW: { $IVIEW: IViewGlobalOptions;
size?: string;
transfer?: string;
};
} }
} }