@wyfex/ivue 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.es.js +10 -10
- package/dist/index.umd.cjs +10 -10
- package/dist/ivue.css +1 -1
- package/dist/types/UseCrud/hook.d.ts +2 -3
- package/dist/types/UseCrud/types.d.ts +0 -1
- package/dist/types/UseEcharts/hook.d.ts +6 -0
- package/dist/types/UseEcharts/index.vue.d.ts +105 -0
- package/dist/types/UseEcharts/props.d.ts +46 -0
- package/dist/types/UseEcharts/types.d.ts +6 -0
- package/dist/types/UseElButton/index.vue.d.ts +16 -5
- package/dist/types/UseElButton/props.d.ts +2 -2
- package/dist/types/UseElCheckbox/hook.d.ts +3 -2
- package/dist/types/UseElCheckbox/index.vue.d.ts +14 -8
- package/dist/types/UseElCheckbox/props.d.ts +6 -2
- package/dist/types/UseElCheckbox/types.d.ts +1 -1
- package/dist/types/UseElDescriptions/hook.d.ts +2 -6
- package/dist/types/UseElDescriptions/types.d.ts +2 -2
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +2 -6
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +2 -6
- package/dist/types/UseElForm/hooks/useElForm.d.ts +2 -6
- package/dist/types/UseElForm/index.vue.d.ts +20 -16
- package/dist/types/UseElForm/types.d.ts +6 -0
- package/dist/types/UseElInput/types.d.ts +2 -2
- package/dist/types/UseElSelect/types.d.ts +2 -2
- package/dist/types/UseElTable/hooks/useElTable.d.ts +2 -3
- package/dist/types/UseElUpload/types.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +11 -11
- package/src/components/UseCrud/types.ts +1 -3
- package/src/components/UseEcharts/props.ts +77 -0
- package/src/components/UseEcharts/types.ts +14 -0
- package/src/components/UseElButton/props.ts +3 -3
- package/src/components/UseElCheckbox/props.ts +7 -5
- package/src/components/UseElCheckbox/types.ts +4 -1
- package/src/components/UseElDescriptions/props.ts +1 -1
- package/src/components/UseElDescriptions/types.ts +2 -2
- package/src/components/UseElDialog/props.ts +1 -1
- package/src/components/UseElDrawer/props.ts +1 -1
- package/src/components/UseElForm/props.ts +1 -1
- package/src/components/UseElForm/types.ts +48 -114
- package/src/components/UseElInput/types.ts +3 -5
- package/src/components/UseElSelect/types.ts +4 -8
- package/src/components/UseElTable/props.ts +1 -1
- package/src/components/UseElUpload/types.ts +2 -2
- package/src/components/UseLineTitle/defaultExtConfig.ts +4 -16
- package/src/components/UseLineTitle/types.ts +2 -0
- package/src/types/index.ts +38 -115
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 组件props
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
/**
|
|
8
|
+
* Echarts实例(即import * as echarts from 'echarts') 可通过provide传入
|
|
9
|
+
*/
|
|
10
|
+
echarts: {
|
|
11
|
+
type: Object as PropType<{ init: (...args: any[]) => any }>,
|
|
12
|
+
default: null
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* 配置项
|
|
16
|
+
*/
|
|
17
|
+
options: {
|
|
18
|
+
type: Object as PropType<Record<string, any>>,
|
|
19
|
+
default: () => ({})
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* 容器宽度
|
|
23
|
+
*/
|
|
24
|
+
width: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '100%'
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 容器高度
|
|
30
|
+
*/
|
|
31
|
+
height: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '100%'
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* 主题
|
|
37
|
+
*/
|
|
38
|
+
theme: {
|
|
39
|
+
type: [String, Object] as PropType<string | Record<string, any>>,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* 是否不和options合并
|
|
44
|
+
*/
|
|
45
|
+
notMerge: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
/**
|
|
50
|
+
* resize 防抖毫秒
|
|
51
|
+
*/
|
|
52
|
+
resizeDelay: {
|
|
53
|
+
type: Number,
|
|
54
|
+
default: 100
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* 是否开启窗口自动resize
|
|
58
|
+
*/
|
|
59
|
+
autoResize: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* 是否显示loading加载动画
|
|
65
|
+
*/
|
|
66
|
+
loading: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* loading自定义样式配置,对应echarts showLoading参数
|
|
72
|
+
*/
|
|
73
|
+
loadingConfig: {
|
|
74
|
+
type: Object as PropType<Record<string, any>>,
|
|
75
|
+
default: () => ({})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue'
|
|
2
|
+
import componentProps from './props'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* props类型
|
|
6
|
+
*/
|
|
7
|
+
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* inject的echarts类型
|
|
11
|
+
*/
|
|
12
|
+
export type InjectedEcharts = {
|
|
13
|
+
init: (dom: HTMLElement | null, theme?: string | object) => any
|
|
14
|
+
}
|
|
@@ -6,11 +6,11 @@ import type { ExtConfig } from './types'
|
|
|
6
6
|
*/
|
|
7
7
|
export default {
|
|
8
8
|
/**
|
|
9
|
-
* 按钮文本
|
|
9
|
+
* 按钮文本 未传时可使用自定义slot
|
|
10
10
|
*/
|
|
11
11
|
btnText: {
|
|
12
|
-
type: String,
|
|
13
|
-
|
|
12
|
+
type: [String, Number, Boolean],
|
|
13
|
+
default: ''
|
|
14
14
|
},
|
|
15
15
|
/**
|
|
16
16
|
* 按钮类型 同ElButton类型,默认为primary
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* 组件props
|
|
3
5
|
*/
|
|
@@ -6,16 +8,16 @@ export default {
|
|
|
6
8
|
* 双向绑定数据源
|
|
7
9
|
*/
|
|
8
10
|
modelValue: {
|
|
9
|
-
type: [Array, String],
|
|
11
|
+
type: [Array, String, Number, Boolean],
|
|
10
12
|
default: () => []
|
|
11
13
|
},
|
|
12
14
|
/**
|
|
13
|
-
* 选项数据源
|
|
15
|
+
* 选项数据源 如不传则默认为单个复选框
|
|
14
16
|
*/
|
|
15
17
|
data: {
|
|
16
|
-
type: Array,
|
|
17
|
-
|
|
18
|
-
}
|
|
18
|
+
type: Array as PropType<Record<string, any>[] | string[] | number[]>,
|
|
19
|
+
default: undefined
|
|
20
|
+
},
|
|
19
21
|
/**
|
|
20
22
|
* 选项默认配置
|
|
21
23
|
*/
|
|
@@ -11,5 +11,8 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
11
11
|
*/
|
|
12
12
|
export type Emits = {
|
|
13
13
|
/** 更新value值 */
|
|
14
|
-
(
|
|
14
|
+
(
|
|
15
|
+
e: 'update:modelValue',
|
|
16
|
+
value: string | number | boolean | (string | number)[]
|
|
17
|
+
): void
|
|
15
18
|
}
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
default: false
|
|
30
30
|
},
|
|
31
31
|
/**
|
|
32
|
-
* 字典映射 数据结构为{ configs[][label | useDict | useDict.
|
|
32
|
+
* 字典映射 数据结构为{ configs[][label | useDict | useDict.key]: Array<{ label: string, value: any }> }
|
|
33
33
|
*/
|
|
34
34
|
dictMap: {
|
|
35
35
|
type: Object as PropType<DictMap>,
|
|
@@ -8,9 +8,9 @@ import componentProps from './props'
|
|
|
8
8
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* emits
|
|
11
|
+
* emits类型
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export type Emits = {
|
|
14
14
|
// dictKeys事件
|
|
15
15
|
(e: 'onDictKeys', value?: string[]): void
|
|
16
16
|
}
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
default: false
|
|
29
29
|
},
|
|
30
30
|
/**
|
|
31
|
-
* 字典映射 数据结构为{ formColumns[][label | useDict | useDict.
|
|
31
|
+
* 字典映射 数据结构为{ formColumns[][label | useDict | useDict.key]: Array<{ label: string, value: any }> }
|
|
32
32
|
*/
|
|
33
33
|
dictMap: {
|
|
34
34
|
type: Object as PropType<DictMap>,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue'
|
|
2
|
+
import type { FormInstance } from 'element-plus'
|
|
2
3
|
import componentProps from './props'
|
|
3
4
|
import type { RenderConfig, UseDict } from '@/types'
|
|
4
5
|
|
|
@@ -74,45 +75,25 @@ export interface InputConfig {
|
|
|
74
75
|
resize?: string
|
|
75
76
|
showPassword?: boolean
|
|
76
77
|
placeholder?: string
|
|
77
|
-
/**
|
|
78
|
-
* 默认el-input的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-input宽度
|
|
79
|
-
*/
|
|
78
|
+
/** 默认el-input的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-input宽度 */
|
|
80
79
|
width?: string
|
|
81
|
-
/**
|
|
82
|
-
* 为true则对el-input使用v-focus聚焦指令
|
|
83
|
-
*/
|
|
80
|
+
/** 为true则对el-input使用v-focus聚焦指令 */
|
|
84
81
|
autoFocus?: boolean
|
|
85
|
-
/**
|
|
86
|
-
* el-input头部插槽内容
|
|
87
|
-
*/
|
|
82
|
+
/** el-input头部插槽内容 */
|
|
88
83
|
prefixContent?: string | object
|
|
89
|
-
/**
|
|
90
|
-
* el-input尾部插槽内容
|
|
91
|
-
*/
|
|
84
|
+
/** el-input尾部插槽内容 */
|
|
92
85
|
suffixContent?: string | object
|
|
93
|
-
/**
|
|
94
|
-
* el-input前置插槽内容
|
|
95
|
-
*/
|
|
86
|
+
/** el-input前置插槽内容 */
|
|
96
87
|
prependContent?: string | object
|
|
97
|
-
/**
|
|
98
|
-
* el-input后置插槽内容
|
|
99
|
-
*/
|
|
88
|
+
/** el-input后置插槽内容 */
|
|
100
89
|
appendContent?: string | object
|
|
101
|
-
/**
|
|
102
|
-
* 在el-input右外部显示单位
|
|
103
|
-
*/
|
|
90
|
+
/** 在el-input右外部显示单位 */
|
|
104
91
|
unit?: string | object
|
|
105
|
-
/**
|
|
106
|
-
* el-input的clear事件
|
|
107
|
-
*/
|
|
92
|
+
/** el-input的clear事件 */
|
|
108
93
|
onClear?: Function
|
|
109
|
-
/**
|
|
110
|
-
* el-input的input事件
|
|
111
|
-
*/
|
|
94
|
+
/** el-input的input事件 */
|
|
112
95
|
inputEvent?: Function
|
|
113
|
-
/**
|
|
114
|
-
* el-input的keyup.enter事件
|
|
115
|
-
*/
|
|
96
|
+
/** el-input的keyup.enter事件 */
|
|
116
97
|
onKeyupEnter?: Function
|
|
117
98
|
}
|
|
118
99
|
|
|
@@ -127,9 +108,7 @@ export interface InputNumberConfig {
|
|
|
127
108
|
precision?: number
|
|
128
109
|
placeholder?: string
|
|
129
110
|
disabledScientific?: boolean
|
|
130
|
-
/**
|
|
131
|
-
* 在el-input-number右外部显示单位
|
|
132
|
-
*/
|
|
111
|
+
/** 在el-input-number右外部显示单位 */
|
|
133
112
|
unit?: string | object
|
|
134
113
|
}
|
|
135
114
|
|
|
@@ -138,21 +117,13 @@ export interface InputNumberConfig {
|
|
|
138
117
|
*/
|
|
139
118
|
export interface RadioConfig {
|
|
140
119
|
useRender?: boolean | RenderConfig
|
|
141
|
-
/**
|
|
142
|
-
* el-radio的选项集
|
|
143
|
-
*/
|
|
120
|
+
/** el-radio的选项集 */
|
|
144
121
|
options?: Array<{ label: string; value: string | number }>
|
|
145
|
-
/**
|
|
146
|
-
* el-radio的props配置项
|
|
147
|
-
*/
|
|
122
|
+
/** el-radio的props配置项 */
|
|
148
123
|
props?: { value: string; label?: string }
|
|
149
|
-
/**
|
|
150
|
-
* 是否反转单选框和标签的位置
|
|
151
|
-
*/
|
|
124
|
+
/** 是否反转单选框和标签的位置 */
|
|
152
125
|
reverse?: boolean
|
|
153
|
-
/**
|
|
154
|
-
* el-radio的change事件
|
|
155
|
-
*/
|
|
126
|
+
/** el-radio的change事件 */
|
|
156
127
|
onChange?: Function
|
|
157
128
|
}
|
|
158
129
|
|
|
@@ -167,25 +138,15 @@ export interface SelectConfig {
|
|
|
167
138
|
placeholder?: string
|
|
168
139
|
options?: Array<{ label: string; value: string | number }>
|
|
169
140
|
props?: { value: string; label?: string }
|
|
170
|
-
/**
|
|
171
|
-
* 是否使用v2版本
|
|
172
|
-
*/
|
|
141
|
+
/** 是否使用v2版本 */
|
|
173
142
|
useV2: boolean
|
|
174
|
-
/**
|
|
175
|
-
* 是否反转
|
|
176
|
-
*/
|
|
143
|
+
/** 是否反转 */
|
|
177
144
|
reverse?: boolean
|
|
178
|
-
/**
|
|
179
|
-
* 是否将值为数组转为以逗号分隔的字符串
|
|
180
|
-
*/
|
|
145
|
+
/** 是否将值为数组转为以逗号分隔的字符串 */
|
|
181
146
|
toJoin?: boolean
|
|
182
|
-
/**
|
|
183
|
-
* 默认el-select的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-select宽度
|
|
184
|
-
*/
|
|
147
|
+
/** 默认el-select的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-select宽度 */
|
|
185
148
|
width?: string
|
|
186
|
-
/**
|
|
187
|
-
* el-select的change事件
|
|
188
|
-
*/
|
|
149
|
+
/** el-select的change事件 */
|
|
189
150
|
onChange?: Function
|
|
190
151
|
}
|
|
191
152
|
|
|
@@ -195,21 +156,13 @@ export interface SelectConfig {
|
|
|
195
156
|
export interface CascaderConfig {
|
|
196
157
|
useRender?: boolean | RenderConfig
|
|
197
158
|
clearable?: boolean
|
|
198
|
-
/**
|
|
199
|
-
* el-cascader的选项集
|
|
200
|
-
*/
|
|
159
|
+
/** el-cascader的选项集 */
|
|
201
160
|
options?: Array<{ label: string; value: string | number }>
|
|
202
|
-
/**
|
|
203
|
-
* el-cascader的props配置项
|
|
204
|
-
*/
|
|
161
|
+
/** el-cascader的props配置项 */
|
|
205
162
|
props?: { value: string; label?: string }
|
|
206
|
-
/**
|
|
207
|
-
* 默认el-cascader的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-cascader宽度
|
|
208
|
-
*/
|
|
163
|
+
/** 默认el-cascader的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-cascader宽度 */
|
|
209
164
|
width?: string
|
|
210
|
-
/**
|
|
211
|
-
* el-select的change事件
|
|
212
|
-
*/
|
|
165
|
+
/** el-select的change事件 */
|
|
213
166
|
onChange?: Function
|
|
214
167
|
}
|
|
215
168
|
|
|
@@ -239,21 +192,13 @@ export interface DatePickerConfig {
|
|
|
239
192
|
startPlaceholder?: string
|
|
240
193
|
endPlaceholder?: string
|
|
241
194
|
rangeSeparator?: string
|
|
242
|
-
/**
|
|
243
|
-
* 默认el-date-picker的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-date-picker宽度
|
|
244
|
-
*/
|
|
195
|
+
/** 默认el-date-picker的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-date-picker宽度 */
|
|
245
196
|
width?: string
|
|
246
|
-
/**
|
|
247
|
-
* el-date-picker的calendar-change事件
|
|
248
|
-
*/
|
|
197
|
+
/** el-date-picker的calendar-change事件 */
|
|
249
198
|
onCalendarChange?: Function
|
|
250
|
-
/**
|
|
251
|
-
* el-date-picker的clear事件
|
|
252
|
-
*/
|
|
199
|
+
/** el-date-picker的clear事件 */
|
|
253
200
|
onClear?: Function
|
|
254
|
-
/**
|
|
255
|
-
* el-date-picker的change事件
|
|
256
|
-
*/
|
|
201
|
+
/** el-date-picker的change事件 */
|
|
257
202
|
onChange?: Function
|
|
258
203
|
}
|
|
259
204
|
|
|
@@ -269,9 +214,7 @@ export interface TimePickerConfig {
|
|
|
269
214
|
editable?: boolean
|
|
270
215
|
format?: string
|
|
271
216
|
valueFormat?: string
|
|
272
|
-
/**
|
|
273
|
-
* el-date-picker的change事件
|
|
274
|
-
*/
|
|
217
|
+
/** el-date-picker的change事件 */
|
|
275
218
|
onChange?: Function
|
|
276
219
|
}
|
|
277
220
|
|
|
@@ -280,13 +223,9 @@ export interface TimePickerConfig {
|
|
|
280
223
|
*/
|
|
281
224
|
export interface TimeSelectConfig {
|
|
282
225
|
useRender?: boolean | RenderConfig
|
|
283
|
-
/**
|
|
284
|
-
* 时间选择范围开始时间在formModel中的属性名
|
|
285
|
-
*/
|
|
226
|
+
/** 时间选择范围开始时间在formModel中的属性名 */
|
|
286
227
|
startProp: string
|
|
287
|
-
/**
|
|
288
|
-
* 时间选择范围结束时间在formModel中的属性名
|
|
289
|
-
*/
|
|
228
|
+
/** 时间选择范围结束时间在formModel中的属性名 */
|
|
290
229
|
endProp: string
|
|
291
230
|
}
|
|
292
231
|
|
|
@@ -297,9 +236,7 @@ export interface SwitchConfig {
|
|
|
297
236
|
useRender?: boolean | RenderConfig
|
|
298
237
|
activeValue?: string | number | boolean
|
|
299
238
|
inactiveValue?: string | number | boolean
|
|
300
|
-
/**
|
|
301
|
-
* el-switch的change事件
|
|
302
|
-
*/
|
|
239
|
+
/** el-switch的change事件 */
|
|
303
240
|
onChange?: Function
|
|
304
241
|
}
|
|
305
242
|
|
|
@@ -307,13 +244,9 @@ export interface SwitchConfig {
|
|
|
307
244
|
* inputRangeConfig接口
|
|
308
245
|
*/
|
|
309
246
|
export interface InputRangeConfig {
|
|
310
|
-
/**
|
|
311
|
-
* 输入范围开始值在formModel中的属性名
|
|
312
|
-
*/
|
|
247
|
+
/** 输入范围开始值在formModel中的属性名 */
|
|
313
248
|
startProp: string
|
|
314
|
-
/**
|
|
315
|
-
* 输入范围结束值在formModel中的属性名
|
|
316
|
-
*/
|
|
249
|
+
/** 输入范围结束值在formModel中的属性名 */
|
|
317
250
|
endProp: string
|
|
318
251
|
startPlaceholder?: string
|
|
319
252
|
endPlaceholder?: string
|
|
@@ -327,9 +260,7 @@ export interface InputRangeConfig {
|
|
|
327
260
|
export interface TreeSelectConfig {
|
|
328
261
|
useRender?: boolean | RenderConfig
|
|
329
262
|
data: Record<string, unknown>[]
|
|
330
|
-
/**
|
|
331
|
-
* 是否反转
|
|
332
|
-
*/
|
|
263
|
+
/** 是否反转 */
|
|
333
264
|
reverse?: boolean
|
|
334
265
|
width?: string
|
|
335
266
|
placeholder?: string
|
|
@@ -340,18 +271,15 @@ export interface TreeSelectConfig {
|
|
|
340
271
|
defaultExpandedKeys?: Array<string | number>
|
|
341
272
|
}
|
|
342
273
|
|
|
274
|
+
/**
|
|
275
|
+
* 必填配置项
|
|
276
|
+
*/
|
|
343
277
|
export interface IRequired {
|
|
344
|
-
/**
|
|
345
|
-
* 是否必填
|
|
346
|
-
*/
|
|
278
|
+
/** 是否必填 */
|
|
347
279
|
isRequired?: boolean
|
|
348
|
-
/**
|
|
349
|
-
* 内置校验器
|
|
350
|
-
*/
|
|
280
|
+
/** 内置校验器 */
|
|
351
281
|
validator: 'mobile' | 'nonNegativeDecimal'
|
|
352
|
-
/**
|
|
353
|
-
* 参数
|
|
354
|
-
*/
|
|
282
|
+
/** 参数 */
|
|
355
283
|
parmas?: any
|
|
356
284
|
}
|
|
357
285
|
|
|
@@ -474,3 +402,9 @@ export interface FormColumn {
|
|
|
474
402
|
*/
|
|
475
403
|
inputRangeConfig?: InputRangeConfig
|
|
476
404
|
}
|
|
405
|
+
|
|
406
|
+
export interface FormComponentInstance {
|
|
407
|
+
efRef: FormInstance
|
|
408
|
+
showQueryForm: boolean
|
|
409
|
+
handleDisplayQueryForm: Function
|
|
410
|
+
}
|
|
@@ -7,11 +7,9 @@ import componentProps from './props'
|
|
|
7
7
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* emits
|
|
10
|
+
* emits类型
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* 更新value值
|
|
15
|
-
*/
|
|
12
|
+
export type Emits = {
|
|
13
|
+
/** 更新value值 */
|
|
16
14
|
(e: 'update:modelValue', value: string): void
|
|
17
15
|
}
|
|
@@ -7,15 +7,11 @@ import componentProps from './props'
|
|
|
7
7
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* emits
|
|
10
|
+
* emits类型
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* 更新value值
|
|
15
|
-
*/
|
|
12
|
+
export type Emits = {
|
|
13
|
+
/** 更新value值 */
|
|
16
14
|
(e: 'update:modelValue', value: string | number | (string | number)[]): void
|
|
17
|
-
/**
|
|
18
|
-
* 更新label值
|
|
19
|
-
*/
|
|
15
|
+
/** 更新label值 */
|
|
20
16
|
(e: 'update:label', label: string | string[]): void
|
|
21
17
|
}
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
validator: (val: string) => ['left', 'center', 'right'].includes(val)
|
|
39
39
|
},
|
|
40
40
|
/**
|
|
41
|
-
* 字典映射 数据结构为{ tableColumns[][label | useDict | useDict.
|
|
41
|
+
* 字典映射 数据结构为{ tableColumns[][label | useDict | useDict.key]: Array<{ label: string, value: any }> }
|
|
42
42
|
*/
|
|
43
43
|
dictMap: {
|
|
44
44
|
type: Object as PropType<DictMap>,
|
|
@@ -7,9 +7,9 @@ import componentProps from './props'
|
|
|
7
7
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* emits
|
|
10
|
+
* emits类型
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type Emits = {
|
|
13
13
|
'update:fileId': [value: string | number]
|
|
14
14
|
'update:linkUrl': [url: string]
|
|
15
15
|
onFileObj: [file: Record<string, any>]
|
|
@@ -4,26 +4,14 @@ import type { ExtConfig } from './types'
|
|
|
4
4
|
* 默认扩展配置
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
7
|
-
|
|
8
|
-
* 外边距配置项
|
|
9
|
-
*/
|
|
10
|
-
margin: {
|
|
11
|
-
top: '0px',
|
|
12
|
-
bottom: '20px'
|
|
13
|
-
},
|
|
14
|
-
/**
|
|
15
|
-
* 线条配置项
|
|
16
|
-
*/
|
|
7
|
+
margin: { top: '0px', bottom: '20px' },
|
|
17
8
|
line: {
|
|
18
|
-
width: '4px',
|
|
19
|
-
height: '2px',
|
|
20
|
-
color: 'var(--theme-color)',
|
|
9
|
+
width: '4px',
|
|
10
|
+
height: '2px',
|
|
11
|
+
color: 'var(--theme-color,var(--el-color-primary))',
|
|
21
12
|
position: 'left',
|
|
22
13
|
verticalPadding: '0px'
|
|
23
14
|
},
|
|
24
|
-
/**
|
|
25
|
-
* 底部border配置项
|
|
26
|
-
*/
|
|
27
15
|
borderBottom: {
|
|
28
16
|
show: false,
|
|
29
17
|
color: 'var(--el-border-color-light)',
|
|
@@ -10,7 +10,9 @@ export type Props = ExtractPropTypes<typeof componentProps>
|
|
|
10
10
|
* 线条接口
|
|
11
11
|
*/
|
|
12
12
|
export interface Line {
|
|
13
|
+
/** 作用于position为left和bottom */
|
|
13
14
|
width: string
|
|
15
|
+
/** 作用于position为between */
|
|
14
16
|
height: string
|
|
15
17
|
color: string
|
|
16
18
|
position: 'left' | 'bottom' | 'between'
|