Commit b5e0bdc2ee51becdea3e9b6b7d48fba53551ba41
1 parent
6e16a96e
d.ts全局参数变更增加各组件全局参数定义
Showing
2 changed files
with
66 additions
and
13 deletions
Show diff stats
types/input.d.ts
@@ -143,7 +143,7 @@ export declare interface Input extends Vue { | @@ -143,7 +143,7 @@ export declare interface Input extends Vue { | ||
143 | /** | 143 | /** |
144 | * 开启 clearable 时可用,点击清空按钮时触发 | 144 | * 开启 clearable 时可用,点击清空按钮时触发 |
145 | */ | 145 | */ |
146 | - $emit(eventName: 'on-clear', value: string): this; | 146 | + $emit(eventName: 'on-clear'): this; |
147 | /** | 147 | /** |
148 | * 手动聚焦输入框 | 148 | * 手动聚焦输入框 |
149 | */ | 149 | */ |
types/iview.components.d.ts
@@ -63,18 +63,74 @@ export { Transfer } from './transfer'; | @@ -63,18 +63,74 @@ export { Transfer } from './transfer'; | ||
63 | export { Tree, TreeChild } from './tree'; | 63 | export { Tree, TreeChild } from './tree'; |
64 | export { Upload } from './upload'; | 64 | export { Upload } from './upload'; |
65 | 65 | ||
66 | +interface IViewGlobalOptions{ | ||
67 | + size?: string; | ||
68 | + transfer?: string; | ||
69 | + select: { | ||
70 | + arrow: string; | ||
71 | + customArrow: string; | ||
72 | + arrowSize: number | string; | ||
73 | + }; | ||
74 | + cell: { | ||
75 | + arrow: string; | ||
76 | + customArrow: string; | ||
77 | + arrowSize: number | string; | ||
78 | + }; | ||
79 | + menu: { | ||
80 | + arrow: string; | ||
81 | + customArrow: string; | ||
82 | + arrowSize: number | string; | ||
83 | + }; | ||
84 | + tree: { | ||
85 | + arrow: string; | ||
86 | + customArrow: string; | ||
87 | + arrowSize: number | string; | ||
88 | + }; | ||
89 | + cascader: { | ||
90 | + arrow: string; | ||
91 | + customArrow: string; | ||
92 | + arrowSize: number | string; | ||
93 | + itemArrow: string; | ||
94 | + customItemArrow: string; | ||
95 | + itemArrowSize: number | string; | ||
96 | + }; | ||
97 | + colorPicker: { | ||
98 | + arrow: string; | ||
99 | + customArrow: string; | ||
100 | + arrowSize: number | string; | ||
101 | + }; | ||
102 | + datePicker: { | ||
103 | + icon: string; | ||
104 | + customIcon: string; | ||
105 | + iconSize: number | string; | ||
106 | + }; | ||
107 | + timePicker: { | ||
108 | + icon: string; | ||
109 | + customIcon: string; | ||
110 | + iconSize: number | string; | ||
111 | + }; | ||
112 | + tabs: { | ||
113 | + closeIcon: string; | ||
114 | + customCloseIcon: string; | ||
115 | + closeIconSize: number | string; | ||
116 | + }; | ||
117 | + modal: { | ||
118 | + maskClosable: boolean | string; | ||
119 | + }; | ||
120 | +} | ||
121 | + | ||
122 | +interface IViewInstallOptions extends IViewGlobalOptions{ | ||
123 | + locale?: any; | ||
124 | + i18n?: any; | ||
125 | +} | ||
126 | + | ||
66 | declare const API: { | 127 | declare const API: { |
67 | version: string; | 128 | version: string; |
68 | - locale: (l:any) => void; | ||
69 | - i18n: (fn:any) => void; | 129 | + locale: (l: any) => void; |
130 | + i18n: (fn: any) => void; | ||
70 | install: ( | 131 | install: ( |
71 | Vue: Vue, | 132 | Vue: Vue, |
72 | - opts: { | ||
73 | - locale?: any; | ||
74 | - i18n?: any; | ||
75 | - size?: any; | ||
76 | - transfer?: any; | ||
77 | - } | 133 | + opts: IViewInstallOptions |
78 | ) => void; | 134 | ) => void; |
79 | lang: (code: string) => void; | 135 | lang: (code: string) => void; |
80 | }; | 136 | }; |
@@ -83,9 +139,6 @@ export default API; | @@ -83,9 +139,6 @@ export default API; | ||
83 | 139 | ||
84 | declare module 'vue/types/vue' { | 140 | declare module 'vue/types/vue' { |
85 | interface Vue { | 141 | interface Vue { |
86 | - $IVIEW: { | ||
87 | - size?: string; | ||
88 | - transfer?: string; | ||
89 | - }; | 142 | + $IVIEW: IViewGlobalOptions; |
90 | } | 143 | } |
91 | } | 144 | } |