vxe-pc-ui 4.15.18 → 4.15.20
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/dist/all.esm.js +159 -35
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/checkbox/src/button.js +53 -10
- package/es/checkbox/src/group.js +13 -1
- package/es/checkbox-button/style.css +17 -0
- package/es/checkbox-button/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/language/ar-EG.js +12 -3
- package/es/language/de-DE.js +12 -3
- package/es/language/en-US.js +16 -7
- package/es/language/es-ES.js +12 -3
- package/es/language/fr-FR.js +12 -3
- package/es/language/hu-HU.js +12 -3
- package/es/language/hy-AM.js +12 -3
- package/es/language/id-ID.js +12 -3
- package/es/language/it-IT.js +11 -2
- package/es/language/ja-JP.js +12 -3
- package/es/language/ko-KR.js +12 -3
- package/es/language/ms-MY.js +12 -3
- package/es/language/nb-NO.js +12 -3
- package/es/language/pt-BR.js +12 -3
- package/es/language/ru-RU.js +12 -3
- package/es/language/th-TH.js +12 -3
- package/es/language/ug-CN.js +12 -3
- package/es/language/uk-UA.js +12 -3
- package/es/language/uz-UZ.js +12 -3
- package/es/language/vi-VN.js +11 -2
- package/es/language/zh-CHT.js +14 -5
- package/es/language/zh-CN.js +14 -5
- package/es/radio/src/button.js +35 -4
- package/es/radio/src/group.js +12 -0
- package/es/radio-button/style.css +17 -0
- package/es/radio-button/style.min.css +1 -1
- 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 +30 -13
- package/es/vxe-checkbox-button/style.css +17 -0
- package/es/vxe-checkbox-button/style.min.css +1 -1
- package/es/vxe-radio-button/style.css +17 -0
- package/es/vxe-radio-button/style.min.css +1 -1
- package/lib/checkbox/src/button.js +45 -14
- package/lib/checkbox/src/button.min.js +1 -1
- package/lib/checkbox/src/group.js +13 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox-button/style/style.css +17 -0
- package/lib/checkbox-button/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +138 -38
- package/lib/index.umd.min.js +1 -1
- package/lib/language/ar-EG.js +12 -3
- package/lib/language/ar-EG.min.js +1 -1
- package/lib/language/ar-EG.umd.js +12 -3
- package/lib/language/de-DE.js +12 -3
- package/lib/language/de-DE.min.js +1 -1
- package/lib/language/de-DE.umd.js +12 -3
- package/lib/language/en-US.js +16 -7
- package/lib/language/en-US.min.js +1 -1
- package/lib/language/en-US.umd.js +16 -7
- package/lib/language/es-ES.js +12 -3
- package/lib/language/es-ES.min.js +1 -1
- package/lib/language/es-ES.umd.js +12 -3
- package/lib/language/fr-FR.js +12 -3
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +12 -3
- package/lib/language/hu-HU.js +12 -3
- package/lib/language/hu-HU.min.js +1 -1
- package/lib/language/hu-HU.umd.js +12 -3
- package/lib/language/hy-AM.js +12 -3
- package/lib/language/hy-AM.min.js +1 -1
- package/lib/language/hy-AM.umd.js +12 -3
- package/lib/language/id-ID.js +12 -3
- package/lib/language/id-ID.min.js +1 -1
- package/lib/language/id-ID.umd.js +12 -3
- package/lib/language/it-IT.js +11 -2
- package/lib/language/it-IT.min.js +1 -1
- package/lib/language/it-IT.umd.js +11 -2
- package/lib/language/ja-JP.js +12 -3
- package/lib/language/ja-JP.min.js +1 -1
- package/lib/language/ja-JP.umd.js +12 -3
- package/lib/language/ko-KR.js +12 -3
- package/lib/language/ko-KR.min.js +1 -1
- package/lib/language/ko-KR.umd.js +12 -3
- package/lib/language/ms-MY.js +12 -3
- package/lib/language/ms-MY.min.js +1 -1
- package/lib/language/ms-MY.umd.js +12 -3
- package/lib/language/nb-NO.js +12 -3
- package/lib/language/nb-NO.min.js +1 -1
- package/lib/language/nb-NO.umd.js +12 -3
- package/lib/language/pt-BR.js +12 -3
- package/lib/language/pt-BR.min.js +1 -1
- package/lib/language/pt-BR.umd.js +12 -3
- package/lib/language/ru-RU.js +12 -3
- package/lib/language/ru-RU.min.js +1 -1
- package/lib/language/ru-RU.umd.js +12 -3
- package/lib/language/th-TH.js +12 -3
- package/lib/language/th-TH.min.js +1 -1
- package/lib/language/th-TH.umd.js +12 -3
- package/lib/language/ug-CN.js +12 -3
- package/lib/language/ug-CN.min.js +1 -1
- package/lib/language/ug-CN.umd.js +12 -3
- package/lib/language/uk-UA.js +12 -3
- package/lib/language/uk-UA.min.js +1 -1
- package/lib/language/uk-UA.umd.js +12 -3
- package/lib/language/uz-UZ.js +12 -3
- package/lib/language/uz-UZ.min.js +1 -1
- package/lib/language/uz-UZ.umd.js +12 -3
- package/lib/language/vi-VN.js +11 -2
- package/lib/language/vi-VN.min.js +1 -1
- package/lib/language/vi-VN.umd.js +11 -2
- package/lib/language/zh-CHT.js +14 -5
- package/lib/language/zh-CHT.min.js +1 -1
- package/lib/language/zh-CHT.umd.js +14 -5
- package/lib/language/zh-CN.js +14 -5
- package/lib/language/zh-CN.min.js +1 -1
- package/lib/language/zh-CN.umd.js +14 -5
- package/lib/radio/src/button.js +17 -3
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +12 -0
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio-button/style/style.css +17 -0
- package/lib/radio-button/style/style.min.css +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 +35 -13
- package/lib/upload/src/upload.min.js +1 -1
- package/lib/vxe-checkbox-button/style/style.css +17 -0
- package/lib/vxe-checkbox-button/style/style.min.css +1 -1
- package/lib/vxe-radio-button/style/style.css +17 -0
- package/lib/vxe-radio-button/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/checkbox/src/button.ts +54 -10
- package/packages/checkbox/src/group.ts +18 -4
- package/packages/language/ar-EG.ts +12 -3
- package/packages/language/de-DE.ts +12 -3
- package/packages/language/en-US.ts +16 -7
- package/packages/language/es-ES.ts +12 -3
- package/packages/language/fr-FR.ts +12 -3
- package/packages/language/hu-HU.ts +12 -3
- package/packages/language/hy-AM.ts +12 -3
- package/packages/language/id-ID.ts +12 -3
- package/packages/language/it-IT.ts +11 -2
- package/packages/language/ja-JP.ts +12 -3
- package/packages/language/ko-KR.ts +12 -3
- package/packages/language/ms-MY.ts +12 -3
- package/packages/language/nb-NO.ts +12 -3
- package/packages/language/pt-BR.ts +12 -3
- package/packages/language/ru-RU.ts +12 -3
- package/packages/language/th-TH.ts +12 -3
- package/packages/language/ug-CN.ts +12 -3
- package/packages/language/uk-UA.ts +12 -3
- package/packages/language/uz-UZ.ts +12 -3
- package/packages/language/vi-VN.ts +11 -2
- package/packages/language/zh-CHT.ts +14 -5
- package/packages/language/zh-CN.ts +14 -5
- package/packages/radio/src/button.ts +35 -4
- package/packages/radio/src/group.ts +17 -3
- package/packages/upload/src/upload.ts +30 -13
- package/styles/components/checkbox-button.scss +20 -0
- package/styles/components/radio-button.scss +21 -0
- package/styles/components/radio.scss +1 -1
- package/types/components/checkbox-button.d.ts +9 -1
- package/types/components/checkbox-group.d.ts +5 -1
- package/types/components/radio-button.d.ts +2 -0
- package/types/components/radio-group.d.ts +4 -0
- package/types/components/table.d.ts +70 -8
- package/types/components/upload.d.ts +17 -0
- package/types/ui/global-icon.d.ts +9 -0
- /package/es/icon/{iconfont.1782890371900.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/es/icon/{iconfont.1782890371900.woff → iconfont.1782978164206.woff} +0 -0
- /package/es/icon/{iconfont.1782890371900.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/es/{iconfont.1782890371900.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/es/{iconfont.1782890371900.woff → iconfont.1782978164206.woff} +0 -0
- /package/es/{iconfont.1782890371900.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782890371900.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782890371900.woff → iconfont.1782978164206.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782890371900.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/lib/{iconfont.1782890371900.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/lib/{iconfont.1782890371900.woff → iconfont.1782978164206.woff} +0 -0
- /package/lib/{iconfont.1782890371900.woff2 → iconfont.1782978164206.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.15.
|
|
84
|
+
const uiVersion = `ui v${"4.15.20"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$c = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.15.
|
|
98
|
+
const version = "4.15.20";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -960,10 +960,16 @@ var zhCN = {
|
|
|
960
960
|
colResizable: '列宽(像素)',
|
|
961
961
|
colVisible: '是否显示',
|
|
962
962
|
colFixed: '冻结列',
|
|
963
|
-
colFixedMax: '
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
963
|
+
colFixedMax: '冻结列({0})',
|
|
964
|
+
colAlign: '对齐方式',
|
|
965
|
+
colHeadAlign: '表头对齐方式',
|
|
966
|
+
colFootAlign: '表尾对齐方式',
|
|
967
|
+
fixedLeft: '左',
|
|
968
|
+
fixedUnset: '无',
|
|
969
|
+
fixedRight: '右',
|
|
970
|
+
alignLeft: '左',
|
|
971
|
+
alignCenter: '中',
|
|
972
|
+
alignRight: '右',
|
|
967
973
|
moveUp: '上移',
|
|
968
974
|
moveDn: '下移',
|
|
969
975
|
putTop: '置顶',
|
|
@@ -971,7 +977,10 @@ var zhCN = {
|
|
|
971
977
|
moveUpTitle: '点击向上移动',
|
|
972
978
|
moveDnTitle: '点击向下移动',
|
|
973
979
|
putTopTitle: '点击置顶',
|
|
974
|
-
putBottomTitle: '点击置尾'
|
|
980
|
+
putBottomTitle: '点击置尾',
|
|
981
|
+
anLeftTitle: '左对齐',
|
|
982
|
+
anCenterTitle: '居中',
|
|
983
|
+
anRightTitle: '右对齐'
|
|
975
984
|
}
|
|
976
985
|
},
|
|
977
986
|
import: {
|
|
@@ -12979,6 +12988,9 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
12979
12988
|
name: 'VxeCheckboxButton',
|
|
12980
12989
|
props: {
|
|
12981
12990
|
modelValue: [String, Number, Boolean],
|
|
12991
|
+
/**
|
|
12992
|
+
* 已废弃,被 checkedValue 替换
|
|
12993
|
+
*/
|
|
12982
12994
|
label: {
|
|
12983
12995
|
type: [String, Number, Boolean],
|
|
12984
12996
|
default: null
|
|
@@ -12986,13 +12998,14 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
12986
12998
|
title: [String, Number],
|
|
12987
12999
|
checkedValue: {
|
|
12988
13000
|
type: [String, Number, Boolean],
|
|
12989
|
-
default:
|
|
13001
|
+
default: undefined
|
|
12990
13002
|
},
|
|
12991
13003
|
uncheckedValue: {
|
|
12992
13004
|
type: [String, Number, Boolean],
|
|
12993
13005
|
default: false
|
|
12994
13006
|
},
|
|
12995
13007
|
content: [String, Number],
|
|
13008
|
+
icon: [String, Number],
|
|
12996
13009
|
disabled: {
|
|
12997
13010
|
type: Boolean,
|
|
12998
13011
|
default: null
|
|
@@ -13020,11 +13033,16 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13020
13033
|
context,
|
|
13021
13034
|
reactData
|
|
13022
13035
|
};
|
|
13036
|
+
const computeCheckValue = computed(() => {
|
|
13037
|
+
const { checkedValue, label } = props;
|
|
13038
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
13039
|
+
});
|
|
13023
13040
|
const computeIsChecked = computed(() => {
|
|
13041
|
+
const checkValue = computeCheckValue.value;
|
|
13024
13042
|
if ($xeCheckboxGroup) {
|
|
13025
|
-
return XEUtils.includes($xeCheckboxGroup.props.modelValue,
|
|
13043
|
+
return XEUtils.includes($xeCheckboxGroup.props.modelValue, checkValue);
|
|
13026
13044
|
}
|
|
13027
|
-
return props.modelValue ===
|
|
13045
|
+
return props.modelValue === checkValue;
|
|
13028
13046
|
});
|
|
13029
13047
|
const computeIsDisabled = computed(() => {
|
|
13030
13048
|
const { disabled } = props;
|
|
@@ -13041,16 +13059,19 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13041
13059
|
return disabled;
|
|
13042
13060
|
});
|
|
13043
13061
|
const changeEvent = (evnt) => {
|
|
13044
|
-
const {
|
|
13062
|
+
const { uncheckedValue } = props;
|
|
13045
13063
|
const isDisabled = computeIsDisabled.value;
|
|
13064
|
+
const checkValue = computeCheckValue.value;
|
|
13046
13065
|
if (!isDisabled) {
|
|
13047
13066
|
const checked = evnt.target.checked;
|
|
13048
|
-
const value = checked ? checkedValue : uncheckedValue;
|
|
13049
|
-
const params = { checked, value, label: props.label };
|
|
13050
13067
|
if ($xeCheckboxGroup) {
|
|
13068
|
+
const value = checkValue;
|
|
13069
|
+
const params = { checked, value, label: value };
|
|
13051
13070
|
$xeCheckboxGroup.handleChecked(params, evnt);
|
|
13052
13071
|
}
|
|
13053
13072
|
else {
|
|
13073
|
+
const value = checked ? checkValue : uncheckedValue;
|
|
13074
|
+
const params = { checked, value, label: value };
|
|
13054
13075
|
emit('update:modelValue', value);
|
|
13055
13076
|
$xeCheckboxButton.dispatchEvent('change', params, evnt);
|
|
13056
13077
|
// 自动更新校验状态
|
|
@@ -13068,10 +13089,11 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13068
13089
|
const checkboxButtonPrivateMethods = {};
|
|
13069
13090
|
Object.assign($xeCheckboxButton, checkboxButtonMethods, checkboxButtonPrivateMethods);
|
|
13070
13091
|
const renderVN = () => {
|
|
13071
|
-
const {
|
|
13092
|
+
const { icon, content } = props;
|
|
13072
13093
|
const vSize = computeSize.value;
|
|
13073
13094
|
const isDisabled = computeIsDisabled.value;
|
|
13074
13095
|
const isChecked = computeIsChecked.value;
|
|
13096
|
+
const checkValue = computeCheckValue.value;
|
|
13075
13097
|
const defaultSlot = slots.default;
|
|
13076
13098
|
if ($xeCheckboxGroup) {
|
|
13077
13099
|
const { computeIsReadonly: computeIsGroupReadonly } = $xeCheckboxGroup.getComputeMaps();
|
|
@@ -13086,14 +13108,29 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13086
13108
|
}, [
|
|
13087
13109
|
h('span', {
|
|
13088
13110
|
class: 'vxe-checkbox--label'
|
|
13089
|
-
}, defaultSlot
|
|
13111
|
+
}, defaultSlot
|
|
13112
|
+
? defaultSlot({})
|
|
13113
|
+
: [
|
|
13114
|
+
icon
|
|
13115
|
+
? h('span', {
|
|
13116
|
+
class: 'vxe-checkbox--button-icon'
|
|
13117
|
+
}, [
|
|
13118
|
+
h('i', { class: icon })
|
|
13119
|
+
])
|
|
13120
|
+
: renderEmptyElement($xeCheckboxButton),
|
|
13121
|
+
content
|
|
13122
|
+
? h('span', {
|
|
13123
|
+
class: 'vxe-checkbox--button-content'
|
|
13124
|
+
}, getFuncText(content))
|
|
13125
|
+
: renderEmptyElement($xeCheckboxButton)
|
|
13126
|
+
])
|
|
13090
13127
|
]);
|
|
13091
13128
|
}
|
|
13092
13129
|
return renderEmptyElement($xeCheckboxButton);
|
|
13093
13130
|
}
|
|
13094
13131
|
}
|
|
13095
13132
|
return h('label', {
|
|
13096
|
-
key:
|
|
13133
|
+
key: `${checkValue}`,
|
|
13097
13134
|
class: ['vxe-checkbox vxe-checkbox--button', {
|
|
13098
13135
|
[`size--${vSize}`]: vSize,
|
|
13099
13136
|
'is--disabled': isDisabled
|
|
@@ -13111,7 +13148,22 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13111
13148
|
class: ['vxe-checkbox--label', {
|
|
13112
13149
|
'is--disabled': isDisabled
|
|
13113
13150
|
}]
|
|
13114
|
-
},
|
|
13151
|
+
}, defaultSlot
|
|
13152
|
+
? defaultSlot({})
|
|
13153
|
+
: [
|
|
13154
|
+
icon
|
|
13155
|
+
? h('span', {
|
|
13156
|
+
class: 'vxe-checkbox--button-icon'
|
|
13157
|
+
}, [
|
|
13158
|
+
h('i', { class: icon })
|
|
13159
|
+
])
|
|
13160
|
+
: renderEmptyElement($xeCheckboxButton),
|
|
13161
|
+
content
|
|
13162
|
+
? h('span', {
|
|
13163
|
+
class: 'vxe-checkbox--button-content'
|
|
13164
|
+
}, getFuncText(content))
|
|
13165
|
+
: renderEmptyElement($xeCheckboxButton)
|
|
13166
|
+
])
|
|
13115
13167
|
]);
|
|
13116
13168
|
};
|
|
13117
13169
|
$xeCheckboxButton.renderVN = renderVN;
|
|
@@ -13217,6 +13269,14 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
13217
13269
|
const propsOpts = computePropsOpts.value;
|
|
13218
13270
|
return propsOpts.value || 'value';
|
|
13219
13271
|
});
|
|
13272
|
+
const computeIconField = computed(() => {
|
|
13273
|
+
const propsOpts = computePropsOpts.value;
|
|
13274
|
+
return propsOpts.icon || 'icon';
|
|
13275
|
+
});
|
|
13276
|
+
const computeTitleField = computed(() => {
|
|
13277
|
+
const propsOpts = computePropsOpts.value;
|
|
13278
|
+
return propsOpts.title || 'title';
|
|
13279
|
+
});
|
|
13220
13280
|
const computeDisabledField = computed(() => {
|
|
13221
13281
|
const propsOpts = computePropsOpts.value;
|
|
13222
13282
|
return propsOpts.disabled || 'disabled';
|
|
@@ -13302,6 +13362,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
13302
13362
|
const valueField = computeValueField.value;
|
|
13303
13363
|
const labelField = computeLabelField.value;
|
|
13304
13364
|
const disabledField = computeDisabledField.value;
|
|
13365
|
+
const iconField = computeIconField.value;
|
|
13366
|
+
const titleField = computeTitleField.value;
|
|
13305
13367
|
const isReadonly = computeIsReadonly.value;
|
|
13306
13368
|
const isDisabled = computeIsDisabled.value;
|
|
13307
13369
|
return h('div', {
|
|
@@ -13316,8 +13378,10 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
13316
13378
|
? options.map(item => {
|
|
13317
13379
|
return h(VxeCheckboxComponent, {
|
|
13318
13380
|
key: item[valueField],
|
|
13319
|
-
|
|
13381
|
+
checkedValue: item[valueField],
|
|
13320
13382
|
content: item[labelField],
|
|
13383
|
+
icon: item[iconField],
|
|
13384
|
+
title: item[titleField],
|
|
13321
13385
|
disabled: item[disabledField]
|
|
13322
13386
|
});
|
|
13323
13387
|
})
|
|
@@ -33808,6 +33872,7 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33808
33872
|
},
|
|
33809
33873
|
title: [String, Number],
|
|
33810
33874
|
content: [String, Number],
|
|
33875
|
+
icon: String,
|
|
33811
33876
|
disabled: {
|
|
33812
33877
|
type: Boolean,
|
|
33813
33878
|
default: null
|
|
@@ -33911,7 +33976,7 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33911
33976
|
}
|
|
33912
33977
|
};
|
|
33913
33978
|
const renderVN = () => {
|
|
33914
|
-
const { label, content, checkedValue } = props;
|
|
33979
|
+
const { label, icon, content, checkedValue } = props;
|
|
33915
33980
|
const radioValue = XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
33916
33981
|
const vSize = computeSize.value;
|
|
33917
33982
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -33930,8 +33995,23 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33930
33995
|
}]
|
|
33931
33996
|
}, [
|
|
33932
33997
|
h('span', {
|
|
33933
|
-
class: 'vxe-
|
|
33934
|
-
}, defaultSlot
|
|
33998
|
+
class: 'vxe-radio--label'
|
|
33999
|
+
}, defaultSlot
|
|
34000
|
+
? defaultSlot({})
|
|
34001
|
+
: [
|
|
34002
|
+
icon
|
|
34003
|
+
? h('span', {
|
|
34004
|
+
class: 'vxe-radio--button-icon'
|
|
34005
|
+
}, [
|
|
34006
|
+
h('i', { class: icon })
|
|
34007
|
+
])
|
|
34008
|
+
: renderEmptyElement($xeRadioButton),
|
|
34009
|
+
content
|
|
34010
|
+
? h('span', {
|
|
34011
|
+
class: 'vxe-radio--button-content'
|
|
34012
|
+
}, getFuncText(content))
|
|
34013
|
+
: renderEmptyElement($xeRadioButton)
|
|
34014
|
+
])
|
|
33935
34015
|
]);
|
|
33936
34016
|
}
|
|
33937
34017
|
return renderEmptyElement($xeRadioButton);
|
|
@@ -33958,7 +34038,22 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33958
34038
|
class: ['vxe-radio--label', {
|
|
33959
34039
|
'is--disabled': isDisabled
|
|
33960
34040
|
}]
|
|
33961
|
-
}, defaultSlot
|
|
34041
|
+
}, defaultSlot
|
|
34042
|
+
? defaultSlot({})
|
|
34043
|
+
: [
|
|
34044
|
+
icon
|
|
34045
|
+
? h('span', {
|
|
34046
|
+
class: 'vxe-radio--button-icon'
|
|
34047
|
+
}, [
|
|
34048
|
+
h('i', { class: icon })
|
|
34049
|
+
])
|
|
34050
|
+
: renderEmptyElement($xeRadioButton),
|
|
34051
|
+
content
|
|
34052
|
+
? h('span', {
|
|
34053
|
+
class: 'vxe-radio--button-content'
|
|
34054
|
+
}, getFuncText(content))
|
|
34055
|
+
: renderEmptyElement($xeRadioButton)
|
|
34056
|
+
])
|
|
33962
34057
|
]);
|
|
33963
34058
|
};
|
|
33964
34059
|
$xeRadioButton.renderVN = renderVN;
|
|
@@ -34075,6 +34170,14 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
34075
34170
|
const propsOpts = computePropsOpts.value;
|
|
34076
34171
|
return propsOpts.disabled || 'disabled';
|
|
34077
34172
|
});
|
|
34173
|
+
const computeIconField = computed(() => {
|
|
34174
|
+
const propsOpts = computePropsOpts.value;
|
|
34175
|
+
return propsOpts.icon || 'icon';
|
|
34176
|
+
});
|
|
34177
|
+
const computeTitleField = computed(() => {
|
|
34178
|
+
const propsOpts = computePropsOpts.value;
|
|
34179
|
+
return propsOpts.title || 'title';
|
|
34180
|
+
});
|
|
34078
34181
|
const emitModel = (value) => {
|
|
34079
34182
|
emit('update:modelValue', value);
|
|
34080
34183
|
};
|
|
@@ -34130,6 +34233,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
34130
34233
|
const valueField = computeValueField.value;
|
|
34131
34234
|
const labelField = computeLabelField.value;
|
|
34132
34235
|
const disabledField = computeDisabledField.value;
|
|
34236
|
+
const iconField = computeIconField.value;
|
|
34237
|
+
const titleField = computeTitleField.value;
|
|
34133
34238
|
const btnComp = type === 'button' ? VxeRadioButtonComponent : VxeRadioComponent;
|
|
34134
34239
|
return h('div', {
|
|
34135
34240
|
class: ['vxe-radio-group', {
|
|
@@ -34144,6 +34249,8 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
34144
34249
|
key: item[valueField],
|
|
34145
34250
|
checkedValue: item[valueField],
|
|
34146
34251
|
content: item[labelField],
|
|
34252
|
+
icon: item[iconField],
|
|
34253
|
+
title: item[titleField],
|
|
34147
34254
|
disabled: item[disabledField]
|
|
34148
34255
|
});
|
|
34149
34256
|
})
|
|
@@ -44164,6 +44271,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44164
44271
|
},
|
|
44165
44272
|
emits: [
|
|
44166
44273
|
'update:modelValue',
|
|
44274
|
+
'change',
|
|
44167
44275
|
'add',
|
|
44168
44276
|
'remove',
|
|
44169
44277
|
'remove-fail',
|
|
@@ -44403,11 +44511,11 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44403
44511
|
const emitModel = (value) => {
|
|
44404
44512
|
emit('update:modelValue', value);
|
|
44405
44513
|
};
|
|
44406
|
-
const
|
|
44514
|
+
const handleChangeEvent = (evnt, vals) => {
|
|
44407
44515
|
const { singleMode, urlMode, urlArgs } = props;
|
|
44408
44516
|
const urlProp = computeUrlProp.value;
|
|
44409
44517
|
const nameProp = computeNameProp.value;
|
|
44410
|
-
let restList =
|
|
44518
|
+
let restList = vals ? vals.slice(0) : [];
|
|
44411
44519
|
if (urlMode) {
|
|
44412
44520
|
restList = restList.map(item => {
|
|
44413
44521
|
const url = item[urlProp];
|
|
@@ -44422,7 +44530,10 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44422
44530
|
return url;
|
|
44423
44531
|
});
|
|
44424
44532
|
}
|
|
44425
|
-
|
|
44533
|
+
const value = singleMode ? (restList[0] || null) : restList;
|
|
44534
|
+
emitModel(value);
|
|
44535
|
+
dispatchEvent('change', { value }, evnt);
|
|
44536
|
+
return value;
|
|
44426
44537
|
};
|
|
44427
44538
|
const getThumbnailFileUrl = (item) => {
|
|
44428
44539
|
const getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig$3().upload.getThumbnailUrlMethod;
|
|
@@ -44526,6 +44637,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44526
44637
|
if (cacheItem) {
|
|
44527
44638
|
cacheItem.percent = 100;
|
|
44528
44639
|
cacheItem.status = 'success';
|
|
44640
|
+
cacheItem.response = res;
|
|
44529
44641
|
}
|
|
44530
44642
|
Object.assign(item, res);
|
|
44531
44643
|
dispatchEvent('upload-success', { option: item, data: res }, null);
|
|
@@ -44534,6 +44646,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44534
44646
|
const cacheItem = fileCacheMaps[fileKey];
|
|
44535
44647
|
if (cacheItem) {
|
|
44536
44648
|
cacheItem.status = 'error';
|
|
44649
|
+
cacheItem.response = res;
|
|
44537
44650
|
}
|
|
44538
44651
|
if (showErrorStatus) {
|
|
44539
44652
|
Object.assign(item, res);
|
|
@@ -44561,7 +44674,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44561
44674
|
}
|
|
44562
44675
|
return Promise.resolve();
|
|
44563
44676
|
};
|
|
44564
|
-
const
|
|
44677
|
+
const handleReUploadEvent = (evnt, item) => {
|
|
44565
44678
|
const { uploadMethod, urlMode } = props;
|
|
44566
44679
|
const { fileCacheMaps } = reactData;
|
|
44567
44680
|
const fileKey = getFieldKey(item);
|
|
@@ -44574,7 +44687,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44574
44687
|
cacheItem.percent = 0;
|
|
44575
44688
|
handleUploadResult(item, file).then(() => {
|
|
44576
44689
|
if (urlMode) {
|
|
44577
|
-
|
|
44690
|
+
handleChangeEvent(evnt, reactData.fileList);
|
|
44578
44691
|
}
|
|
44579
44692
|
});
|
|
44580
44693
|
}
|
|
@@ -44677,7 +44790,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44677
44790
|
file: file,
|
|
44678
44791
|
loading: !!autoSubmit,
|
|
44679
44792
|
status: 'pending',
|
|
44680
|
-
percent: 0
|
|
44793
|
+
percent: 0,
|
|
44794
|
+
response: null
|
|
44681
44795
|
};
|
|
44682
44796
|
}
|
|
44683
44797
|
const item = reactive(fileObj);
|
|
@@ -44694,9 +44808,19 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44694
44808
|
dispatchEvent('add', { option: item }, evnt);
|
|
44695
44809
|
});
|
|
44696
44810
|
Promise.all(uploadPromiseRests).then(() => {
|
|
44811
|
+
const { fileCacheMaps } = reactData;
|
|
44697
44812
|
const restFileList = reactData.fileList;
|
|
44698
|
-
|
|
44699
|
-
|
|
44813
|
+
const uploadResults = restFileList.map(option => {
|
|
44814
|
+
const fileKey = getFieldKey(option);
|
|
44815
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
44816
|
+
return {
|
|
44817
|
+
option,
|
|
44818
|
+
status: cacheItem ? cacheItem.status : null,
|
|
44819
|
+
response: cacheItem ? cacheItem.response : null
|
|
44820
|
+
};
|
|
44821
|
+
});
|
|
44822
|
+
const value = handleChangeEvent(evnt, restFileList);
|
|
44823
|
+
dispatchEvent('upload-queue-end', { value, options: restFileList, results: uploadResults, files: selectFiles }, evnt);
|
|
44700
44824
|
// 自动更新校验状态
|
|
44701
44825
|
if ($xeForm && formItemInfo) {
|
|
44702
44826
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, restFileList);
|
|
@@ -44730,7 +44854,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44730
44854
|
const handleRemoveEvent = (evnt, item, index) => {
|
|
44731
44855
|
const { fileList } = reactData;
|
|
44732
44856
|
fileList.splice(index, 1);
|
|
44733
|
-
|
|
44857
|
+
handleChangeEvent(evnt, fileList);
|
|
44734
44858
|
// 自动更新校验状态
|
|
44735
44859
|
if ($xeForm && formItemInfo) {
|
|
44736
44860
|
$xeForm.triggerItemEvent(evnt || { type: 'remove' }, formItemInfo.itemConfig.field, fileList);
|
|
@@ -45315,8 +45439,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
45315
45439
|
mode: 'text',
|
|
45316
45440
|
status: 'primary',
|
|
45317
45441
|
content: isError ? getI18n$2('vxe.upload.reUpload') : getI18n$2('vxe.upload.manualUpload'),
|
|
45318
|
-
onClick() {
|
|
45319
|
-
|
|
45442
|
+
onClick(evnt) {
|
|
45443
|
+
handleReUploadEvent(evnt, item);
|
|
45320
45444
|
}
|
|
45321
45445
|
})
|
|
45322
45446
|
])
|
|
@@ -45546,8 +45670,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
45546
45670
|
mode: 'text',
|
|
45547
45671
|
status: 'primary',
|
|
45548
45672
|
content: isError ? getI18n$2('vxe.upload.reUpload') : getI18n$2('vxe.upload.manualUpload'),
|
|
45549
|
-
onClick() {
|
|
45550
|
-
|
|
45673
|
+
onClick(evnt) {
|
|
45674
|
+
handleReUploadEvent(evnt, item);
|
|
45551
45675
|
}
|
|
45552
45676
|
})
|
|
45553
45677
|
])
|