vxe-pc-ui 4.14.26 → 4.14.28
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 +318 -200
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/date-panel/src/date-panel.js +11 -10
- package/es/date-panel/style.css +4 -0
- package/es/date-panel/style.min.css +1 -1
- package/es/date-range-picker/src/date-range-picker.js +15 -0
- package/es/form/src/form-config-item.js +10 -6
- package/es/form/src/form.js +55 -15
- package/es/form/style.css +2 -2
- package/es/form/style.min.css +1 -1
- package/es/radio/style.css +2 -2
- package/es/radio/style.min.css +1 -1
- package/es/select/src/select.js +4 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +4 -1
- package/es/tree-select/src/tree-select.js +4 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +56 -6
- package/es/vxe-date-panel/style.css +4 -0
- package/es/vxe-date-panel/style.min.css +1 -1
- package/es/vxe-form/style.css +2 -2
- package/es/vxe-form/style.min.css +1 -1
- package/es/vxe-radio/style.css +2 -2
- package/es/vxe-radio/style.min.css +1 -1
- package/lib/date-panel/src/date-panel.js +46 -10
- package/lib/date-panel/src/date-panel.min.js +1 -1
- package/lib/date-panel/style/style.css +4 -0
- package/lib/date-panel/style/style.min.css +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +17 -0
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/form/src/form-config-item.js +11 -4
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form.js +69 -17
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +2 -2
- package/lib/form/style/style.min.css +1 -1
- package/lib/index.umd.js +403 -220
- package/lib/index.umd.min.js +1 -1
- package/lib/radio/style/style.css +2 -2
- package/lib/radio/style/style.min.css +1 -1
- package/lib/select/src/select.js +4 -1
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +4 -1
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +4 -1
- package/lib/tree-select/src/tree-select.min.js +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 +72 -10
- package/lib/upload/src/upload.min.js +1 -1
- package/lib/vxe-date-panel/style/style.css +4 -0
- package/lib/vxe-date-panel/style/style.min.css +1 -1
- package/lib/vxe-form/style/style.css +2 -2
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-radio/style/style.css +2 -2
- package/lib/vxe-radio/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/date-panel/src/date-panel.ts +11 -10
- package/packages/date-range-picker/src/date-range-picker.ts +17 -1
- package/packages/form/src/form-config-item.ts +12 -4
- package/packages/form/src/form.ts +58 -15
- package/packages/form/src/util.ts +1 -1
- package/packages/select/src/select.ts +4 -1
- package/packages/table-select/src/table-select.ts +4 -1
- package/packages/tree-select/src/tree-select.ts +4 -1
- package/packages/upload/src/upload.ts +66 -6
- package/styles/components/date-panel.scss +4 -0
- package/styles/components/form.scss +2 -2
- package/styles/components/radio.scss +2 -2
- package/types/components/date-panel.d.ts +7 -0
- package/types/components/form.d.ts +22 -3
- package/types/components/notice-bar.d.ts +4 -0
- package/types/components/upload.d.ts +37 -2
- /package/es/icon/{iconfont.1780292459831.ttf → iconfont.1780570418794.ttf} +0 -0
- /package/es/icon/{iconfont.1780292459831.woff → iconfont.1780570418794.woff} +0 -0
- /package/es/icon/{iconfont.1780292459831.woff2 → iconfont.1780570418794.woff2} +0 -0
- /package/es/{iconfont.1780292459831.ttf → iconfont.1780570418794.ttf} +0 -0
- /package/es/{iconfont.1780292459831.woff → iconfont.1780570418794.woff} +0 -0
- /package/es/{iconfont.1780292459831.woff2 → iconfont.1780570418794.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1780292459831.ttf → iconfont.1780570418794.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1780292459831.woff → iconfont.1780570418794.woff} +0 -0
- /package/lib/icon/style/{iconfont.1780292459831.woff2 → iconfont.1780570418794.woff2} +0 -0
- /package/lib/{iconfont.1780292459831.ttf → iconfont.1780570418794.ttf} +0 -0
- /package/lib/{iconfont.1780292459831.woff → iconfont.1780570418794.woff} +0 -0
- /package/lib/{iconfont.1780292459831.woff2 → iconfont.1780570418794.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -4646,7 +4646,7 @@ function checkDynamic() {
|
|
|
4646
4646
|
}
|
|
4647
4647
|
;// ./packages/ui/src/log.ts
|
|
4648
4648
|
|
|
4649
|
-
const log_version = `ui v${"4.14.
|
|
4649
|
+
const log_version = `ui v${"4.14.28"}`;
|
|
4650
4650
|
const warnLog = log.create('warn', log_version);
|
|
4651
4651
|
const errLog = log.create('error', log_version);
|
|
4652
4652
|
;// ./packages/ui/index.ts
|
|
@@ -4654,7 +4654,7 @@ const errLog = log.create('error', log_version);
|
|
|
4654
4654
|
|
|
4655
4655
|
|
|
4656
4656
|
|
|
4657
|
-
const ui_version = "4.14.
|
|
4657
|
+
const ui_version = "4.14.28";
|
|
4658
4658
|
VxeUI.uiVersion = ui_version;
|
|
4659
4659
|
VxeUI.dynamicApp = dynamicApp;
|
|
4660
4660
|
function config(options) {
|
|
@@ -20206,6 +20206,7 @@ const Countdown = VxeCountdown;
|
|
|
20206
20206
|
default: 'date'
|
|
20207
20207
|
},
|
|
20208
20208
|
className: String,
|
|
20209
|
+
cellClassName: [String, Function],
|
|
20209
20210
|
size: {
|
|
20210
20211
|
type: String,
|
|
20211
20212
|
default: () => getConfig().datePanel.size || getConfig().size
|
|
@@ -21586,7 +21587,9 @@ const Countdown = VxeCountdown;
|
|
|
21586
21587
|
};
|
|
21587
21588
|
const renderDateDayTable = () => {
|
|
21588
21589
|
const {
|
|
21589
|
-
|
|
21590
|
+
type,
|
|
21591
|
+
multiple,
|
|
21592
|
+
cellClassName
|
|
21590
21593
|
} = props;
|
|
21591
21594
|
const {
|
|
21592
21595
|
datePanelType,
|
|
@@ -21626,7 +21629,12 @@ const Countdown = VxeCountdown;
|
|
|
21626
21629
|
}, rows.map(item => {
|
|
21627
21630
|
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
21628
21631
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21629
|
-
class: ['vxe-date-panel--view-item', {
|
|
21632
|
+
class: ['vxe-date-panel--view-item', cellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellClassName) ? `${cellClassName({
|
|
21633
|
+
$datePanel: $xeDatePanel,
|
|
21634
|
+
type,
|
|
21635
|
+
viewType: datePanelType,
|
|
21636
|
+
date: item.date
|
|
21637
|
+
}) || ''}` : `${cellClassName || ''}` : '', {
|
|
21630
21638
|
'is--prev': item.isPrev,
|
|
21631
21639
|
'is--current': item.isCurrent,
|
|
21632
21640
|
'is--now': item.isNow,
|
|
@@ -21651,7 +21659,9 @@ const Countdown = VxeCountdown;
|
|
|
21651
21659
|
};
|
|
21652
21660
|
const renderDateWeekTable = () => {
|
|
21653
21661
|
const {
|
|
21654
|
-
|
|
21662
|
+
type,
|
|
21663
|
+
multiple,
|
|
21664
|
+
cellClassName
|
|
21655
21665
|
} = props;
|
|
21656
21666
|
const {
|
|
21657
21667
|
datePanelType,
|
|
@@ -21693,7 +21703,12 @@ const Countdown = VxeCountdown;
|
|
|
21693
21703
|
}
|
|
21694
21704
|
}, rows.map((item, rIndex) => {
|
|
21695
21705
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21696
|
-
class: ['vxe-date-panel--view-item', {
|
|
21706
|
+
class: ['vxe-date-panel--view-item', cellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellClassName) ? `${cellClassName({
|
|
21707
|
+
$datePanel: $xeDatePanel,
|
|
21708
|
+
type,
|
|
21709
|
+
viewType: datePanelType,
|
|
21710
|
+
date: item.date
|
|
21711
|
+
}) || ''}` : `${cellClassName || ''}` : '', {
|
|
21697
21712
|
'is--prev': item.isPrev,
|
|
21698
21713
|
'is--current': item.isCurrent,
|
|
21699
21714
|
'is--now': rIndex ? item.isNow : isNowWeek,
|
|
@@ -21718,7 +21733,9 @@ const Countdown = VxeCountdown;
|
|
|
21718
21733
|
};
|
|
21719
21734
|
const renderDateMonthTable = () => {
|
|
21720
21735
|
const {
|
|
21721
|
-
|
|
21736
|
+
type,
|
|
21737
|
+
multiple,
|
|
21738
|
+
cellClassName
|
|
21722
21739
|
} = props;
|
|
21723
21740
|
const {
|
|
21724
21741
|
datePanelType,
|
|
@@ -21742,7 +21759,12 @@ const Countdown = VxeCountdown;
|
|
|
21742
21759
|
}, rows.map(item => {
|
|
21743
21760
|
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
21744
21761
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21745
|
-
class: ['vxe-date-panel--view-item', {
|
|
21762
|
+
class: ['vxe-date-panel--view-item', cellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellClassName) ? `${cellClassName({
|
|
21763
|
+
$datePanel: $xeDatePanel,
|
|
21764
|
+
type,
|
|
21765
|
+
viewType: datePanelType,
|
|
21766
|
+
date: item.date
|
|
21767
|
+
}) || ''}` : `${cellClassName || ''}` : '', {
|
|
21746
21768
|
'is--prev': item.isPrev,
|
|
21747
21769
|
'is--current': item.isCurrent,
|
|
21748
21770
|
'is--now': item.isNow,
|
|
@@ -21767,7 +21789,9 @@ const Countdown = VxeCountdown;
|
|
|
21767
21789
|
};
|
|
21768
21790
|
const renderDateQuarterTable = () => {
|
|
21769
21791
|
const {
|
|
21770
|
-
|
|
21792
|
+
type,
|
|
21793
|
+
multiple,
|
|
21794
|
+
cellClassName
|
|
21771
21795
|
} = props;
|
|
21772
21796
|
const {
|
|
21773
21797
|
datePanelType,
|
|
@@ -21791,7 +21815,12 @@ const Countdown = VxeCountdown;
|
|
|
21791
21815
|
}, rows.map(item => {
|
|
21792
21816
|
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
21793
21817
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21794
|
-
class: ['vxe-date-panel--view-item', {
|
|
21818
|
+
class: ['vxe-date-panel--view-item', cellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellClassName) ? `${cellClassName({
|
|
21819
|
+
$datePanel: $xeDatePanel,
|
|
21820
|
+
type,
|
|
21821
|
+
viewType: datePanelType,
|
|
21822
|
+
date: item.date
|
|
21823
|
+
}) || ''}` : `${cellClassName || ''}` : '', {
|
|
21795
21824
|
'is--prev': item.isPrev,
|
|
21796
21825
|
'is--current': item.isCurrent,
|
|
21797
21826
|
'is--now': item.isNow,
|
|
@@ -21816,7 +21845,9 @@ const Countdown = VxeCountdown;
|
|
|
21816
21845
|
};
|
|
21817
21846
|
const renderDateYearTable = () => {
|
|
21818
21847
|
const {
|
|
21819
|
-
|
|
21848
|
+
type,
|
|
21849
|
+
multiple,
|
|
21850
|
+
cellClassName
|
|
21820
21851
|
} = props;
|
|
21821
21852
|
const {
|
|
21822
21853
|
datePanelType,
|
|
@@ -21840,7 +21871,12 @@ const Countdown = VxeCountdown;
|
|
|
21840
21871
|
}, rows.map(item => {
|
|
21841
21872
|
const isSelected = multiple ? dateListValue.some(val => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(val, item.date, matchFormat)) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isDateSame(dateValue, item.date, matchFormat);
|
|
21842
21873
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
21843
|
-
class: ['vxe-date-panel--view-item', {
|
|
21874
|
+
class: ['vxe-date-panel--view-item', cellClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellClassName) ? `${cellClassName({
|
|
21875
|
+
$datePanel: $xeDatePanel,
|
|
21876
|
+
type,
|
|
21877
|
+
viewType: datePanelType,
|
|
21878
|
+
date: item.date
|
|
21879
|
+
}) || ''}` : `${cellClassName || ''}` : '', {
|
|
21844
21880
|
'is--prev': item.isPrev,
|
|
21845
21881
|
'is--current': item.isCurrent,
|
|
21846
21882
|
'is--now': item.isNow,
|
|
@@ -23697,6 +23733,21 @@ const DatePicker = VxeDatePicker;
|
|
|
23697
23733
|
}
|
|
23698
23734
|
}
|
|
23699
23735
|
};
|
|
23736
|
+
const panelCellClassName = ({
|
|
23737
|
+
date
|
|
23738
|
+
}) => {
|
|
23739
|
+
const startValue = reactData.startValue;
|
|
23740
|
+
const endValue = reactData.endValue;
|
|
23741
|
+
if (startValue && endValue) {
|
|
23742
|
+
const currTime = date.getTime();
|
|
23743
|
+
const startTime = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(startValue).getTime();
|
|
23744
|
+
const endTime = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(endValue).getTime();
|
|
23745
|
+
if (currTime >= startTime && currTime <= endTime) {
|
|
23746
|
+
return 'is--range-selected';
|
|
23747
|
+
}
|
|
23748
|
+
}
|
|
23749
|
+
return '';
|
|
23750
|
+
};
|
|
23700
23751
|
const handleSelectClose = () => {
|
|
23701
23752
|
const {
|
|
23702
23753
|
autoClose
|
|
@@ -24231,6 +24282,7 @@ const DatePicker = VxeDatePicker;
|
|
|
24231
24282
|
festivalMethod: props.festivalMethod,
|
|
24232
24283
|
disabledMethod: props.disabledMethod,
|
|
24233
24284
|
selectDay: props.selectDay,
|
|
24285
|
+
cellClassName: panelCellClassName,
|
|
24234
24286
|
onChange: startPanelChangeEvent
|
|
24235
24287
|
}), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(date_panel, {
|
|
24236
24288
|
ref: refEndDatePanel,
|
|
@@ -24250,6 +24302,7 @@ const DatePicker = VxeDatePicker;
|
|
|
24250
24302
|
festivalMethod: props.festivalMethod,
|
|
24251
24303
|
disabledMethod: props.disabledMethod,
|
|
24252
24304
|
selectDay: props.selectDay,
|
|
24305
|
+
cellClassName: panelCellClassName,
|
|
24253
24306
|
onChange: endPanelChangeEvent
|
|
24254
24307
|
})]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
24255
24308
|
class: 'vxe-date-range-picker--layout-footer-wrapper'
|
|
@@ -25980,6 +26033,181 @@ function renderItemContent($xeForm, item) {
|
|
|
25980
26033
|
class: 'vxe-form--item-inner'
|
|
25981
26034
|
}, contentVNs);
|
|
25982
26035
|
}
|
|
26036
|
+
;// ./packages/form/src/form-item.ts
|
|
26037
|
+
|
|
26038
|
+
|
|
26039
|
+
|
|
26040
|
+
|
|
26041
|
+
|
|
26042
|
+
|
|
26043
|
+
|
|
26044
|
+
const formItemProps = {
|
|
26045
|
+
title: String,
|
|
26046
|
+
field: String,
|
|
26047
|
+
span: {
|
|
26048
|
+
type: [String, Number],
|
|
26049
|
+
default: null
|
|
26050
|
+
},
|
|
26051
|
+
align: {
|
|
26052
|
+
type: String,
|
|
26053
|
+
default: null
|
|
26054
|
+
},
|
|
26055
|
+
verticalAlign: {
|
|
26056
|
+
type: String,
|
|
26057
|
+
default: null
|
|
26058
|
+
},
|
|
26059
|
+
titleBackground: {
|
|
26060
|
+
type: Boolean,
|
|
26061
|
+
default: null
|
|
26062
|
+
},
|
|
26063
|
+
titleBold: {
|
|
26064
|
+
type: Boolean,
|
|
26065
|
+
default: null
|
|
26066
|
+
},
|
|
26067
|
+
titleAlign: {
|
|
26068
|
+
type: String,
|
|
26069
|
+
default: null
|
|
26070
|
+
},
|
|
26071
|
+
titleWidth: {
|
|
26072
|
+
type: [String, Number],
|
|
26073
|
+
default: null
|
|
26074
|
+
},
|
|
26075
|
+
titleColon: {
|
|
26076
|
+
type: Boolean,
|
|
26077
|
+
default: null
|
|
26078
|
+
},
|
|
26079
|
+
titleAsterisk: {
|
|
26080
|
+
type: Boolean,
|
|
26081
|
+
default: null
|
|
26082
|
+
},
|
|
26083
|
+
showTitle: {
|
|
26084
|
+
type: Boolean,
|
|
26085
|
+
default: true
|
|
26086
|
+
},
|
|
26087
|
+
vertical: {
|
|
26088
|
+
type: Boolean,
|
|
26089
|
+
default: null
|
|
26090
|
+
},
|
|
26091
|
+
padding: {
|
|
26092
|
+
type: Boolean,
|
|
26093
|
+
default: null
|
|
26094
|
+
},
|
|
26095
|
+
formatter: [String, Function],
|
|
26096
|
+
className: [String, Function],
|
|
26097
|
+
contentClassName: [String, Function],
|
|
26098
|
+
contentStyle: [Object, Function],
|
|
26099
|
+
titleClassName: [String, Function],
|
|
26100
|
+
titleStyle: [Object, Function],
|
|
26101
|
+
titleOverflow: {
|
|
26102
|
+
type: [Boolean, String],
|
|
26103
|
+
default: null
|
|
26104
|
+
},
|
|
26105
|
+
titlePrefix: Object,
|
|
26106
|
+
titleSuffix: Object,
|
|
26107
|
+
resetValue: {
|
|
26108
|
+
default: null
|
|
26109
|
+
},
|
|
26110
|
+
visibleMethod: Function,
|
|
26111
|
+
visible: {
|
|
26112
|
+
type: Boolean,
|
|
26113
|
+
default: null
|
|
26114
|
+
},
|
|
26115
|
+
showContent: {
|
|
26116
|
+
type: Boolean,
|
|
26117
|
+
default: null
|
|
26118
|
+
},
|
|
26119
|
+
folding: Boolean,
|
|
26120
|
+
collapseNode: Boolean,
|
|
26121
|
+
itemRender: Object,
|
|
26122
|
+
rules: Array,
|
|
26123
|
+
params: Object
|
|
26124
|
+
};
|
|
26125
|
+
/* harmony default export */ var form_item = (defineVxeComponent({
|
|
26126
|
+
name: 'VxeFormItem',
|
|
26127
|
+
props: formItemProps,
|
|
26128
|
+
setup(props, {
|
|
26129
|
+
slots
|
|
26130
|
+
}) {
|
|
26131
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
26132
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
26133
|
+
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
|
|
26134
|
+
const $xeFormGroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeFormGroup', null);
|
|
26135
|
+
const formItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createItem($xeForm, props));
|
|
26136
|
+
formItem.slots = slots;
|
|
26137
|
+
const formItemInfo = {
|
|
26138
|
+
itemConfig: formItem
|
|
26139
|
+
};
|
|
26140
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', formItemInfo);
|
|
26141
|
+
const renderItem = ($xeForm, item) => {
|
|
26142
|
+
const formProps = $xeForm.props;
|
|
26143
|
+
const $xeGrid = $xeForm.xeGrid;
|
|
26144
|
+
const {
|
|
26145
|
+
data,
|
|
26146
|
+
readonly,
|
|
26147
|
+
disabled
|
|
26148
|
+
} = formProps;
|
|
26149
|
+
const {
|
|
26150
|
+
visible,
|
|
26151
|
+
field,
|
|
26152
|
+
itemRender,
|
|
26153
|
+
contentStyle,
|
|
26154
|
+
showContent
|
|
26155
|
+
} = item;
|
|
26156
|
+
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
|
|
26157
|
+
const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
|
|
26158
|
+
const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
|
|
26159
|
+
const params = {
|
|
26160
|
+
data,
|
|
26161
|
+
disabled,
|
|
26162
|
+
readonly,
|
|
26163
|
+
field,
|
|
26164
|
+
property: field,
|
|
26165
|
+
item,
|
|
26166
|
+
$form: $xeForm,
|
|
26167
|
+
$grid: $xeGrid
|
|
26168
|
+
};
|
|
26169
|
+
if (visible === false) {
|
|
26170
|
+
return renderEmptyElement($xeFormItem);
|
|
26171
|
+
}
|
|
26172
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
26173
|
+
ref: refElem,
|
|
26174
|
+
key: item.id,
|
|
26175
|
+
itemid: item.id,
|
|
26176
|
+
class: getItemClass($xeForm, item),
|
|
26177
|
+
style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
|
|
26178
|
+
}, [renderTitle($xeForm, item), showContent === false ? renderEmptyElement($xeFormItem) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
26179
|
+
class: getItemContentClass($xeForm, item),
|
|
26180
|
+
style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
|
|
26181
|
+
}, [renderItemContent($xeForm, item), renderItemErrorIcon($xeForm, item)])]);
|
|
26182
|
+
};
|
|
26183
|
+
const renderVN = () => {
|
|
26184
|
+
const customLayout = $xeForm ? $xeForm.props.customLayout : false;
|
|
26185
|
+
const item = formItem;
|
|
26186
|
+
return customLayout ? renderItem($xeForm, item) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
26187
|
+
ref: refElem
|
|
26188
|
+
});
|
|
26189
|
+
};
|
|
26190
|
+
const $xeFormItem = {
|
|
26191
|
+
xID,
|
|
26192
|
+
formItem,
|
|
26193
|
+
renderVN
|
|
26194
|
+
};
|
|
26195
|
+
watchItem(props, formItem);
|
|
26196
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
26197
|
+
const elem = refElem.value;
|
|
26198
|
+
assembleItem($xeForm, elem, formItem, $xeFormGroup);
|
|
26199
|
+
});
|
|
26200
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
26201
|
+
destroyItem($xeForm, formItem);
|
|
26202
|
+
});
|
|
26203
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormItem', $xeFormItem);
|
|
26204
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormGroup', null);
|
|
26205
|
+
return $xeFormItem;
|
|
26206
|
+
},
|
|
26207
|
+
render() {
|
|
26208
|
+
return this.renderVN();
|
|
26209
|
+
}
|
|
26210
|
+
}));
|
|
25983
26211
|
;// ./packages/form/src/form-config-item.ts
|
|
25984
26212
|
|
|
25985
26213
|
|
|
@@ -25989,10 +26217,12 @@ function renderItemContent($xeForm, item) {
|
|
|
25989
26217
|
|
|
25990
26218
|
|
|
25991
26219
|
|
|
26220
|
+
|
|
25992
26221
|
const VxeFormConfigItem = defineVxeComponent({
|
|
25993
26222
|
name: 'VxeFormConfigItem',
|
|
25994
26223
|
props: {
|
|
25995
|
-
itemConfig: Object
|
|
26224
|
+
itemConfig: Object,
|
|
26225
|
+
...formItemProps
|
|
25996
26226
|
},
|
|
25997
26227
|
setup(props) {
|
|
25998
26228
|
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
|
|
@@ -26000,6 +26230,12 @@ const VxeFormConfigItem = defineVxeComponent({
|
|
|
26000
26230
|
itemConfig: props.itemConfig
|
|
26001
26231
|
};
|
|
26002
26232
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', xeformiteminfo);
|
|
26233
|
+
const computeItemVisible = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
26234
|
+
const {
|
|
26235
|
+
visible
|
|
26236
|
+
} = props.itemConfig;
|
|
26237
|
+
return visible;
|
|
26238
|
+
});
|
|
26003
26239
|
const renderItem = ($xeForm, item) => {
|
|
26004
26240
|
const formProps = $xeForm.props;
|
|
26005
26241
|
const $xeGrid = $xeForm.xeGrid;
|
|
@@ -26009,13 +26245,13 @@ const VxeFormConfigItem = defineVxeComponent({
|
|
|
26009
26245
|
disabled
|
|
26010
26246
|
} = formProps;
|
|
26011
26247
|
const {
|
|
26012
|
-
visible,
|
|
26013
26248
|
field,
|
|
26014
26249
|
itemRender,
|
|
26015
26250
|
contentStyle,
|
|
26016
26251
|
children,
|
|
26017
26252
|
showContent
|
|
26018
26253
|
} = item;
|
|
26254
|
+
const itemVisible = computeItemVisible.value;
|
|
26019
26255
|
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
|
|
26020
26256
|
const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
|
|
26021
26257
|
const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
|
|
@@ -26030,7 +26266,7 @@ const VxeFormConfigItem = defineVxeComponent({
|
|
|
26030
26266
|
$grid: $xeGrid
|
|
26031
26267
|
};
|
|
26032
26268
|
const hasGroup = children && children.length > 0;
|
|
26033
|
-
if (
|
|
26269
|
+
if (itemVisible === false) {
|
|
26034
26270
|
return renderEmptyElement($xeForm);
|
|
26035
26271
|
}
|
|
26036
26272
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
@@ -26882,6 +27118,14 @@ function checkRuleStatus(rule, data, val) {
|
|
|
26882
27118
|
}
|
|
26883
27119
|
return true;
|
|
26884
27120
|
}
|
|
27121
|
+
function form_createReactData() {
|
|
27122
|
+
return {
|
|
27123
|
+
collapseAll: false,
|
|
27124
|
+
staticItems: [],
|
|
27125
|
+
formItems: [],
|
|
27126
|
+
itemWidth: 0
|
|
27127
|
+
};
|
|
27128
|
+
}
|
|
26885
27129
|
function form_createInternalData() {
|
|
26886
27130
|
return {
|
|
26887
27131
|
meTimeout: undefined,
|
|
@@ -26890,7 +27134,9 @@ function form_createInternalData() {
|
|
|
26890
27134
|
item: null,
|
|
26891
27135
|
visible: false
|
|
26892
27136
|
},
|
|
26893
|
-
itemFormatCache: {}
|
|
27137
|
+
itemFormatCache: {},
|
|
27138
|
+
fullItemIdData: {},
|
|
27139
|
+
fullItemFieldData: {}
|
|
26894
27140
|
};
|
|
26895
27141
|
}
|
|
26896
27142
|
/* harmony default export */ var src_form = (defineVxeComponent({
|
|
@@ -26987,12 +27233,7 @@ function form_createInternalData() {
|
|
|
26987
27233
|
const {
|
|
26988
27234
|
computeSize
|
|
26989
27235
|
} = useSize(props);
|
|
26990
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(
|
|
26991
|
-
collapseAll: props.collapseStatus,
|
|
26992
|
-
staticItems: [],
|
|
26993
|
-
formItems: [],
|
|
26994
|
-
itemWidth: 0
|
|
26995
|
-
});
|
|
27236
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(form_createReactData());
|
|
26996
27237
|
const internalData = form_createInternalData();
|
|
26997
27238
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
26998
27239
|
const refTooltip = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
@@ -27065,7 +27306,7 @@ function form_createInternalData() {
|
|
|
27065
27306
|
}
|
|
27066
27307
|
return [];
|
|
27067
27308
|
};
|
|
27068
|
-
const
|
|
27309
|
+
const loadItems = list => {
|
|
27069
27310
|
if (list.length) {
|
|
27070
27311
|
list.forEach(item => {
|
|
27071
27312
|
if (item.slots) {
|
|
@@ -27097,10 +27338,11 @@ function form_createInternalData() {
|
|
|
27097
27338
|
return itemList;
|
|
27098
27339
|
};
|
|
27099
27340
|
const getItemByField = field => {
|
|
27100
|
-
const
|
|
27101
|
-
|
|
27102
|
-
}
|
|
27103
|
-
|
|
27341
|
+
const {
|
|
27342
|
+
fullItemFieldData
|
|
27343
|
+
} = internalData;
|
|
27344
|
+
const itemRest = fullItemFieldData[field];
|
|
27345
|
+
return itemRest ? itemRest.item : null;
|
|
27104
27346
|
};
|
|
27105
27347
|
const getCollapseStatus = () => {
|
|
27106
27348
|
return reactData.collapseAll;
|
|
@@ -27179,6 +27421,34 @@ function form_createInternalData() {
|
|
|
27179
27421
|
}
|
|
27180
27422
|
return resetValue;
|
|
27181
27423
|
};
|
|
27424
|
+
const cacheItem = () => {
|
|
27425
|
+
const {
|
|
27426
|
+
formItems
|
|
27427
|
+
} = reactData;
|
|
27428
|
+
const itemIdData = {};
|
|
27429
|
+
const itemFieldData = {};
|
|
27430
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(formItems, (item, index, items) => {
|
|
27431
|
+
const {
|
|
27432
|
+
id,
|
|
27433
|
+
field
|
|
27434
|
+
} = item;
|
|
27435
|
+
const itemRest = {
|
|
27436
|
+
item,
|
|
27437
|
+
items,
|
|
27438
|
+
index
|
|
27439
|
+
};
|
|
27440
|
+
if (id) {
|
|
27441
|
+
itemIdData[id] = itemRest;
|
|
27442
|
+
}
|
|
27443
|
+
if (field) {
|
|
27444
|
+
itemFieldData[field] = itemRest;
|
|
27445
|
+
}
|
|
27446
|
+
}, {
|
|
27447
|
+
children: 'children'
|
|
27448
|
+
});
|
|
27449
|
+
internalData.fullItemFieldData = itemFieldData;
|
|
27450
|
+
internalData.fullItemIdData = itemIdData;
|
|
27451
|
+
};
|
|
27182
27452
|
const reset = () => {
|
|
27183
27453
|
const {
|
|
27184
27454
|
data
|
|
@@ -27613,6 +27883,18 @@ function form_createInternalData() {
|
|
|
27613
27883
|
const handleGlobalResizeEvent = () => {
|
|
27614
27884
|
recalculate();
|
|
27615
27885
|
};
|
|
27886
|
+
const handleItemVisible = visible => {
|
|
27887
|
+
return function (fieldOrItems) {
|
|
27888
|
+
const objs = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItems) ? fieldOrItems : [fieldOrItems];
|
|
27889
|
+
objs.forEach(obj => {
|
|
27890
|
+
const item = handleFieldOrItem($xeForm, obj);
|
|
27891
|
+
if (item) {
|
|
27892
|
+
item.visible = visible;
|
|
27893
|
+
}
|
|
27894
|
+
});
|
|
27895
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
27896
|
+
};
|
|
27897
|
+
};
|
|
27616
27898
|
formMethods = {
|
|
27617
27899
|
dispatchEvent(type, params, evnt) {
|
|
27618
27900
|
emit(type, createEvent(evnt, {
|
|
@@ -27620,6 +27902,9 @@ function form_createInternalData() {
|
|
|
27620
27902
|
$grid: $xeGrid
|
|
27621
27903
|
}, params));
|
|
27622
27904
|
},
|
|
27905
|
+
loadItems,
|
|
27906
|
+
showItem: handleItemVisible(true),
|
|
27907
|
+
hideItem: handleItemVisible(false),
|
|
27623
27908
|
reset,
|
|
27624
27909
|
validate,
|
|
27625
27910
|
validateField,
|
|
@@ -27679,11 +27964,11 @@ function form_createInternalData() {
|
|
|
27679
27964
|
}, customLayout ? defaultSlot ? defaultSlot({}) : [] : formItems.map((item, index) => {
|
|
27680
27965
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(form_config_item, {
|
|
27681
27966
|
key: index,
|
|
27682
|
-
itemConfig: item
|
|
27967
|
+
itemConfig: item,
|
|
27968
|
+
visible: item.visible
|
|
27683
27969
|
});
|
|
27684
27970
|
})), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
27685
|
-
class: 'vxe-form-slots'
|
|
27686
|
-
ref: 'hideItem'
|
|
27971
|
+
class: 'vxe-form-slots'
|
|
27687
27972
|
}, customLayout ? [] : defaultSlot ? defaultSlot({}) : []),
|
|
27688
27973
|
/**
|
|
27689
27974
|
* 加载中
|
|
@@ -27722,6 +28007,7 @@ function form_createInternalData() {
|
|
|
27722
28007
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(staticItemFlag, () => {
|
|
27723
28008
|
reactData.formItems = reactData.staticItems;
|
|
27724
28009
|
recalcFlag.value++;
|
|
28010
|
+
cacheItem();
|
|
27725
28011
|
});
|
|
27726
28012
|
const itemFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
|
|
27727
28013
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.items ? props.items.length : -1, () => {
|
|
@@ -27731,7 +28017,7 @@ function form_createInternalData() {
|
|
|
27731
28017
|
itemFlag.value++;
|
|
27732
28018
|
});
|
|
27733
28019
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(itemFlag, () => {
|
|
27734
|
-
|
|
28020
|
+
loadItems(props.items || []);
|
|
27735
28021
|
});
|
|
27736
28022
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.collapseStatus, value => {
|
|
27737
28023
|
reactData.collapseAll = !!value;
|
|
@@ -27754,8 +28040,9 @@ function form_createInternalData() {
|
|
|
27754
28040
|
globalEvents.off($xeForm, 'resize');
|
|
27755
28041
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, form_createInternalData());
|
|
27756
28042
|
});
|
|
28043
|
+
reactData.collapseAll = !!props.collapseStatus;
|
|
27757
28044
|
if (props.items) {
|
|
27758
|
-
|
|
28045
|
+
loadItems(props.items);
|
|
27759
28046
|
}
|
|
27760
28047
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', null);
|
|
27761
28048
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeForm', $xeForm);
|
|
@@ -27781,181 +28068,6 @@ dynamicApp.use(VxeForm);
|
|
|
27781
28068
|
VxeUI.component(src_form);
|
|
27782
28069
|
const Form = VxeForm;
|
|
27783
28070
|
/* harmony default export */ var packages_form = (VxeForm);
|
|
27784
|
-
;// ./packages/form/src/form-item.ts
|
|
27785
|
-
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
27790
|
-
|
|
27791
|
-
|
|
27792
|
-
const formItemProps = {
|
|
27793
|
-
title: String,
|
|
27794
|
-
field: String,
|
|
27795
|
-
span: {
|
|
27796
|
-
type: [String, Number],
|
|
27797
|
-
default: null
|
|
27798
|
-
},
|
|
27799
|
-
align: {
|
|
27800
|
-
type: String,
|
|
27801
|
-
default: null
|
|
27802
|
-
},
|
|
27803
|
-
verticalAlign: {
|
|
27804
|
-
type: String,
|
|
27805
|
-
default: null
|
|
27806
|
-
},
|
|
27807
|
-
titleBackground: {
|
|
27808
|
-
type: Boolean,
|
|
27809
|
-
default: null
|
|
27810
|
-
},
|
|
27811
|
-
titleBold: {
|
|
27812
|
-
type: Boolean,
|
|
27813
|
-
default: null
|
|
27814
|
-
},
|
|
27815
|
-
titleAlign: {
|
|
27816
|
-
type: String,
|
|
27817
|
-
default: null
|
|
27818
|
-
},
|
|
27819
|
-
titleWidth: {
|
|
27820
|
-
type: [String, Number],
|
|
27821
|
-
default: null
|
|
27822
|
-
},
|
|
27823
|
-
titleColon: {
|
|
27824
|
-
type: Boolean,
|
|
27825
|
-
default: null
|
|
27826
|
-
},
|
|
27827
|
-
titleAsterisk: {
|
|
27828
|
-
type: Boolean,
|
|
27829
|
-
default: null
|
|
27830
|
-
},
|
|
27831
|
-
showTitle: {
|
|
27832
|
-
type: Boolean,
|
|
27833
|
-
default: true
|
|
27834
|
-
},
|
|
27835
|
-
vertical: {
|
|
27836
|
-
type: Boolean,
|
|
27837
|
-
default: null
|
|
27838
|
-
},
|
|
27839
|
-
padding: {
|
|
27840
|
-
type: Boolean,
|
|
27841
|
-
default: null
|
|
27842
|
-
},
|
|
27843
|
-
formatter: [String, Function],
|
|
27844
|
-
className: [String, Function],
|
|
27845
|
-
contentClassName: [String, Function],
|
|
27846
|
-
contentStyle: [Object, Function],
|
|
27847
|
-
titleClassName: [String, Function],
|
|
27848
|
-
titleStyle: [Object, Function],
|
|
27849
|
-
titleOverflow: {
|
|
27850
|
-
type: [Boolean, String],
|
|
27851
|
-
default: null
|
|
27852
|
-
},
|
|
27853
|
-
titlePrefix: Object,
|
|
27854
|
-
titleSuffix: Object,
|
|
27855
|
-
resetValue: {
|
|
27856
|
-
default: null
|
|
27857
|
-
},
|
|
27858
|
-
visibleMethod: Function,
|
|
27859
|
-
visible: {
|
|
27860
|
-
type: Boolean,
|
|
27861
|
-
default: null
|
|
27862
|
-
},
|
|
27863
|
-
showContent: {
|
|
27864
|
-
type: Boolean,
|
|
27865
|
-
default: null
|
|
27866
|
-
},
|
|
27867
|
-
folding: Boolean,
|
|
27868
|
-
collapseNode: Boolean,
|
|
27869
|
-
itemRender: Object,
|
|
27870
|
-
rules: Array,
|
|
27871
|
-
params: Object
|
|
27872
|
-
};
|
|
27873
|
-
/* harmony default export */ var form_item = (defineVxeComponent({
|
|
27874
|
-
name: 'VxeFormItem',
|
|
27875
|
-
props: formItemProps,
|
|
27876
|
-
setup(props, {
|
|
27877
|
-
slots
|
|
27878
|
-
}) {
|
|
27879
|
-
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
27880
|
-
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
27881
|
-
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', {});
|
|
27882
|
-
const $xeFormGroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeFormGroup', null);
|
|
27883
|
-
const formItem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createItem($xeForm, props));
|
|
27884
|
-
formItem.slots = slots;
|
|
27885
|
-
const formItemInfo = {
|
|
27886
|
-
itemConfig: formItem
|
|
27887
|
-
};
|
|
27888
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('xeFormItemInfo', formItemInfo);
|
|
27889
|
-
const renderItem = ($xeForm, item) => {
|
|
27890
|
-
const formProps = $xeForm.props;
|
|
27891
|
-
const $xeGrid = $xeForm.xeGrid;
|
|
27892
|
-
const {
|
|
27893
|
-
data,
|
|
27894
|
-
readonly,
|
|
27895
|
-
disabled
|
|
27896
|
-
} = formProps;
|
|
27897
|
-
const {
|
|
27898
|
-
visible,
|
|
27899
|
-
field,
|
|
27900
|
-
itemRender,
|
|
27901
|
-
contentStyle,
|
|
27902
|
-
showContent
|
|
27903
|
-
} = item;
|
|
27904
|
-
const compConf = isEnableConf(itemRender) ? renderer.get(itemRender.name) : null;
|
|
27905
|
-
const itemStyle = compConf ? compConf.formItemStyle || compConf.itemStyle : null;
|
|
27906
|
-
const itemContentStyle = compConf ? compConf.formItemContentStyle || compConf.itemContentStyle : null;
|
|
27907
|
-
const params = {
|
|
27908
|
-
data,
|
|
27909
|
-
disabled,
|
|
27910
|
-
readonly,
|
|
27911
|
-
field,
|
|
27912
|
-
property: field,
|
|
27913
|
-
item,
|
|
27914
|
-
$form: $xeForm,
|
|
27915
|
-
$grid: $xeGrid
|
|
27916
|
-
};
|
|
27917
|
-
if (visible === false) {
|
|
27918
|
-
return renderEmptyElement($xeFormItem);
|
|
27919
|
-
}
|
|
27920
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
27921
|
-
ref: refElem,
|
|
27922
|
-
key: item.id,
|
|
27923
|
-
itemid: item.id,
|
|
27924
|
-
class: getItemClass($xeForm, item),
|
|
27925
|
-
style: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemStyle) ? itemStyle(params) : itemStyle
|
|
27926
|
-
}, [renderTitle($xeForm, item), showContent === false ? renderEmptyElement($xeFormItem) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
27927
|
-
class: getItemContentClass($xeForm, item),
|
|
27928
|
-
style: Object.assign({}, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(contentStyle) ? contentStyle(params) : contentStyle)
|
|
27929
|
-
}, [renderItemContent($xeForm, item), renderItemErrorIcon($xeForm, item)])]);
|
|
27930
|
-
};
|
|
27931
|
-
const renderVN = () => {
|
|
27932
|
-
const customLayout = $xeForm ? $xeForm.props.customLayout : false;
|
|
27933
|
-
const item = formItem;
|
|
27934
|
-
return customLayout ? renderItem($xeForm, item) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
27935
|
-
ref: refElem
|
|
27936
|
-
});
|
|
27937
|
-
};
|
|
27938
|
-
const $xeFormItem = {
|
|
27939
|
-
xID,
|
|
27940
|
-
formItem,
|
|
27941
|
-
renderVN
|
|
27942
|
-
};
|
|
27943
|
-
watchItem(props, formItem);
|
|
27944
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
27945
|
-
const elem = refElem.value;
|
|
27946
|
-
assembleItem($xeForm, elem, formItem, $xeFormGroup);
|
|
27947
|
-
});
|
|
27948
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
27949
|
-
destroyItem($xeForm, formItem);
|
|
27950
|
-
});
|
|
27951
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormItem', $xeFormItem);
|
|
27952
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeFormGroup', null);
|
|
27953
|
-
return $xeFormItem;
|
|
27954
|
-
},
|
|
27955
|
-
render() {
|
|
27956
|
-
return this.renderVN();
|
|
27957
|
-
}
|
|
27958
|
-
}));
|
|
27959
28071
|
;// ./packages/form/src/form-group.ts
|
|
27960
28072
|
|
|
27961
28073
|
|
|
@@ -33713,7 +33825,10 @@ function select_createInternalData() {
|
|
|
33713
33825
|
props: {
|
|
33714
33826
|
modelValue: [String, Number, Boolean, Array],
|
|
33715
33827
|
defaultConfig: Object,
|
|
33716
|
-
clearable:
|
|
33828
|
+
clearable: {
|
|
33829
|
+
type: Boolean,
|
|
33830
|
+
default: () => getConfig().select.clearable
|
|
33831
|
+
},
|
|
33717
33832
|
placeholder: String,
|
|
33718
33833
|
readonly: {
|
|
33719
33834
|
type: Boolean,
|
|
@@ -41163,7 +41278,10 @@ function table_select_createInternalData() {
|
|
|
41163
41278
|
name: 'VxeTableSelect',
|
|
41164
41279
|
props: {
|
|
41165
41280
|
modelValue: [String, Number, Array],
|
|
41166
|
-
clearable:
|
|
41281
|
+
clearable: {
|
|
41282
|
+
type: Boolean,
|
|
41283
|
+
default: getConfig().tableSelect.clearable
|
|
41284
|
+
},
|
|
41167
41285
|
placeholder: {
|
|
41168
41286
|
type: String,
|
|
41169
41287
|
default: () => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(getConfig().tableSelect.placeholder) ? getI18n('vxe.base.pleaseSelect') : getConfig().tableSelect.placeholder
|
|
@@ -47412,7 +47530,10 @@ function tree_select_createInternalData() {
|
|
|
47412
47530
|
name: 'VxeTreeSelect',
|
|
47413
47531
|
props: {
|
|
47414
47532
|
modelValue: [String, Number, Array],
|
|
47415
|
-
clearable:
|
|
47533
|
+
clearable: {
|
|
47534
|
+
type: Boolean,
|
|
47535
|
+
default: getConfig().treeSelect.clearable
|
|
47536
|
+
},
|
|
47416
47537
|
placeholder: {
|
|
47417
47538
|
type: String,
|
|
47418
47539
|
default: () => external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(getConfig().treeSelect.placeholder) ? getI18n('vxe.base.pleaseSelect') : getConfig().treeSelect.placeholder
|
|
@@ -48952,7 +49073,9 @@ function upload_createInternalData() {
|
|
|
48952
49073
|
showMoreButton: true
|
|
48953
49074
|
}, props.moreConfig);
|
|
48954
49075
|
});
|
|
48955
|
-
const computeMaps = {
|
|
49076
|
+
const computeMaps = {
|
|
49077
|
+
computeUrlProp
|
|
49078
|
+
};
|
|
48956
49079
|
const $xeUpload = {
|
|
48957
49080
|
xID,
|
|
48958
49081
|
props,
|
|
@@ -49412,16 +49535,20 @@ function upload_createInternalData() {
|
|
|
49412
49535
|
handleChange(fileList);
|
|
49413
49536
|
// 自动更新校验状态
|
|
49414
49537
|
if ($xeForm && formItemInfo) {
|
|
49415
|
-
$xeForm.triggerItemEvent(evnt
|
|
49538
|
+
$xeForm.triggerItemEvent(evnt || {
|
|
49539
|
+
type: 'remove'
|
|
49540
|
+
}, formItemInfo.itemConfig.field, fileList);
|
|
49541
|
+
}
|
|
49542
|
+
if (evnt) {
|
|
49543
|
+
dispatchEvent('remove', {
|
|
49544
|
+
option: item
|
|
49545
|
+
}, evnt);
|
|
49416
49546
|
}
|
|
49417
|
-
dispatchEvent('remove', {
|
|
49418
|
-
option: item
|
|
49419
|
-
}, evnt);
|
|
49420
49547
|
};
|
|
49421
49548
|
const removeFileEvent = (evnt, item, index) => {
|
|
49422
49549
|
const beforeRemoveFn = props.beforeRemoveMethod || getConfig().upload.beforeRemoveMethod;
|
|
49423
49550
|
const removeFn = props.removeMethod || getConfig().upload.removeMethod;
|
|
49424
|
-
Promise.resolve(beforeRemoveFn ? beforeRemoveFn({
|
|
49551
|
+
return Promise.resolve(beforeRemoveFn ? beforeRemoveFn({
|
|
49425
49552
|
$upload: $xeUpload,
|
|
49426
49553
|
option: item
|
|
49427
49554
|
}) : true).then(status => {
|
|
@@ -49437,10 +49564,13 @@ function upload_createInternalData() {
|
|
|
49437
49564
|
handleRemoveEvent(evnt, item, index);
|
|
49438
49565
|
}
|
|
49439
49566
|
} else {
|
|
49440
|
-
|
|
49441
|
-
|
|
49442
|
-
|
|
49567
|
+
if (evnt) {
|
|
49568
|
+
dispatchEvent('remove-fail', {
|
|
49569
|
+
option: item
|
|
49570
|
+
}, evnt);
|
|
49571
|
+
}
|
|
49443
49572
|
}
|
|
49573
|
+
return status;
|
|
49444
49574
|
});
|
|
49445
49575
|
};
|
|
49446
49576
|
const handleDownloadEvent = (evnt, item) => {
|
|
@@ -49835,11 +49965,56 @@ function upload_createInternalData() {
|
|
|
49835
49965
|
const handleGlobalBlurEvent = () => {
|
|
49836
49966
|
reactData.isActivated = false;
|
|
49837
49967
|
};
|
|
49968
|
+
const handleClearFile = evnt => {
|
|
49969
|
+
const {
|
|
49970
|
+
fileList
|
|
49971
|
+
} = reactData;
|
|
49972
|
+
const urlProp = computeUrlProp.value;
|
|
49973
|
+
const rest = [];
|
|
49974
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().lastEach(fileList, (item, index) => {
|
|
49975
|
+
rest.push(removeFileEvent(evnt, item, index).then(status => {
|
|
49976
|
+
return {
|
|
49977
|
+
url: item[urlProp],
|
|
49978
|
+
status
|
|
49979
|
+
};
|
|
49980
|
+
}));
|
|
49981
|
+
});
|
|
49982
|
+
return Promise.all(rest);
|
|
49983
|
+
};
|
|
49984
|
+
const handleRemoveFile = (evnt, urlOrItem) => {
|
|
49985
|
+
const {
|
|
49986
|
+
fileList
|
|
49987
|
+
} = reactData;
|
|
49988
|
+
const urlProp = computeUrlProp.value;
|
|
49989
|
+
const urls = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(urlOrItem) ? urlOrItem : [urlOrItem];
|
|
49990
|
+
const rest = [];
|
|
49991
|
+
urls.forEach(obj => {
|
|
49992
|
+
if (obj) {
|
|
49993
|
+
const url = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(obj) ? obj : obj[urlProp];
|
|
49994
|
+
const index = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(fileList, fileItem => fileItem[urlProp] === url);
|
|
49995
|
+
if (index > -1) {
|
|
49996
|
+
rest.push(removeFileEvent(evnt, fileList[index], index).then(status => {
|
|
49997
|
+
return {
|
|
49998
|
+
url,
|
|
49999
|
+
status
|
|
50000
|
+
};
|
|
50001
|
+
}));
|
|
50002
|
+
}
|
|
50003
|
+
}
|
|
50004
|
+
});
|
|
50005
|
+
return Promise.all(rest);
|
|
50006
|
+
};
|
|
49838
50007
|
const uploadMethods = {
|
|
49839
50008
|
dispatchEvent,
|
|
49840
50009
|
choose() {
|
|
49841
50010
|
return handleChoose(null);
|
|
49842
50011
|
},
|
|
50012
|
+
clear() {
|
|
50013
|
+
return handleClearFile(null);
|
|
50014
|
+
},
|
|
50015
|
+
clearByEvent(evnt) {
|
|
50016
|
+
return handleClearFile(evnt);
|
|
50017
|
+
},
|
|
49843
50018
|
getPendingFiles() {
|
|
49844
50019
|
const {
|
|
49845
50020
|
fileList,
|
|
@@ -49914,9 +50089,17 @@ function upload_createInternalData() {
|
|
|
49914
50089
|
VxeUI.modal.close(internalData.moreId);
|
|
49915
50090
|
}
|
|
49916
50091
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
50092
|
+
},
|
|
50093
|
+
remove(urlOrItem) {
|
|
50094
|
+
return handleRemoveFile(null, urlOrItem);
|
|
50095
|
+
},
|
|
50096
|
+
removeByEvent(evnt, urlOrItem) {
|
|
50097
|
+
return handleRemoveFile(evnt, urlOrItem);
|
|
49917
50098
|
}
|
|
49918
50099
|
};
|
|
49919
|
-
const uploadPrivateMethods = {
|
|
50100
|
+
const uploadPrivateMethods = {
|
|
50101
|
+
removeFileEvent
|
|
50102
|
+
};
|
|
49920
50103
|
Object.assign($xeUpload, uploadMethods, uploadPrivateMethods);
|
|
49921
50104
|
const renderFileItemList = (currList, isMoreView) => {
|
|
49922
50105
|
const {
|