Commit b5e0bdc2ee51becdea3e9b6b7d48fba53551ba41
1 parent
6e16a96e
d.ts全局参数变更增加各组件全局参数定义
Showing
2 changed files
with
66 additions
and
13 deletions
Show diff stats
types/input.d.ts
types/iview.components.d.ts
... | ... | @@ -63,18 +63,74 @@ export { Transfer } from './transfer'; |
63 | 63 | export { Tree, TreeChild } from './tree'; |
64 | 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 | 127 | declare const API: { |
67 | 128 | version: string; |
68 | - locale: (l:any) => void; | |
69 | - i18n: (fn:any) => void; | |
129 | + locale: (l: any) => void; | |
130 | + i18n: (fn: any) => void; | |
70 | 131 | install: ( |
71 | 132 | Vue: Vue, |
72 | - opts: { | |
73 | - locale?: any; | |
74 | - i18n?: any; | |
75 | - size?: any; | |
76 | - transfer?: any; | |
77 | - } | |
133 | + opts: IViewInstallOptions | |
78 | 134 | ) => void; |
79 | 135 | lang: (code: string) => void; |
80 | 136 | }; |
... | ... | @@ -83,9 +139,6 @@ export default API; |
83 | 139 | |
84 | 140 | declare module 'vue/types/vue' { |
85 | 141 | interface Vue { |
86 | - $IVIEW: { | |
87 | - size?: string; | |
88 | - transfer?: string; | |
89 | - }; | |
142 | + $IVIEW: IViewGlobalOptions; | |
90 | 143 | } |
91 | 144 | } | ... | ... |