vxe-pc-ui 4.15.20 → 4.15.22
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 +110 -57
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/checkbox/src/button.js +9 -1
- package/es/checkbox/src/checkbox.js +27 -7
- package/es/icon/style.css +1 -1
- package/es/radio/src/button.js +27 -15
- package/es/radio/src/radio.js +27 -15
- 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 +8 -3
- package/lib/checkbox/src/button.js +10 -0
- package/lib/checkbox/src/button.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +37 -10
- 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 +120 -65
- package/lib/index.umd.min.js +1 -1
- package/lib/radio/src/button.js +31 -25
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +31 -25
- 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 +9 -3
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/checkbox/src/button.ts +11 -1
- package/packages/checkbox/src/checkbox.ts +30 -7
- package/packages/radio/src/button.ts +30 -15
- package/packages/radio/src/radio.ts +30 -15
- package/packages/upload/src/upload.ts +8 -3
- package/types/components/checkbox-button.d.ts +3 -0
- package/types/components/checkbox.d.ts +6 -1
- package/types/components/radio-button.d.ts +3 -1
- package/types/components/radio.d.ts +6 -1
- package/types/components/upload.d.ts +3 -1
- /package/es/icon/{iconfont.1782978164206.ttf → iconfont.1783065896433.ttf} +0 -0
- /package/es/icon/{iconfont.1782978164206.woff → iconfont.1783065896433.woff} +0 -0
- /package/es/icon/{iconfont.1782978164206.woff2 → iconfont.1783065896433.woff2} +0 -0
- /package/es/{iconfont.1782978164206.ttf → iconfont.1783065896433.ttf} +0 -0
- /package/es/{iconfont.1782978164206.woff → iconfont.1783065896433.woff} +0 -0
- /package/es/{iconfont.1782978164206.woff2 → iconfont.1783065896433.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782978164206.ttf → iconfont.1783065896433.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782978164206.woff → iconfont.1783065896433.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782978164206.woff2 → iconfont.1783065896433.woff2} +0 -0
- /package/lib/{iconfont.1782978164206.ttf → iconfont.1783065896433.ttf} +0 -0
- /package/lib/{iconfont.1782978164206.woff → iconfont.1783065896433.woff} +0 -0
- /package/lib/{iconfont.1782978164206.woff2 → iconfont.1783065896433.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.22"}`;
|
|
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}` : '';
|
|
@@ -92,18 +92,18 @@ function createComponentLog(name) {
|
|
|
92
92
|
errLog: log.create('error', versionInfo + '] [' + name)
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
const warnLog$
|
|
95
|
+
const warnLog$g = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.15.
|
|
98
|
+
const version = "4.15.22";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
102
|
-
warnLog$
|
|
102
|
+
warnLog$g('vxe.error.delFunc', ['config', 'setConfig']);
|
|
103
103
|
return setConfig$1(options);
|
|
104
104
|
}
|
|
105
105
|
function setup(options) {
|
|
106
|
-
warnLog$
|
|
106
|
+
warnLog$g('vxe.error.delFunc', ['setup', 'setConfig']);
|
|
107
107
|
return setConfig$1(options);
|
|
108
108
|
}
|
|
109
109
|
VxeUI.config = config;
|
|
@@ -3108,7 +3108,7 @@ dynamicApp.use(VxeTooltip);
|
|
|
3108
3108
|
VxeUI.component(VxeTooltipComponent);
|
|
3109
3109
|
const Tooltip = VxeTooltip;
|
|
3110
3110
|
|
|
3111
|
-
const { warnLog: warnLog$
|
|
3111
|
+
const { warnLog: warnLog$f } = createComponentLog('button');
|
|
3112
3112
|
const VxeButtonComponent = defineVxeComponent({
|
|
3113
3113
|
name: 'VxeButton',
|
|
3114
3114
|
props: {
|
|
@@ -3827,7 +3827,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
3827
3827
|
$xeButton.renderVN = renderVN;
|
|
3828
3828
|
onMounted(() => {
|
|
3829
3829
|
if (props.type === 'text') {
|
|
3830
|
-
warnLog$
|
|
3830
|
+
warnLog$f('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
3831
3831
|
}
|
|
3832
3832
|
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
|
|
3833
3833
|
globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -8389,7 +8389,7 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
|
|
|
8389
8389
|
}
|
|
8390
8390
|
}
|
|
8391
8391
|
|
|
8392
|
-
const { warnLog: warnLog$
|
|
8392
|
+
const { warnLog: warnLog$e } = createComponentLog('input');
|
|
8393
8393
|
var VxeInputComponent = defineVxeComponent({
|
|
8394
8394
|
name: 'VxeInput',
|
|
8395
8395
|
props: {
|
|
@@ -11026,13 +11026,13 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11026
11026
|
onMounted(() => {
|
|
11027
11027
|
const { type } = props;
|
|
11028
11028
|
if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
|
|
11029
|
-
warnLog$
|
|
11029
|
+
warnLog$e('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
|
|
11030
11030
|
}
|
|
11031
11031
|
else if (['number', 'integer', 'float'].includes(type)) {
|
|
11032
|
-
warnLog$
|
|
11032
|
+
warnLog$e('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
|
|
11033
11033
|
}
|
|
11034
11034
|
else if (['password'].includes(type)) {
|
|
11035
|
-
warnLog$
|
|
11035
|
+
warnLog$e('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
|
|
11036
11036
|
}
|
|
11037
11037
|
const inputElem = refInputTarget.value;
|
|
11038
11038
|
if (inputElem) {
|
|
@@ -12822,10 +12822,15 @@ dynamicApp.use(VxeCascader);
|
|
|
12822
12822
|
VxeUI.component(VxeCascaderComponent);
|
|
12823
12823
|
const Cascader = VxeCascader;
|
|
12824
12824
|
|
|
12825
|
+
const { warnLog: warnLog$d } = createComponentLog('checkbox');
|
|
12825
12826
|
var VxeCheckboxComponent = defineVxeComponent({
|
|
12826
12827
|
name: 'VxeCheckbox',
|
|
12827
12828
|
props: {
|
|
12828
12829
|
modelValue: [String, Number, Boolean],
|
|
12830
|
+
/**
|
|
12831
|
+
* 已废弃,被 checkedValue 替换
|
|
12832
|
+
* @deprecated
|
|
12833
|
+
*/
|
|
12829
12834
|
label: {
|
|
12830
12835
|
type: [String, Number],
|
|
12831
12836
|
default: null
|
|
@@ -12869,9 +12874,14 @@ var VxeCheckboxComponent = defineVxeComponent({
|
|
|
12869
12874
|
};
|
|
12870
12875
|
let checkboxMethods = {};
|
|
12871
12876
|
const { computeSize } = useSize(props);
|
|
12877
|
+
const computeCheckValue = computed(() => {
|
|
12878
|
+
const { checkedValue, label } = props;
|
|
12879
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
12880
|
+
});
|
|
12872
12881
|
const computeIsChecked = computed(() => {
|
|
12882
|
+
const checkValue = computeCheckValue.value;
|
|
12873
12883
|
if ($xeCheckboxGroup) {
|
|
12874
|
-
return XEUtils.includes($xeCheckboxGroup.props.modelValue,
|
|
12884
|
+
return XEUtils.includes($xeCheckboxGroup.props.modelValue, checkValue);
|
|
12875
12885
|
}
|
|
12876
12886
|
return props.modelValue === props.checkedValue;
|
|
12877
12887
|
});
|
|
@@ -12890,16 +12900,19 @@ var VxeCheckboxComponent = defineVxeComponent({
|
|
|
12890
12900
|
return disabled;
|
|
12891
12901
|
});
|
|
12892
12902
|
const changeEvent = (evnt) => {
|
|
12893
|
-
const {
|
|
12903
|
+
const { uncheckedValue } = props;
|
|
12894
12904
|
const isDisabled = computeIsDisabled.value;
|
|
12905
|
+
const checkValue = computeCheckValue.value;
|
|
12895
12906
|
if (!isDisabled) {
|
|
12896
12907
|
const checked = evnt.target.checked;
|
|
12897
|
-
const value = checked ? checkedValue : uncheckedValue;
|
|
12898
|
-
const params = { checked, value, label: props.label };
|
|
12899
12908
|
if ($xeCheckboxGroup) {
|
|
12909
|
+
const value = checkValue;
|
|
12910
|
+
const params = { checked, value, label: value };
|
|
12900
12911
|
$xeCheckboxGroup.handleChecked(params, evnt);
|
|
12901
12912
|
}
|
|
12902
12913
|
else {
|
|
12914
|
+
const value = checked ? checkValue : uncheckedValue;
|
|
12915
|
+
const params = { checked, value, label: value };
|
|
12903
12916
|
emit('update:modelValue', value);
|
|
12904
12917
|
checkboxMethods.dispatchEvent('change', params, evnt);
|
|
12905
12918
|
// 自动更新校验状态
|
|
@@ -12917,10 +12930,11 @@ var VxeCheckboxComponent = defineVxeComponent({
|
|
|
12917
12930
|
};
|
|
12918
12931
|
Object.assign($xeCheckbox, checkboxMethods);
|
|
12919
12932
|
const renderVN = () => {
|
|
12920
|
-
const {
|
|
12933
|
+
const { content } = props;
|
|
12921
12934
|
const vSize = computeSize.value;
|
|
12922
12935
|
const isDisabled = computeIsDisabled.value;
|
|
12923
12936
|
const isChecked = computeIsChecked.value;
|
|
12937
|
+
const checkValue = computeCheckValue.value;
|
|
12924
12938
|
const indeterminate = !isChecked && props.indeterminate;
|
|
12925
12939
|
const defaultSlot = slots.default;
|
|
12926
12940
|
if ($xeCheckboxGroup) {
|
|
@@ -12943,7 +12957,7 @@ var VxeCheckboxComponent = defineVxeComponent({
|
|
|
12943
12957
|
}
|
|
12944
12958
|
}
|
|
12945
12959
|
return h('label', {
|
|
12946
|
-
key:
|
|
12960
|
+
key: `${checkValue}`,
|
|
12947
12961
|
class: ['vxe-checkbox vxe-checkbox--default', {
|
|
12948
12962
|
[`size--${vSize}`]: vSize,
|
|
12949
12963
|
'is--indeterminate': indeterminate,
|
|
@@ -12967,6 +12981,11 @@ var VxeCheckboxComponent = defineVxeComponent({
|
|
|
12967
12981
|
}, defaultSlot ? defaultSlot({}) : getFuncText(content))
|
|
12968
12982
|
]);
|
|
12969
12983
|
};
|
|
12984
|
+
onMounted(() => {
|
|
12985
|
+
if (props.label !== null) {
|
|
12986
|
+
warnLog$d('vxe.error.delProp', ['label', 'checked-value']);
|
|
12987
|
+
}
|
|
12988
|
+
});
|
|
12970
12989
|
$xeCheckbox.renderVN = renderVN;
|
|
12971
12990
|
return $xeCheckbox;
|
|
12972
12991
|
},
|
|
@@ -12984,12 +13003,14 @@ dynamicApp.use(VxeCheckbox);
|
|
|
12984
13003
|
VxeUI.component(VxeCheckboxComponent);
|
|
12985
13004
|
const Checkbox = VxeCheckbox;
|
|
12986
13005
|
|
|
13006
|
+
const { warnLog: warnLog$c } = createComponentLog('checkbox-button');
|
|
12987
13007
|
var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
12988
13008
|
name: 'VxeCheckboxButton',
|
|
12989
13009
|
props: {
|
|
12990
13010
|
modelValue: [String, Number, Boolean],
|
|
12991
13011
|
/**
|
|
12992
13012
|
* 已废弃,被 checkedValue 替换
|
|
13013
|
+
* @deprecated
|
|
12993
13014
|
*/
|
|
12994
13015
|
label: {
|
|
12995
13016
|
type: [String, Number, Boolean],
|
|
@@ -13166,6 +13187,11 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
|
|
|
13166
13187
|
])
|
|
13167
13188
|
]);
|
|
13168
13189
|
};
|
|
13190
|
+
onMounted(() => {
|
|
13191
|
+
if (props.label !== null) {
|
|
13192
|
+
warnLog$c('vxe.error.delProp', ['label', 'checked-value']);
|
|
13193
|
+
}
|
|
13194
|
+
});
|
|
13169
13195
|
$xeCheckboxButton.renderVN = renderVN;
|
|
13170
13196
|
return renderVN;
|
|
13171
13197
|
}
|
|
@@ -19127,7 +19153,7 @@ dynamicApp.use(VxeDatePanel);
|
|
|
19127
19153
|
VxeUI.component(VxeDatePanelComponent);
|
|
19128
19154
|
const DatePanel = VxeDatePanel;
|
|
19129
19155
|
|
|
19130
|
-
const { warnLog: warnLog$
|
|
19156
|
+
const { warnLog: warnLog$b, errLog: errLog$e } = createComponentLog('date-picker');
|
|
19131
19157
|
const defaultMaskPlaceholder = '_';
|
|
19132
19158
|
const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
|
|
19133
19159
|
const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
|
|
@@ -20705,7 +20731,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
20705
20731
|
errLog$e('vxe.error.notSupportProp', ['multiple', 'control-config.enabled=true', 'control-config.enabled=false']);
|
|
20706
20732
|
}
|
|
20707
20733
|
if (!maskedTypes.includes(type)) {
|
|
20708
|
-
warnLog$
|
|
20734
|
+
warnLog$b('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
|
|
20709
20735
|
}
|
|
20710
20736
|
}
|
|
20711
20737
|
});
|
|
@@ -24088,7 +24114,7 @@ renderer.mixin({
|
|
|
24088
24114
|
// 以上已废弃
|
|
24089
24115
|
});
|
|
24090
24116
|
|
|
24091
|
-
const { warnLog: warnLog$
|
|
24117
|
+
const { warnLog: warnLog$a, errLog: errLog$a } = createComponentLog('form');
|
|
24092
24118
|
class Rule {
|
|
24093
24119
|
constructor(rule) {
|
|
24094
24120
|
Object.assign(this, {
|
|
@@ -24620,7 +24646,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
24620
24646
|
customValid = validatorMethod(validParams);
|
|
24621
24647
|
}
|
|
24622
24648
|
else {
|
|
24623
|
-
warnLog$
|
|
24649
|
+
warnLog$a('vxe.error.notValidators', [validator]);
|
|
24624
24650
|
}
|
|
24625
24651
|
}
|
|
24626
24652
|
else {
|
|
@@ -28028,7 +28054,7 @@ dynamicApp.use(VxeMenu);
|
|
|
28028
28054
|
VxeUI.component(VxeMenuComponent);
|
|
28029
28055
|
const Menu = VxeMenu;
|
|
28030
28056
|
|
|
28031
|
-
const { warnLog: warnLog$
|
|
28057
|
+
const { warnLog: warnLog$9, errLog: errLog$8 } = createComponentLog('modal');
|
|
28032
28058
|
const allActiveModals = [];
|
|
28033
28059
|
const msgQueue = [];
|
|
28034
28060
|
const notifyQueue = [];
|
|
@@ -29415,7 +29441,7 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
29415
29441
|
});
|
|
29416
29442
|
onMounted(() => {
|
|
29417
29443
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
29418
|
-
warnLog$
|
|
29444
|
+
warnLog$9('vxe.modal.footPropErr');
|
|
29419
29445
|
}
|
|
29420
29446
|
reactData.initialized = !!props.preload;
|
|
29421
29447
|
nextTick(() => {
|
|
@@ -31609,7 +31635,7 @@ dynamicApp.use(VxeSelect);
|
|
|
31609
31635
|
VxeUI.component(VxeSelectComponent);
|
|
31610
31636
|
const Select = VxeSelect;
|
|
31611
31637
|
|
|
31612
|
-
const { warnLog: warnLog$
|
|
31638
|
+
const { warnLog: warnLog$8, errLog: errLog$6 } = createComponentLog('pager');
|
|
31613
31639
|
var VxePagerComponent = defineVxeComponent({
|
|
31614
31640
|
name: 'VxePager',
|
|
31615
31641
|
props: {
|
|
@@ -32211,7 +32237,7 @@ var VxePagerComponent = defineVxeComponent({
|
|
|
32211
32237
|
* @deprecated
|
|
32212
32238
|
*/
|
|
32213
32239
|
jumpPage(currentPage) {
|
|
32214
|
-
warnLog$
|
|
32240
|
+
warnLog$8('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
|
|
32215
32241
|
return $xePager.setCurrentPage(currentPage);
|
|
32216
32242
|
}
|
|
32217
32243
|
};
|
|
@@ -32808,7 +32834,7 @@ function handlePrint(opts, printHtml = '') {
|
|
|
32808
32834
|
if (styleUrls && styleUrls.length) {
|
|
32809
32835
|
styleUrls.forEach(url => {
|
|
32810
32836
|
if (!/.css$/.test(url)) {
|
|
32811
|
-
warnLog$
|
|
32837
|
+
warnLog$g('vxe.error.errProp', [url, `${url}.css`]);
|
|
32812
32838
|
}
|
|
32813
32839
|
});
|
|
32814
32840
|
}
|
|
@@ -33679,6 +33705,7 @@ dynamicApp.use(VxePulldown);
|
|
|
33679
33705
|
VxeUI.component(VxePulldownComponent);
|
|
33680
33706
|
const Pulldown = VxePulldown;
|
|
33681
33707
|
|
|
33708
|
+
const { warnLog: warnLog$7 } = createComponentLog('radio');
|
|
33682
33709
|
var VxeRadioComponent = defineVxeComponent({
|
|
33683
33710
|
name: 'VxeRadio',
|
|
33684
33711
|
props: {
|
|
@@ -33704,6 +33731,7 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33704
33731
|
},
|
|
33705
33732
|
/**
|
|
33706
33733
|
* 已废弃,被 checkedValue 替换
|
|
33734
|
+
* @deprecated
|
|
33707
33735
|
*/
|
|
33708
33736
|
label: {
|
|
33709
33737
|
type: [String, Number, Boolean],
|
|
@@ -33728,6 +33756,10 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33728
33756
|
reactData
|
|
33729
33757
|
};
|
|
33730
33758
|
const { computeSize } = useSize(props);
|
|
33759
|
+
const computeCheckValue = computed(() => {
|
|
33760
|
+
const { checkedValue, label } = props;
|
|
33761
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
33762
|
+
});
|
|
33731
33763
|
const computeIsDisabled = computed(() => {
|
|
33732
33764
|
const { disabled } = props;
|
|
33733
33765
|
if (disabled === null) {
|
|
@@ -33746,10 +33778,12 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33746
33778
|
const computeStrict = computed(() => {
|
|
33747
33779
|
return $xeRadioGroup ? $xeRadioGroup.props.strict : props.strict;
|
|
33748
33780
|
});
|
|
33749
|
-
const
|
|
33750
|
-
const
|
|
33751
|
-
|
|
33752
|
-
|
|
33781
|
+
const computeIsChecked = computed(() => {
|
|
33782
|
+
const checkValue = computeCheckValue.value;
|
|
33783
|
+
if ($xeRadioGroup) {
|
|
33784
|
+
return $xeRadioGroup.props.modelValue === checkValue;
|
|
33785
|
+
}
|
|
33786
|
+
return props.modelValue === checkValue;
|
|
33753
33787
|
});
|
|
33754
33788
|
const handleValue = (checkedValue, evnt) => {
|
|
33755
33789
|
const { content } = props;
|
|
@@ -33768,18 +33802,16 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33768
33802
|
const changeEvent = (evnt) => {
|
|
33769
33803
|
const isDisabled = computeIsDisabled.value;
|
|
33770
33804
|
if (!isDisabled) {
|
|
33771
|
-
const
|
|
33772
|
-
|
|
33773
|
-
handleValue(radioValue, evnt);
|
|
33805
|
+
const checkValue = computeCheckValue.value;
|
|
33806
|
+
handleValue(checkValue, evnt);
|
|
33774
33807
|
}
|
|
33775
33808
|
};
|
|
33776
33809
|
const clickEvent = (evnt) => {
|
|
33777
33810
|
const isDisabled = computeIsDisabled.value;
|
|
33778
33811
|
const isStrict = computeStrict.value;
|
|
33779
33812
|
if (!isDisabled && !isStrict) {
|
|
33780
|
-
const
|
|
33781
|
-
|
|
33782
|
-
if (radioValue === ($xeRadioGroup ? $xeRadioGroup.props.modelValue : props.modelValue)) {
|
|
33813
|
+
const isChecked = computeIsChecked.value;
|
|
33814
|
+
if (isChecked) {
|
|
33783
33815
|
handleValue(null, evnt);
|
|
33784
33816
|
}
|
|
33785
33817
|
}
|
|
@@ -33793,12 +33825,12 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33793
33825
|
const radioPrivateMethods = {};
|
|
33794
33826
|
Object.assign($xeRadio, radioMethods, radioPrivateMethods);
|
|
33795
33827
|
const renderVN = () => {
|
|
33796
|
-
const {
|
|
33797
|
-
const radioValue = XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
33828
|
+
const { content } = props;
|
|
33798
33829
|
const vSize = computeSize.value;
|
|
33799
33830
|
const isDisabled = computeIsDisabled.value;
|
|
33800
33831
|
const name = computeName.value;
|
|
33801
|
-
const isChecked =
|
|
33832
|
+
const isChecked = computeIsChecked.value;
|
|
33833
|
+
const checkValue = computeCheckValue.value;
|
|
33802
33834
|
const defaultSlot = slots.default;
|
|
33803
33835
|
if ($xeRadioGroup) {
|
|
33804
33836
|
const { computeIsReadonly: computeIsGroupReadonly } = $xeRadioGroup.getComputeMaps();
|
|
@@ -33820,7 +33852,7 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33820
33852
|
}
|
|
33821
33853
|
}
|
|
33822
33854
|
return h('label', {
|
|
33823
|
-
key:
|
|
33855
|
+
key: `${checkValue}`,
|
|
33824
33856
|
class: ['vxe-radio vxe-radio--default', {
|
|
33825
33857
|
[`size--${vSize}`]: vSize,
|
|
33826
33858
|
'is--checked': isChecked,
|
|
@@ -33845,6 +33877,11 @@ var VxeRadioComponent = defineVxeComponent({
|
|
|
33845
33877
|
}, defaultSlot ? defaultSlot({}) : getFuncText(content))
|
|
33846
33878
|
]);
|
|
33847
33879
|
};
|
|
33880
|
+
onMounted(() => {
|
|
33881
|
+
if (props.label !== null) {
|
|
33882
|
+
warnLog$7('vxe.error.delProp', ['label', 'checked-value']);
|
|
33883
|
+
}
|
|
33884
|
+
});
|
|
33848
33885
|
$xeRadio.renderVN = renderVN;
|
|
33849
33886
|
return $xeRadio;
|
|
33850
33887
|
},
|
|
@@ -33862,6 +33899,7 @@ dynamicApp.use(VxeRadio);
|
|
|
33862
33899
|
VxeUI.component(VxeRadioComponent);
|
|
33863
33900
|
const Radio = VxeRadio;
|
|
33864
33901
|
|
|
33902
|
+
const { warnLog: warnLog$6 } = createComponentLog('radio-button');
|
|
33865
33903
|
var VxeRadioButtonComponent = defineVxeComponent({
|
|
33866
33904
|
name: 'VxeRadioButton',
|
|
33867
33905
|
props: {
|
|
@@ -33887,6 +33925,7 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33887
33925
|
},
|
|
33888
33926
|
/**
|
|
33889
33927
|
* 已废弃,被 checkedValue 替换
|
|
33928
|
+
* @deprecated
|
|
33890
33929
|
*/
|
|
33891
33930
|
label: {
|
|
33892
33931
|
type: [String, Number, Boolean],
|
|
@@ -33911,6 +33950,10 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33911
33950
|
context,
|
|
33912
33951
|
reactData
|
|
33913
33952
|
};
|
|
33953
|
+
const computeCheckValue = computed(() => {
|
|
33954
|
+
const { checkedValue, label } = props;
|
|
33955
|
+
return XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
33956
|
+
});
|
|
33914
33957
|
const computeIsDisabled = computed(() => {
|
|
33915
33958
|
const { disabled } = props;
|
|
33916
33959
|
if (disabled === null) {
|
|
@@ -33929,10 +33972,12 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33929
33972
|
const computeStrict = computed(() => {
|
|
33930
33973
|
return $xeRadioGroup ? $xeRadioGroup.props.strict : props.strict;
|
|
33931
33974
|
});
|
|
33932
|
-
const
|
|
33933
|
-
const
|
|
33934
|
-
|
|
33935
|
-
|
|
33975
|
+
const computeIsChecked = computed(() => {
|
|
33976
|
+
const checkValue = computeCheckValue.value;
|
|
33977
|
+
if ($xeRadioGroup) {
|
|
33978
|
+
return $xeRadioGroup.props.modelValue === checkValue;
|
|
33979
|
+
}
|
|
33980
|
+
return props.modelValue === checkValue;
|
|
33936
33981
|
});
|
|
33937
33982
|
const dispatchEvent = (type, params, evnt) => {
|
|
33938
33983
|
emit(type, createEvent(evnt, { $radioGroup: $xeRadioGroup }, params));
|
|
@@ -33959,29 +34004,27 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
33959
34004
|
const changeEvent = (evnt) => {
|
|
33960
34005
|
const isDisabled = computeIsDisabled.value;
|
|
33961
34006
|
if (!isDisabled) {
|
|
33962
|
-
const
|
|
33963
|
-
|
|
33964
|
-
handleValue(radioValue, evnt);
|
|
34007
|
+
const checkValue = computeCheckValue.value;
|
|
34008
|
+
handleValue(checkValue, evnt);
|
|
33965
34009
|
}
|
|
33966
34010
|
};
|
|
33967
34011
|
const clickEvent = (evnt) => {
|
|
33968
34012
|
const isDisabled = computeIsDisabled.value;
|
|
33969
34013
|
const isStrict = computeStrict.value;
|
|
33970
34014
|
if (!isDisabled && !isStrict) {
|
|
33971
|
-
const
|
|
33972
|
-
|
|
33973
|
-
if (radioValue === ($xeRadioGroup ? $xeRadioGroup.props.modelValue : props.modelValue)) {
|
|
34015
|
+
const isChecked = computeIsChecked.value;
|
|
34016
|
+
if (isChecked) {
|
|
33974
34017
|
handleValue(null, evnt);
|
|
33975
34018
|
}
|
|
33976
34019
|
}
|
|
33977
34020
|
};
|
|
33978
34021
|
const renderVN = () => {
|
|
33979
|
-
const {
|
|
33980
|
-
const radioValue = XEUtils.isUndefined(checkedValue) ? label : checkedValue;
|
|
34022
|
+
const { icon, content } = props;
|
|
33981
34023
|
const vSize = computeSize.value;
|
|
33982
34024
|
const isDisabled = computeIsDisabled.value;
|
|
33983
34025
|
const name = computeName.value;
|
|
33984
|
-
const isChecked =
|
|
34026
|
+
const isChecked = computeIsChecked.value;
|
|
34027
|
+
const checkValue = computeCheckValue.value;
|
|
33985
34028
|
const defaultSlot = slots.default;
|
|
33986
34029
|
if ($xeRadioGroup) {
|
|
33987
34030
|
const { computeIsReadonly: computeIsGroupReadonly } = $xeRadioGroup.getComputeMaps();
|
|
@@ -34018,7 +34061,7 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
34018
34061
|
}
|
|
34019
34062
|
}
|
|
34020
34063
|
return h('label', {
|
|
34021
|
-
key:
|
|
34064
|
+
key: `${checkValue}`,
|
|
34022
34065
|
class: ['vxe-radio vxe-radio--button', {
|
|
34023
34066
|
[`size--${vSize}`]: vSize,
|
|
34024
34067
|
'is--disabled': isDisabled
|
|
@@ -34056,6 +34099,11 @@ var VxeRadioButtonComponent = defineVxeComponent({
|
|
|
34056
34099
|
])
|
|
34057
34100
|
]);
|
|
34058
34101
|
};
|
|
34102
|
+
onMounted(() => {
|
|
34103
|
+
if (props.label !== null) {
|
|
34104
|
+
warnLog$6('vxe.error.delProp', ['label', 'checked-value']);
|
|
34105
|
+
}
|
|
34106
|
+
});
|
|
34059
34107
|
$xeRadioButton.renderVN = renderVN;
|
|
34060
34108
|
return renderVN;
|
|
34061
34109
|
}
|
|
@@ -44662,7 +44710,12 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44662
44710
|
if (cacheItem) {
|
|
44663
44711
|
cacheItem.loading = false;
|
|
44664
44712
|
}
|
|
44665
|
-
|
|
44713
|
+
const result = {
|
|
44714
|
+
option: item,
|
|
44715
|
+
status: cacheItem ? cacheItem.status : null,
|
|
44716
|
+
response: cacheItem ? cacheItem.response : null
|
|
44717
|
+
};
|
|
44718
|
+
dispatchEvent('upload-end', { option: item, result }, null);
|
|
44666
44719
|
});
|
|
44667
44720
|
}
|
|
44668
44721
|
else {
|
|
@@ -44810,7 +44863,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44810
44863
|
Promise.all(uploadPromiseRests).then(() => {
|
|
44811
44864
|
const { fileCacheMaps } = reactData;
|
|
44812
44865
|
const restFileList = reactData.fileList;
|
|
44813
|
-
const uploadResults =
|
|
44866
|
+
const uploadResults = newFileList.map(option => {
|
|
44814
44867
|
const fileKey = getFieldKey(option);
|
|
44815
44868
|
const cacheItem = fileCacheMaps[fileKey];
|
|
44816
44869
|
return {
|
|
@@ -44823,7 +44876,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44823
44876
|
dispatchEvent('upload-queue-end', { value, options: restFileList, results: uploadResults, files: selectFiles }, evnt);
|
|
44824
44877
|
// 自动更新校验状态
|
|
44825
44878
|
if ($xeForm && formItemInfo) {
|
|
44826
|
-
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field,
|
|
44879
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
44827
44880
|
}
|
|
44828
44881
|
});
|
|
44829
44882
|
};
|