diff --git a/types/input.d.ts b/types/input.d.ts index 070dec8..4db95c3 100644 --- a/types/input.d.ts +++ b/types/input.d.ts @@ -143,7 +143,7 @@ export declare interface Input extends Vue { /** * 开启 clearable 时可用,点击清空按钮时触发 */ - $emit(eventName: 'on-clear', value: string): this; + $emit(eventName: 'on-clear'): this; /** * 手动聚焦输入框 */ diff --git a/types/iview.components.d.ts b/types/iview.components.d.ts index bc058bb..6f7d844 100644 --- a/types/iview.components.d.ts +++ b/types/iview.components.d.ts @@ -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; } } -- libgit2 0.21.4