vxe-pc-ui 3.15.19 → 3.15.21
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/es/checkbox/src/button.js +10 -0
- package/es/checkbox/src/checkbox.js +31 -7
- package/es/icon/style.css +1 -1
- package/es/radio/src/button.js +31 -18
- package/es/radio/src/radio.js +31 -18
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +29 -13
- package/lib/checkbox/src/button.js +11 -0
- package/lib/checkbox/src/button.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +43 -15
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +155 -76
- package/lib/index.umd.min.js +1 -1
- package/lib/radio/src/button.js +33 -23
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +32 -22
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +32 -12
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/checkbox/src/button.ts +12 -0
- package/packages/checkbox/src/checkbox.ts +33 -6
- package/packages/radio/src/button.ts +33 -17
- package/packages/radio/src/radio.ts +34 -18
- package/packages/upload/src/upload.ts +29 -13
- package/types/components/checkbox-button.d.ts +3 -0
- package/types/components/checkbox.d.ts +8 -3
- package/types/components/radio-button.d.ts +4 -2
- package/types/components/radio.d.ts +7 -2
- package/types/components/table.d.ts +6 -1
- package/types/components/upload.d.ts +17 -0
- /package/es/icon/{iconfont.1782955787484.ttf → iconfont.1783046308156.ttf} +0 -0
- /package/es/icon/{iconfont.1782955787484.woff → iconfont.1783046308156.woff} +0 -0
- /package/es/icon/{iconfont.1782955787484.woff2 → iconfont.1783046308156.woff2} +0 -0
- /package/es/{iconfont.1782955787484.ttf → iconfont.1783046308156.ttf} +0 -0
- /package/es/{iconfont.1782955787484.woff → iconfont.1783046308156.woff} +0 -0
- /package/es/{iconfont.1782955787484.woff2 → iconfont.1783046308156.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782955787484.ttf → iconfont.1783046308156.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782955787484.woff → iconfont.1783046308156.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782955787484.woff2 → iconfont.1783046308156.woff2} +0 -0
- /package/lib/{iconfont.1782955787484.ttf → iconfont.1783046308156.ttf} +0 -0
- /package/lib/{iconfont.1782955787484.woff → iconfont.1783046308156.woff} +0 -0
- /package/lib/{iconfont.1782955787484.woff2 → iconfont.1783046308156.woff2} +0 -0
|
@@ -3,9 +3,12 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils'
|
|
5
5
|
import { getConfig, createEvent, globalMixins, renderEmptyElement } from '../../ui'
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
6
7
|
|
|
7
8
|
import type { VxeRadioButtonPropTypes, RadioButtonReactData, RadioGroupPrivateComputed, VxeRadioGroupConstructor, ValueOf, VxeRadioButtonEmits, VxeRadioGroupPrivateMethods, VxeFormConstructor, VxeComponentPermissionInfo, VxeComponentSizeType, VxeFormPrivateMethods, VxeFormDefines } from '../../../types'
|
|
8
9
|
|
|
10
|
+
const { warnLog } = createComponentLog('radio-button')
|
|
11
|
+
|
|
9
12
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
10
13
|
name: 'VxeRadioButton',
|
|
11
14
|
mixins: [
|
|
@@ -36,6 +39,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* 已废弃,被 checkedValue 替换
|
|
42
|
+
* @deprecated
|
|
39
43
|
*/
|
|
40
44
|
label: {
|
|
41
45
|
type: [String, Number, Boolean] as PropType<VxeRadioButtonPropTypes.Label>,
|
|
@@ -70,6 +74,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
70
74
|
formItemInfo(): VxeFormDefines.ProvideItemInfo | null
|
|
71
75
|
$xeRadioGroup(): (VxeRadioGroupConstructor & RadioGroupPrivateComputed & VxeRadioGroupPrivateMethods) | null
|
|
72
76
|
}),
|
|
77
|
+
computeCheckValue () {
|
|
78
|
+
const $xeRadioButton = this
|
|
79
|
+
const props = $xeRadioButton
|
|
80
|
+
|
|
81
|
+
const { checkedValue, label } = props
|
|
82
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue
|
|
83
|
+
},
|
|
73
84
|
computeIsDisabled () {
|
|
74
85
|
const $xeRadioButton = this
|
|
75
86
|
const $xeRadioGroup = $xeRadioButton.$xeRadioGroup
|
|
@@ -96,14 +107,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
96
107
|
|
|
97
108
|
return $xeRadioGroup ? $xeRadioGroup.strict : props.strict
|
|
98
109
|
},
|
|
99
|
-
|
|
110
|
+
computeIsChecked () {
|
|
100
111
|
const $xeRadioButton = this
|
|
101
112
|
const props = $xeRadioButton
|
|
102
113
|
const $xeRadioGroup = $xeRadioButton.$xeRadioGroup
|
|
103
114
|
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
const checkValue = $xeRadioButton.computeCheckValue
|
|
116
|
+
if ($xeRadioGroup) {
|
|
117
|
+
return $xeRadioGroup.value === checkValue
|
|
118
|
+
}
|
|
119
|
+
return props.value === checkValue
|
|
107
120
|
}
|
|
108
121
|
},
|
|
109
122
|
methods: {
|
|
@@ -146,26 +159,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
146
159
|
},
|
|
147
160
|
changeEvent (evnt: Event) {
|
|
148
161
|
const $xeRadioButton = this
|
|
149
|
-
const props = $xeRadioButton
|
|
150
162
|
|
|
151
163
|
const isDisabled = $xeRadioButton.computeIsDisabled
|
|
152
164
|
if (!isDisabled) {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
$xeRadioButton.handleValue(radioValue, evnt)
|
|
165
|
+
const checkValue = $xeRadioButton.computeCheckValue
|
|
166
|
+
$xeRadioButton.handleValue(checkValue, evnt)
|
|
156
167
|
}
|
|
157
168
|
},
|
|
158
169
|
clickEvent (evnt: Event) {
|
|
159
170
|
const $xeRadioButton = this
|
|
160
|
-
const props = $xeRadioButton
|
|
161
|
-
const $xeRadioGroup = $xeRadioButton.$xeRadioGroup
|
|
162
171
|
|
|
163
172
|
const isDisabled = $xeRadioButton.computeIsDisabled
|
|
164
173
|
const isStrict = $xeRadioButton.computeStrict
|
|
165
174
|
if (!isDisabled && !isStrict) {
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
if (radioValue === ($xeRadioGroup ? $xeRadioGroup.value : props.value)) {
|
|
175
|
+
const isChecked = $xeRadioButton.computeIsChecked
|
|
176
|
+
if (isChecked) {
|
|
169
177
|
$xeRadioButton.handleValue(null, evnt)
|
|
170
178
|
}
|
|
171
179
|
}
|
|
@@ -180,12 +188,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
180
188
|
const slots = $xeRadioButton.$scopedSlots
|
|
181
189
|
const $xeRadioGroup = $xeRadioButton.$xeRadioGroup
|
|
182
190
|
|
|
183
|
-
const {
|
|
184
|
-
const radioValue = XEUtils.isUndefined(checkedValue) ? label : checkedValue
|
|
191
|
+
const { icon, content } = props
|
|
185
192
|
const vSize = $xeRadioButton.computeSize
|
|
186
193
|
const isDisabled = $xeRadioButton.computeIsDisabled
|
|
187
194
|
const name = $xeRadioButton.computeName
|
|
188
|
-
const isChecked = $xeRadioButton.
|
|
195
|
+
const isChecked = $xeRadioButton.computeIsChecked
|
|
196
|
+
const checkValue = $xeRadioButton.computeCheckValue
|
|
189
197
|
const defaultSlot = slots.default
|
|
190
198
|
|
|
191
199
|
if ($xeRadioGroup) {
|
|
@@ -222,7 +230,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
222
230
|
}
|
|
223
231
|
}
|
|
224
232
|
return h('label', {
|
|
225
|
-
key:
|
|
233
|
+
key: `${checkValue}`,
|
|
226
234
|
class: ['vxe-radio vxe-radio--button', {
|
|
227
235
|
[`size--${vSize}`]: vSize,
|
|
228
236
|
'is--disabled': isDisabled
|
|
@@ -269,6 +277,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
269
277
|
])
|
|
270
278
|
}
|
|
271
279
|
},
|
|
280
|
+
mounted () {
|
|
281
|
+
const $xeRadioButton = this
|
|
282
|
+
const props = $xeRadioButton
|
|
283
|
+
|
|
284
|
+
if (props.label !== null) {
|
|
285
|
+
warnLog('vxe.error.delProp', ['label', 'checked-value'])
|
|
286
|
+
}
|
|
287
|
+
},
|
|
272
288
|
render (this: any, h) {
|
|
273
289
|
return this.renderVN(h)
|
|
274
290
|
}
|
|
@@ -3,9 +3,12 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils'
|
|
5
5
|
import { getConfig, createEvent, globalMixins, getIcon, renderEmptyElement } from '../../ui'
|
|
6
|
+
import { createComponentLog } from '../../ui/src/log'
|
|
6
7
|
|
|
7
8
|
import type { VxeRadioPropTypes, RadioReactData, VxeRadioEmits, RadioGroupPrivateComputed, VxeRadioGroupConstructor, VxeRadioGroupPrivateMethods, VxeFormConstructor, VxeFormPrivateMethods, VxeComponentPermissionInfo, VxeComponentSizeType, VxeFormDefines, ValueOf } from '../../../types'
|
|
8
9
|
|
|
10
|
+
const { warnLog } = createComponentLog('radio')
|
|
11
|
+
|
|
9
12
|
export default /* define-vxe-component start */ defineVxeComponent({
|
|
10
13
|
name: 'VxeRadio',
|
|
11
14
|
mixins: [
|
|
@@ -36,6 +39,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* 已废弃,被 checkedValue 替换
|
|
42
|
+
* @deprecated
|
|
39
43
|
*/
|
|
40
44
|
label: {
|
|
41
45
|
type: [String, Number, Boolean] as PropType<VxeRadioPropTypes.Label>,
|
|
@@ -70,6 +74,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
70
74
|
formItemInfo(): VxeFormDefines.ProvideItemInfo | null
|
|
71
75
|
$xeRadioGroup(): (VxeRadioGroupConstructor & RadioGroupPrivateComputed & VxeRadioGroupPrivateMethods) | null
|
|
72
76
|
}),
|
|
77
|
+
computeCheckValue () {
|
|
78
|
+
const $xeRadio = this
|
|
79
|
+
const props = $xeRadio
|
|
80
|
+
|
|
81
|
+
const { checkedValue, label } = props
|
|
82
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue
|
|
83
|
+
},
|
|
73
84
|
computeIsDisabled () {
|
|
74
85
|
const $xeRadio = this
|
|
75
86
|
const $xeRadioGroup = $xeRadio.$xeRadioGroup
|
|
@@ -97,14 +108,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
97
108
|
const $xeRadioGroup = $xeRadio.$xeRadioGroup
|
|
98
109
|
return $xeRadioGroup ? $xeRadioGroup.strict : props.strict
|
|
99
110
|
},
|
|
100
|
-
|
|
111
|
+
computeIsChecked () {
|
|
101
112
|
const $xeRadio = this
|
|
102
113
|
const props = $xeRadio
|
|
103
|
-
|
|
104
114
|
const $xeRadioGroup = $xeRadio.$xeRadioGroup
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
115
|
+
|
|
116
|
+
const checkValue = $xeRadio.computeCheckValue
|
|
117
|
+
if ($xeRadioGroup) {
|
|
118
|
+
return $xeRadioGroup.value === checkValue
|
|
119
|
+
}
|
|
120
|
+
return props.value === checkValue
|
|
108
121
|
}
|
|
109
122
|
},
|
|
110
123
|
methods: {
|
|
@@ -147,26 +160,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
147
160
|
},
|
|
148
161
|
changeEvent (evnt: Event) {
|
|
149
162
|
const $xeRadio = this
|
|
150
|
-
const props = $xeRadio
|
|
151
163
|
|
|
152
164
|
const isDisabled = $xeRadio.computeIsDisabled
|
|
153
165
|
if (!isDisabled) {
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
$xeRadio.handleValue(radioValue, evnt)
|
|
166
|
+
const checkValue = $xeRadio.computeCheckValue
|
|
167
|
+
$xeRadio.handleValue(checkValue, evnt)
|
|
157
168
|
}
|
|
158
169
|
},
|
|
159
170
|
clickEvent (evnt: Event) {
|
|
160
171
|
const $xeRadio = this
|
|
161
|
-
const props = $xeRadio
|
|
162
|
-
const $xeRadioGroup = $xeRadio.$xeRadioGroup
|
|
163
172
|
|
|
164
173
|
const isDisabled = $xeRadio.computeIsDisabled
|
|
165
174
|
const isStrict = $xeRadio.computeStrict
|
|
166
175
|
if (!isDisabled && !isStrict) {
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
if (radioValue === ($xeRadioGroup ? $xeRadioGroup.value : props.value)) {
|
|
176
|
+
const isChecked = $xeRadio.computeIsChecked
|
|
177
|
+
if (isChecked) {
|
|
170
178
|
$xeRadio.handleValue(null, evnt)
|
|
171
179
|
}
|
|
172
180
|
}
|
|
@@ -181,13 +189,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
181
189
|
const props = $xeRadio
|
|
182
190
|
const $xeRadioGroup = $xeRadio.$xeRadioGroup
|
|
183
191
|
|
|
184
|
-
const {
|
|
185
|
-
const radioValue = XEUtils.isUndefined(checkedValue) ? label : checkedValue
|
|
192
|
+
const { content } = props
|
|
186
193
|
const slots = $xeRadio.$scopedSlots
|
|
187
194
|
const vSize = $xeRadio.computeSize
|
|
188
195
|
const isDisabled = $xeRadio.computeIsDisabled
|
|
189
196
|
const name = $xeRadio.computeName
|
|
190
|
-
const isChecked = $xeRadio.
|
|
197
|
+
const isChecked = $xeRadio.computeIsChecked
|
|
198
|
+
const checkValue = $xeRadio.computeCheckValue
|
|
191
199
|
const defaultSlot = slots.default
|
|
192
200
|
|
|
193
201
|
if ($xeRadioGroup) {
|
|
@@ -209,7 +217,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
209
217
|
}
|
|
210
218
|
}
|
|
211
219
|
return h('label', {
|
|
212
|
-
key:
|
|
220
|
+
key: `${checkValue}`,
|
|
213
221
|
class: ['vxe-radio vxe-radio--default', {
|
|
214
222
|
[`size--${vSize}`]: vSize,
|
|
215
223
|
'is--checked': isChecked,
|
|
@@ -243,6 +251,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
243
251
|
])
|
|
244
252
|
}
|
|
245
253
|
},
|
|
254
|
+
mounted () {
|
|
255
|
+
const $xeRadio = this
|
|
256
|
+
const props = $xeRadio
|
|
257
|
+
|
|
258
|
+
if (props.label !== null) {
|
|
259
|
+
warnLog('vxe.error.delProp', ['label', 'checked-value'])
|
|
260
|
+
}
|
|
261
|
+
},
|
|
246
262
|
render (this: any, h) {
|
|
247
263
|
return this.renderVN(h)
|
|
248
264
|
}
|
|
@@ -732,14 +732,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
732
732
|
}
|
|
733
733
|
return ''
|
|
734
734
|
},
|
|
735
|
-
|
|
735
|
+
handleChangeEvent (evnt: Event | null, vals: VxeUploadDefines.FileObjItem[]) {
|
|
736
736
|
const $xeUpload = this
|
|
737
737
|
const props = $xeUpload
|
|
738
738
|
|
|
739
739
|
const { singleMode, urlMode, urlArgs } = props
|
|
740
740
|
const urlProp = $xeUpload.computeUrlProp
|
|
741
741
|
const nameProp = $xeUpload.computeNameProp
|
|
742
|
-
let restList =
|
|
742
|
+
let restList = vals ? vals.slice(0) : []
|
|
743
743
|
if (urlMode) {
|
|
744
744
|
restList = restList.map(item => {
|
|
745
745
|
const url = item[urlProp]
|
|
@@ -754,7 +754,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
754
754
|
return url
|
|
755
755
|
})
|
|
756
756
|
}
|
|
757
|
-
|
|
757
|
+
const value = singleMode ? (restList[0] || null) : restList
|
|
758
|
+
$xeUpload.emitModel(value)
|
|
759
|
+
$xeUpload.dispatchEvent('change', { value }, evnt)
|
|
760
|
+
return value
|
|
758
761
|
},
|
|
759
762
|
getThumbnailFileUrl (item: VxeUploadDefines.FileObjItem) {
|
|
760
763
|
const $xeUpload = this
|
|
@@ -887,6 +890,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
887
890
|
if (cacheItem) {
|
|
888
891
|
cacheItem.percent = 100
|
|
889
892
|
cacheItem.status = 'success'
|
|
893
|
+
cacheItem.response = res
|
|
890
894
|
}
|
|
891
895
|
// 处理动态字段双向绑定问题
|
|
892
896
|
// Object.assign(item, res)
|
|
@@ -899,6 +903,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
899
903
|
const cacheItem = fileCacheMaps[fileKey]
|
|
900
904
|
if (cacheItem) {
|
|
901
905
|
cacheItem.status = 'error'
|
|
906
|
+
cacheItem.response = res
|
|
902
907
|
}
|
|
903
908
|
if (showErrorStatus) {
|
|
904
909
|
// 处理动态字段双向绑定问题
|
|
@@ -928,7 +933,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
928
933
|
}
|
|
929
934
|
return Promise.resolve()
|
|
930
935
|
},
|
|
931
|
-
|
|
936
|
+
handleReUploadEvent (evnt: MouseEvent, item: VxeUploadDefines.FileObjItem) {
|
|
932
937
|
const $xeUpload = this
|
|
933
938
|
const props = $xeUpload
|
|
934
939
|
const reactData = $xeUpload.reactData
|
|
@@ -945,7 +950,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
945
950
|
cacheItem.percent = 0
|
|
946
951
|
$xeUpload.handleUploadResult(item, file).then(() => {
|
|
947
952
|
if (urlMode) {
|
|
948
|
-
$xeUpload.
|
|
953
|
+
$xeUpload.handleChangeEvent(evnt, reactData.fileList)
|
|
949
954
|
}
|
|
950
955
|
})
|
|
951
956
|
}
|
|
@@ -1056,7 +1061,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1056
1061
|
file: file,
|
|
1057
1062
|
loading: !!autoSubmit,
|
|
1058
1063
|
status: 'pending',
|
|
1059
|
-
percent: 0
|
|
1064
|
+
percent: 0,
|
|
1065
|
+
response: null
|
|
1060
1066
|
}
|
|
1061
1067
|
}
|
|
1062
1068
|
const item = fileObj
|
|
@@ -1075,9 +1081,19 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1075
1081
|
$xeUpload.dispatchEvent('add', { option: item }, evnt)
|
|
1076
1082
|
})
|
|
1077
1083
|
Promise.all(uploadPromiseRests).then(() => {
|
|
1084
|
+
const { fileCacheMaps } = reactData
|
|
1078
1085
|
const restFileList = reactData.fileList
|
|
1079
|
-
|
|
1080
|
-
|
|
1086
|
+
const uploadResults: VxeUploadDefines.UploadResultObj[] = restFileList.map(option => {
|
|
1087
|
+
const fileKey = $xeUpload.getFieldKey(option)
|
|
1088
|
+
const cacheItem = fileCacheMaps[fileKey]
|
|
1089
|
+
return {
|
|
1090
|
+
option,
|
|
1091
|
+
status: cacheItem ? cacheItem.status : null,
|
|
1092
|
+
response: cacheItem ? cacheItem.response : null
|
|
1093
|
+
}
|
|
1094
|
+
})
|
|
1095
|
+
const value = $xeUpload.handleChangeEvent(evnt, restFileList)
|
|
1096
|
+
$xeUpload.dispatchEvent('upload-queue-end', { value, options: restFileList, results: uploadResults, files: selectFiles }, evnt)
|
|
1081
1097
|
// 自动更新校验状态
|
|
1082
1098
|
if ($xeForm && formItemInfo) {
|
|
1083
1099
|
$xeForm.triggerItemEvent(evnt as any, formItemInfo.itemConfig.field, restFileList)
|
|
@@ -1121,7 +1137,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1121
1137
|
|
|
1122
1138
|
const { fileList } = reactData
|
|
1123
1139
|
fileList.splice(index, 1)
|
|
1124
|
-
$xeUpload.
|
|
1140
|
+
$xeUpload.handleChangeEvent(evnt, fileList)
|
|
1125
1141
|
// 自动更新校验状态
|
|
1126
1142
|
if ($xeForm && formItemInfo) {
|
|
1127
1143
|
$xeForm.triggerItemEvent(evnt || { type: 'remove' }, formItemInfo.itemConfig.field, fileList)
|
|
@@ -1647,8 +1663,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1647
1663
|
content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
|
|
1648
1664
|
},
|
|
1649
1665
|
on: {
|
|
1650
|
-
click () {
|
|
1651
|
-
$xeUpload.
|
|
1666
|
+
click (evnt: MouseEvent) {
|
|
1667
|
+
$xeUpload.handleReUploadEvent(evnt, item)
|
|
1652
1668
|
}
|
|
1653
1669
|
}
|
|
1654
1670
|
})
|
|
@@ -1928,8 +1944,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1928
1944
|
content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
|
|
1929
1945
|
},
|
|
1930
1946
|
on: {
|
|
1931
|
-
click () {
|
|
1932
|
-
$xeUpload.
|
|
1947
|
+
click (evnt: MouseEvent) {
|
|
1948
|
+
$xeUpload.handleReUploadEvent(evnt, item)
|
|
1933
1949
|
}
|
|
1934
1950
|
}
|
|
1935
1951
|
})
|
|
@@ -21,6 +21,7 @@ export namespace VxeCheckboxButtonPropTypes {
|
|
|
21
21
|
export type ModelValue = any
|
|
22
22
|
/**
|
|
23
23
|
* 已废弃,被 CheckedValue 替换
|
|
24
|
+
* @deprecated
|
|
24
25
|
*/
|
|
25
26
|
export type Label = VxeCheckboxPropTypes.Label
|
|
26
27
|
export type Title = VxeCheckboxPropTypes.Title
|
|
@@ -36,6 +37,7 @@ export interface VxeCheckboxButtonProps {
|
|
|
36
37
|
modelValue?: VxeCheckboxButtonPropTypes.ModelValue
|
|
37
38
|
/**
|
|
38
39
|
* 已废弃,被 checked-value 替换
|
|
40
|
+
* @deprecated
|
|
39
41
|
*/
|
|
40
42
|
label?: VxeCheckboxButtonPropTypes.Label
|
|
41
43
|
title?: VxeCheckboxButtonPropTypes.Title
|
|
@@ -72,6 +74,7 @@ export namespace VxeCheckboxButtonDefines {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
export interface ChangeParams {
|
|
77
|
+
value: any
|
|
75
78
|
label: any
|
|
76
79
|
}
|
|
77
80
|
export interface ChangeEventParams extends CheckboxButtonEventParams, ChangeParams { }
|
|
@@ -18,6 +18,10 @@ export interface VxeCheckboxPrivateRef extends CheckboxPrivateRef { }
|
|
|
18
18
|
export namespace VxeCheckboxPropTypes {
|
|
19
19
|
export type Size = VxeComponentSizeType
|
|
20
20
|
export type ModelValue = string | number | boolean | null
|
|
21
|
+
/**
|
|
22
|
+
* 已废弃,被 CheckedValue 替换
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
21
25
|
export type Label = string | number
|
|
22
26
|
export type Indeterminate = boolean
|
|
23
27
|
export type Title = string | number
|
|
@@ -27,14 +31,15 @@ export namespace VxeCheckboxPropTypes {
|
|
|
27
31
|
export type Disabled = boolean
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
export
|
|
34
|
+
export type VxeCheckboxProps = {
|
|
31
35
|
size?: VxeCheckboxPropTypes.Size
|
|
32
36
|
/**
|
|
33
37
|
* 绑定值
|
|
34
38
|
*/
|
|
35
|
-
|
|
39
|
+
modelValue?: VxeCheckboxPropTypes.ModelValue
|
|
36
40
|
/**
|
|
37
|
-
*
|
|
41
|
+
* 已废弃,被 checked-value 替换
|
|
42
|
+
* @deprecated
|
|
38
43
|
*/
|
|
39
44
|
label?: VxeCheckboxPropTypes.Label
|
|
40
45
|
/**
|
|
@@ -28,13 +28,14 @@ export namespace VxeRadioButtonPropTypes {
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* 已废弃,被 CheckedValue 替换
|
|
31
|
+
* @deprecated
|
|
31
32
|
*/
|
|
32
33
|
export type Label = VxeRadioPropTypes.Label
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export interface VxeRadioButtonProps {
|
|
36
37
|
size?: VxeRadioButtonPropTypes.Size
|
|
37
|
-
|
|
38
|
+
modelValue?: VxeRadioButtonPropTypes.ModelValue
|
|
38
39
|
/**
|
|
39
40
|
* 严格模式,不允许取消
|
|
40
41
|
*/
|
|
@@ -46,7 +47,8 @@ export interface VxeRadioButtonProps {
|
|
|
46
47
|
disabled?: VxeRadioButtonPropTypes.Disabled
|
|
47
48
|
|
|
48
49
|
/**
|
|
49
|
-
* 已废弃,被
|
|
50
|
+
* 已废弃,被 checked-value 替换
|
|
51
|
+
* @deprecated
|
|
50
52
|
*/
|
|
51
53
|
label?: VxeRadioButtonPropTypes.Label
|
|
52
54
|
}
|
|
@@ -19,6 +19,10 @@ export namespace VxeRadioPropTypes {
|
|
|
19
19
|
export type Size = VxeComponentSizeType
|
|
20
20
|
export type Strict = boolean
|
|
21
21
|
export type ModelValue = any
|
|
22
|
+
/**
|
|
23
|
+
* 已废弃,被 CheckedValue 替换
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
22
26
|
export type Label = any
|
|
23
27
|
export type CheckedValue = any
|
|
24
28
|
export type Title = string | number
|
|
@@ -36,7 +40,7 @@ export interface VxeRadioProps {
|
|
|
36
40
|
/**
|
|
37
41
|
* 绑定值
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
modelValue?: VxeRadioPropTypes.ModelValue
|
|
40
44
|
/**
|
|
41
45
|
* 值
|
|
42
46
|
*/
|
|
@@ -59,7 +63,8 @@ export interface VxeRadioProps {
|
|
|
59
63
|
name?: VxeRadioPropTypes.Name
|
|
60
64
|
|
|
61
65
|
/**
|
|
62
|
-
* 已废弃,被
|
|
66
|
+
* 已废弃,被 checked-value 替换
|
|
67
|
+
* @deprecated
|
|
63
68
|
*/
|
|
64
69
|
label?: VxeRadioPropTypes.Label
|
|
65
70
|
}
|
|
@@ -994,6 +994,7 @@ export namespace VxeTablePropTypes {
|
|
|
994
994
|
resize?: VxeModalPropTypes.Resize
|
|
995
995
|
escClosable?: VxeModalPropTypes.EscClosable
|
|
996
996
|
maskClosable?: VxeModalPropTypes.MaskClosable
|
|
997
|
+
transfer?: VxeDrawerPropTypes.Transfer
|
|
997
998
|
}
|
|
998
999
|
/**
|
|
999
1000
|
* 抽屉模式配置项,用于 mode='drawer'
|
|
@@ -1008,6 +1009,7 @@ export namespace VxeTablePropTypes {
|
|
|
1008
1009
|
resize?: VxeDrawerPropTypes.Resize
|
|
1009
1010
|
escClosable?: VxeDrawerPropTypes.EscClosable
|
|
1010
1011
|
maskClosable?: VxeDrawerPropTypes.MaskClosable
|
|
1012
|
+
transfer?: VxeDrawerPropTypes.Transfer
|
|
1011
1013
|
}
|
|
1012
1014
|
/**
|
|
1013
1015
|
* 默认模式配置项
|
|
@@ -1015,6 +1017,8 @@ export namespace VxeTablePropTypes {
|
|
|
1015
1017
|
popupOptions?: {
|
|
1016
1018
|
mode?: 'inside' | 'outside' | 'auto' | '' | null
|
|
1017
1019
|
width?: number | string
|
|
1020
|
+
minWidth?: number | string
|
|
1021
|
+
maxWidth?: number | string
|
|
1018
1022
|
maxHeight?: number | string
|
|
1019
1023
|
transfer?: boolean
|
|
1020
1024
|
}
|
|
@@ -7026,7 +7030,8 @@ export namespace VxeTableDefines {
|
|
|
7026
7030
|
activeWrapper: boolean
|
|
7027
7031
|
visible: boolean
|
|
7028
7032
|
maxHeight: number | string | null
|
|
7029
|
-
|
|
7033
|
+
defPopupStyle: VxeComponentStyleType
|
|
7034
|
+
panePopupStyle: VxeComponentStyleType
|
|
7030
7035
|
oldSortMaps: Record<string, number>
|
|
7031
7036
|
oldFixedMaps: Record<string, VxeColumnPropTypes.Fixed>
|
|
7032
7037
|
oldVisibleMaps: Record<string, boolean>
|
|
@@ -312,6 +312,7 @@ export type VxeUploadEmits = [
|
|
|
312
312
|
'model-value',
|
|
313
313
|
'modelValue',
|
|
314
314
|
'input',
|
|
315
|
+
'change',
|
|
315
316
|
'add',
|
|
316
317
|
'remove',
|
|
317
318
|
'remove-fail',
|
|
@@ -352,17 +353,28 @@ export namespace VxeUploadDefines {
|
|
|
352
353
|
file: File
|
|
353
354
|
}>
|
|
354
355
|
|
|
356
|
+
export interface UploadResultObj {
|
|
357
|
+
option: VxeUploadDefines.FileObjItem
|
|
358
|
+
status: 'error' | 'success' | 'pending' | null
|
|
359
|
+
response: any
|
|
360
|
+
}
|
|
361
|
+
|
|
355
362
|
export interface FileCacheItem {
|
|
356
363
|
file: File
|
|
357
364
|
loading: boolean
|
|
358
365
|
status: 'error' | 'success' | 'pending'
|
|
359
366
|
percent: number
|
|
367
|
+
response: any
|
|
360
368
|
}
|
|
361
369
|
|
|
362
370
|
export interface FileObjItem {
|
|
363
371
|
[key: string]: any
|
|
364
372
|
}
|
|
365
373
|
|
|
374
|
+
export interface ChangeEventParams {
|
|
375
|
+
value: VxeUploadPropTypes.ModelValue
|
|
376
|
+
}
|
|
377
|
+
|
|
366
378
|
export interface AddParams {
|
|
367
379
|
options: VxeUploadDefines.FileObjItem[]
|
|
368
380
|
option: VxeUploadDefines.FileObjItem
|
|
@@ -397,7 +409,9 @@ export namespace VxeUploadDefines {
|
|
|
397
409
|
files: File[]
|
|
398
410
|
}
|
|
399
411
|
export interface UploadQueueEndEventParams extends UploadQueueStartEventParams {
|
|
412
|
+
value: VxeUploadPropTypes.ModelValue
|
|
400
413
|
options: VxeUploadDefines.FileObjItem[]
|
|
414
|
+
results: VxeUploadDefines.UploadResultObj[]
|
|
401
415
|
}
|
|
402
416
|
|
|
403
417
|
export interface MoreVisibleEventParams {
|
|
@@ -407,6 +421,7 @@ export namespace VxeUploadDefines {
|
|
|
407
421
|
|
|
408
422
|
export type VxeUploadEventProps = {
|
|
409
423
|
'onUpdate:modelValue'?: VxeUploadEvents.UpdateModelValue
|
|
424
|
+
onChange?: VxeUploadEvents.Change
|
|
410
425
|
onAdd?: VxeUploadEvents.Add
|
|
411
426
|
onRemove?: VxeUploadEvents.Remove
|
|
412
427
|
onRemoveFail?: VxeUploadEvents.RemoveFail
|
|
@@ -423,6 +438,7 @@ export type VxeUploadEventProps = {
|
|
|
423
438
|
|
|
424
439
|
export interface VxeUploadListeners {
|
|
425
440
|
'update:modelValue'?: VxeUploadEvents.UpdateModelValue
|
|
441
|
+
change?: VxeUploadEvents.Change
|
|
426
442
|
add?: VxeUploadEvents.Add
|
|
427
443
|
remove?: VxeUploadEvents.Remove
|
|
428
444
|
removeFail?: VxeUploadEvents.RemoveFail
|
|
@@ -439,6 +455,7 @@ export interface VxeUploadListeners {
|
|
|
439
455
|
|
|
440
456
|
export namespace VxeUploadEvents {
|
|
441
457
|
export type UpdateModelValue = (modelValue: VxeUploadPropTypes.ModelValue) => void
|
|
458
|
+
export type Change = (params: VxeUploadDefines.ChangeEventParams) => void
|
|
442
459
|
export type Add = (params: VxeUploadDefines.AddEventParams) => void
|
|
443
460
|
export type Remove = (params: VxeUploadDefines.RemoveEventParams) => void
|
|
444
461
|
export type RemoveFail = (params: VxeUploadDefines.RemoveFailEventParams) => void
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|