d.ts全局参数变更增加各组件全局参数定义
This commit is contained in:
parent
6e16a96e94
commit
b5e0bdc2ee
2 changed files with 66 additions and 13 deletions
2
types/input.d.ts
vendored
2
types/input.d.ts
vendored
|
@ -143,7 +143,7 @@ export declare interface Input extends Vue {
|
||||||
/**
|
/**
|
||||||
* 开启 clearable 时可用,点击清空按钮时触发
|
* 开启 clearable 时可用,点击清空按钮时触发
|
||||||
*/
|
*/
|
||||||
$emit(eventName: 'on-clear', value: string): this;
|
$emit(eventName: 'on-clear'): this;
|
||||||
/**
|
/**
|
||||||
* 手动聚焦输入框
|
* 手动聚焦输入框
|
||||||
*/
|
*/
|
||||||
|
|
77
types/iview.components.d.ts
vendored
77
types/iview.components.d.ts
vendored
|
@ -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';
|
||||||
|
|
||||||
|
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: {
|
declare const API: {
|
||||||
version: string;
|
version: string;
|
||||||
locale: (l:any) => void;
|
locale: (l: any) => void;
|
||||||
i18n: (fn:any) => void;
|
i18n: (fn: any) => void;
|
||||||
install: (
|
install: (
|
||||||
Vue: Vue,
|
Vue: Vue,
|
||||||
opts: {
|
opts: IViewInstallOptions
|
||||||
locale?: any;
|
|
||||||
i18n?: any;
|
|
||||||
size?: any;
|
|
||||||
transfer?: any;
|
|
||||||
}
|
|
||||||
) => 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;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue