vxe-pc-ui 4.15.4 → 4.15.6
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 +172 -76
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/cascader/src/cascader.js +2 -2
- package/es/collapse/src/collapse.js +71 -10
- package/es/collapse/style.css +36 -9
- package/es/collapse/style.min.css +1 -1
- package/es/date-panel/src/util.js +16 -0
- package/es/date-panel/style.css +1 -1
- package/es/date-panel/style.min.css +1 -1
- package/es/date-picker/src/date-picker.js +52 -34
- package/es/icon/{iconfont.1781876596706.ttf → iconfont.1782111198241.ttf} +0 -0
- package/es/icon/iconfont.1782111198241.woff +0 -0
- package/es/icon/iconfont.1782111198241.woff2 +0 -0
- package/es/icon/style.css +5 -1
- package/es/icon/style.min.css +1 -1
- package/{lib/icon/style/iconfont.1781876596706.ttf → es/iconfont.1782111198241.ttf} +0 -0
- package/es/iconfont.1782111198241.woff +0 -0
- package/es/iconfont.1782111198241.woff2 +0 -0
- package/es/menu/style.css +0 -1
- package/es/menu/style.min.css +1 -1
- package/es/pulldown/src/pulldown.js +3 -3
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +1 -1
- package/es/tree-select/src/tree-select.js +3 -3
- package/es/ui/index.js +3 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-collapse/style.css +36 -9
- package/es/vxe-collapse/style.min.css +1 -1
- package/es/vxe-date-panel/style.css +1 -1
- package/es/vxe-date-panel/style.min.css +1 -1
- package/es/vxe-icon/style.css +5 -1
- package/es/vxe-icon/style.min.css +1 -1
- package/es/vxe-menu/style.css +0 -1
- package/es/vxe-menu/style.min.css +1 -1
- package/lib/cascader/src/cascader.js +2 -2
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/collapse/src/collapse.js +73 -9
- package/lib/collapse/src/collapse.min.js +1 -1
- package/lib/collapse/style/style.css +36 -9
- package/lib/collapse/style/style.min.css +1 -1
- package/lib/date-panel/src/util.js +17 -0
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-panel/style/style.css +1 -1
- package/lib/date-panel/style/style.min.css +1 -1
- package/lib/date-picker/src/date-picker.js +58 -30
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/{iconfont.1781876596706.ttf → icon/style/iconfont.1782111198241.ttf} +0 -0
- package/lib/icon/style/iconfont.1782111198241.woff +0 -0
- package/lib/icon/style/iconfont.1782111198241.woff2 +0 -0
- package/lib/icon/style/style.css +5 -1
- package/lib/icon/style/style.min.css +5 -1
- package/{es/iconfont.1781876596706.ttf → lib/iconfont.1782111198241.ttf} +0 -0
- package/lib/iconfont.1782111198241.woff +0 -0
- package/lib/iconfont.1782111198241.woff2 +0 -0
- package/lib/index.umd.js +462 -351
- package/lib/index.umd.min.js +1 -1
- package/lib/menu/style/style.css +0 -1
- package/lib/menu/style/style.min.css +1 -1
- package/lib/pulldown/src/pulldown.js +3 -3
- package/lib/pulldown/src/pulldown.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 +1 -1
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +3 -3
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +3 -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/vxe-collapse/style/style.css +36 -9
- package/lib/vxe-collapse/style/style.min.css +1 -1
- package/lib/vxe-date-panel/style/style.css +1 -1
- package/lib/vxe-date-panel/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +5 -1
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-menu/style/style.css +0 -1
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/cascader/src/cascader.ts +2 -2
- package/packages/collapse/src/collapse.ts +75 -14
- package/packages/date-panel/src/util.ts +18 -0
- package/packages/date-picker/src/date-picker.ts +58 -31
- package/packages/pulldown/src/pulldown.ts +3 -3
- package/packages/table-select/src/table-select.ts +1 -1
- package/packages/tree-select/src/tree-select.ts +3 -3
- package/packages/ui/index.ts +2 -0
- package/styles/components/collapse.scss +36 -11
- package/styles/components/date-panel.scss +1 -1
- package/styles/components/icon.scss +5 -1
- package/styles/components/menu.scss +0 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +7 -0
- package/styles/theme/dark.scss +5 -3
- package/styles/theme/light.scss +3 -1
- package/styles/variable.scss +5 -2
- package/types/components/cascader.d.ts +1 -1
- package/types/components/collapse.d.ts +13 -3
- package/types/components/date-panel.d.ts +6 -6
- package/types/components/date-picker.d.ts +4 -0
- package/types/components/icon.d.ts +1 -1
- package/types/components/table.d.ts +16 -2
- package/es/icon/iconfont.1781876596706.woff +0 -0
- package/es/icon/iconfont.1781876596706.woff2 +0 -0
- package/es/iconfont.1781876596706.woff +0 -0
- package/es/iconfont.1781876596706.woff2 +0 -0
- package/lib/icon/style/iconfont.1781876596706.woff +0 -0
- package/lib/icon/style/iconfont.1781876596706.woff2 +0 -0
- package/lib/iconfont.1781876596706.woff +0 -0
- package/lib/iconfont.1781876596706.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.6"}`;
|
|
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}` : '';
|
|
@@ -94,7 +94,7 @@ function createComponentLog(name) {
|
|
|
94
94
|
const warnLog$b = log.create('warn', uiVersion);
|
|
95
95
|
log.create('error', uiVersion);
|
|
96
96
|
|
|
97
|
-
const version = "4.15.
|
|
97
|
+
const version = "4.15.6";
|
|
98
98
|
VxeUI.uiVersion = version;
|
|
99
99
|
VxeUI.dynamicApp = dynamicApp;
|
|
100
100
|
function config(options) {
|
|
@@ -197,6 +197,8 @@ setConfig$1({
|
|
|
197
197
|
datePicker: {
|
|
198
198
|
// size: null,
|
|
199
199
|
// transfer: false,
|
|
200
|
+
startDate: new Date(1900, 0, 1),
|
|
201
|
+
endDate: new Date(2100, 0, 1),
|
|
200
202
|
shortcutConfig: {
|
|
201
203
|
// position: 'left',
|
|
202
204
|
align: 'left',
|
|
@@ -3801,12 +3803,12 @@ VxeUI.component(VxeButtonComponent);
|
|
|
3801
3803
|
const Button = VxeButton;
|
|
3802
3804
|
|
|
3803
3805
|
const { errLog: errLog$g } = createComponentLog('backtop');
|
|
3804
|
-
function createInternalData$
|
|
3806
|
+
function createInternalData$f() {
|
|
3805
3807
|
return {
|
|
3806
3808
|
targetEl: null
|
|
3807
3809
|
};
|
|
3808
3810
|
}
|
|
3809
|
-
function createReactData$
|
|
3811
|
+
function createReactData$g() {
|
|
3810
3812
|
return {
|
|
3811
3813
|
showBtn: false,
|
|
3812
3814
|
backtopZindex: 0
|
|
@@ -3885,8 +3887,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3885
3887
|
const xID = XEUtils.uniqueId();
|
|
3886
3888
|
const refElem = ref();
|
|
3887
3889
|
const { computeSize } = useSize(props);
|
|
3888
|
-
const internalData = createInternalData$
|
|
3889
|
-
const reactData = reactive(createReactData$
|
|
3890
|
+
const internalData = createInternalData$f();
|
|
3891
|
+
const reactData = reactive(createReactData$g());
|
|
3890
3892
|
const refMaps = {
|
|
3891
3893
|
refElem
|
|
3892
3894
|
};
|
|
@@ -4063,8 +4065,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4063
4065
|
});
|
|
4064
4066
|
onBeforeUnmount(() => {
|
|
4065
4067
|
removeScrollEvent();
|
|
4066
|
-
XEUtils.assign(reactData, createReactData$
|
|
4067
|
-
XEUtils.assign(internalData, createInternalData$
|
|
4068
|
+
XEUtils.assign(reactData, createReactData$g());
|
|
4069
|
+
XEUtils.assign(internalData, createInternalData$f());
|
|
4068
4070
|
});
|
|
4069
4071
|
$xeBacktop.renderVN = renderVN;
|
|
4070
4072
|
return $xeBacktop;
|
|
@@ -4668,6 +4670,22 @@ function isAllSameChar(str, char) {
|
|
|
4668
4670
|
}
|
|
4669
4671
|
return true;
|
|
4670
4672
|
}
|
|
4673
|
+
function checkDateFormat(numStr, formatKey) {
|
|
4674
|
+
const numVal = XEUtils.toNumber(numStr);
|
|
4675
|
+
switch (formatKey) {
|
|
4676
|
+
case 'yyyy':
|
|
4677
|
+
return (numVal >= 9999 ? 9999 : (numVal < 1 ? 1 : numVal));
|
|
4678
|
+
case 'MM':
|
|
4679
|
+
return (numVal >= 12 ? 12 : (numVal < 1 ? 1 : numVal));
|
|
4680
|
+
case 'dd':
|
|
4681
|
+
return (numVal >= 31 ? 31 : (numVal < 1 ? 1 : numVal));
|
|
4682
|
+
case 'HH':
|
|
4683
|
+
case 'mm':
|
|
4684
|
+
case 'ss':
|
|
4685
|
+
return (numVal >= 59 ? 59 : (numVal <= 0 ? 0 : numVal));
|
|
4686
|
+
}
|
|
4687
|
+
return numVal;
|
|
4688
|
+
}
|
|
4671
4689
|
|
|
4672
4690
|
const { errLog: errLog$f } = createComponentLog('calendar');
|
|
4673
4691
|
const { menus: menus$2, getConfig: getConfig$2, getI18n: getI18n$1 } = VxeUI;
|
|
@@ -6719,7 +6737,7 @@ function deNodeValue$1(nodeid) {
|
|
|
6719
6737
|
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
6720
6738
|
}
|
|
6721
6739
|
|
|
6722
|
-
function createReactData$
|
|
6740
|
+
function createReactData$f() {
|
|
6723
6741
|
return {
|
|
6724
6742
|
scrollYLoad: false,
|
|
6725
6743
|
bodyHeight: 0,
|
|
@@ -6730,7 +6748,7 @@ function createReactData$e() {
|
|
|
6730
6748
|
items: []
|
|
6731
6749
|
};
|
|
6732
6750
|
}
|
|
6733
|
-
function createInternalData$
|
|
6751
|
+
function createInternalData$e() {
|
|
6734
6752
|
return {
|
|
6735
6753
|
resizeObserver: undefined,
|
|
6736
6754
|
fullData: [],
|
|
@@ -6773,8 +6791,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6773
6791
|
const xID = XEUtils.uniqueId();
|
|
6774
6792
|
const browseObj = XEUtils.browse();
|
|
6775
6793
|
const { computeSize } = useSize(props);
|
|
6776
|
-
const reactData = reactive(createReactData$
|
|
6777
|
-
const internalData = createInternalData$
|
|
6794
|
+
const reactData = reactive(createReactData$f());
|
|
6795
|
+
const internalData = createInternalData$e();
|
|
6778
6796
|
const refElem = ref();
|
|
6779
6797
|
const refVirtualWrapper = ref();
|
|
6780
6798
|
const refVirtualBody = ref();
|
|
@@ -7106,8 +7124,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7106
7124
|
resizeObserver.disconnect();
|
|
7107
7125
|
}
|
|
7108
7126
|
globalEvents.off($xeList, 'resize');
|
|
7109
|
-
XEUtils.assign(reactData, createReactData$
|
|
7110
|
-
XEUtils.assign(internalData, createInternalData$
|
|
7127
|
+
XEUtils.assign(reactData, createReactData$f());
|
|
7128
|
+
XEUtils.assign(internalData, createInternalData$e());
|
|
7111
7129
|
});
|
|
7112
7130
|
$xeList.renderVN = renderVN;
|
|
7113
7131
|
return $xeList;
|
|
@@ -9820,7 +9838,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9820
9838
|
function getNodeUniqueId$1() {
|
|
9821
9839
|
return XEUtils.uniqueId('node_');
|
|
9822
9840
|
}
|
|
9823
|
-
function createReactData$
|
|
9841
|
+
function createReactData$e() {
|
|
9824
9842
|
return {
|
|
9825
9843
|
initialized: false,
|
|
9826
9844
|
searchValue: '',
|
|
@@ -9843,7 +9861,7 @@ function createReactData$d() {
|
|
|
9843
9861
|
lazyOptFlag: 1
|
|
9844
9862
|
};
|
|
9845
9863
|
}
|
|
9846
|
-
function createInternalData$
|
|
9864
|
+
function createInternalData$d() {
|
|
9847
9865
|
return {
|
|
9848
9866
|
// hpTimeout: undefined,
|
|
9849
9867
|
listVirtualYOpts: {
|
|
@@ -9884,11 +9902,11 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9884
9902
|
filterConfig: Object,
|
|
9885
9903
|
showFullLabel: {
|
|
9886
9904
|
type: Boolean,
|
|
9887
|
-
default: getConfig$3().cascader.showFullLabel
|
|
9905
|
+
default: () => getConfig$3().cascader.showFullLabel
|
|
9888
9906
|
},
|
|
9889
9907
|
separator: {
|
|
9890
9908
|
type: String,
|
|
9891
|
-
default: getConfig$3().cascader.separator
|
|
9909
|
+
default: () => getConfig$3().cascader.separator
|
|
9892
9910
|
},
|
|
9893
9911
|
multiple: Boolean,
|
|
9894
9912
|
className: [String, Function],
|
|
@@ -9970,8 +9988,8 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9970
9988
|
const refInpSearch = ref();
|
|
9971
9989
|
const refChunkWrapper = ref();
|
|
9972
9990
|
const refOptionPanel = ref();
|
|
9973
|
-
const reactData = reactive(createReactData$
|
|
9974
|
-
const internalData = createInternalData$
|
|
9991
|
+
const reactData = reactive(createReactData$e());
|
|
9992
|
+
const internalData = createInternalData$d();
|
|
9975
9993
|
const refMaps = {
|
|
9976
9994
|
refElem
|
|
9977
9995
|
};
|
|
@@ -11543,7 +11561,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
11543
11561
|
globalEvents.off($xeCascader, 'mousedown');
|
|
11544
11562
|
globalEvents.off($xeCascader, 'blur');
|
|
11545
11563
|
globalEvents.off($xeCascader, 'resize');
|
|
11546
|
-
XEUtils.assign(internalData, createInternalData$
|
|
11564
|
+
XEUtils.assign(internalData, createInternalData$d());
|
|
11547
11565
|
});
|
|
11548
11566
|
provide('$xeCascader', $xeCascader);
|
|
11549
11567
|
$xeCascader.renderVN = renderVN;
|
|
@@ -11876,10 +11894,10 @@ dynamicApp.use(VxeCheckboxButton);
|
|
|
11876
11894
|
VxeUI.component(VxeCheckboxButtonComponent);
|
|
11877
11895
|
const CheckboxButton = VxeCheckboxButton;
|
|
11878
11896
|
|
|
11879
|
-
function createReactData$
|
|
11897
|
+
function createReactData$d() {
|
|
11880
11898
|
return {};
|
|
11881
11899
|
}
|
|
11882
|
-
function createInternalData$
|
|
11900
|
+
function createInternalData$c() {
|
|
11883
11901
|
return {
|
|
11884
11902
|
// isLoaded: false
|
|
11885
11903
|
};
|
|
@@ -11918,8 +11936,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
11918
11936
|
const $xeForm = inject('$xeForm', null);
|
|
11919
11937
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
11920
11938
|
const xID = XEUtils.uniqueId();
|
|
11921
|
-
const reactData = reactive(createReactData$
|
|
11922
|
-
const internalData = createInternalData$
|
|
11939
|
+
const reactData = reactive(createReactData$d());
|
|
11940
|
+
const internalData = createInternalData$c();
|
|
11923
11941
|
const computeIsReadonly = computed(() => {
|
|
11924
11942
|
const { readonly } = props;
|
|
11925
11943
|
if (readonly === null) {
|
|
@@ -12078,8 +12096,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
12078
12096
|
});
|
|
12079
12097
|
});
|
|
12080
12098
|
onUnmounted(() => {
|
|
12081
|
-
XEUtils.assign(reactData, createReactData$
|
|
12082
|
-
XEUtils.assign(internalData, createInternalData$
|
|
12099
|
+
XEUtils.assign(reactData, createReactData$d());
|
|
12100
|
+
XEUtils.assign(internalData, createInternalData$c());
|
|
12083
12101
|
});
|
|
12084
12102
|
provide('$xeCheckboxGroup', $xeCheckboxGroup);
|
|
12085
12103
|
$xeCheckboxGroup.renderVN = renderVN;
|
|
@@ -12212,6 +12230,19 @@ dynamicApp.use(VxeCol);
|
|
|
12212
12230
|
VxeUI.component(VxeColComponent);
|
|
12213
12231
|
const Col = VxeCol;
|
|
12214
12232
|
|
|
12233
|
+
function createReactData$c() {
|
|
12234
|
+
return {
|
|
12235
|
+
staticPanes: [],
|
|
12236
|
+
activeNames: [],
|
|
12237
|
+
initNames: [],
|
|
12238
|
+
cachePaneMaps: {}
|
|
12239
|
+
};
|
|
12240
|
+
}
|
|
12241
|
+
function createInternalData$b() {
|
|
12242
|
+
return {
|
|
12243
|
+
// esTime: null
|
|
12244
|
+
};
|
|
12245
|
+
}
|
|
12215
12246
|
var VxeCollapseComponent = defineVxeComponent({
|
|
12216
12247
|
name: 'VxeCollapse',
|
|
12217
12248
|
props: {
|
|
@@ -12221,6 +12252,10 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12221
12252
|
type: Boolean,
|
|
12222
12253
|
default: () => getConfig$3().collapse.padding
|
|
12223
12254
|
},
|
|
12255
|
+
border: {
|
|
12256
|
+
type: Boolean,
|
|
12257
|
+
default: () => getConfig$3().collapse.border
|
|
12258
|
+
},
|
|
12224
12259
|
expandConfig: Object,
|
|
12225
12260
|
size: {
|
|
12226
12261
|
type: String,
|
|
@@ -12238,12 +12273,8 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12238
12273
|
const xID = XEUtils.uniqueId();
|
|
12239
12274
|
const { computeSize } = useSize(props);
|
|
12240
12275
|
const refElem = ref();
|
|
12241
|
-
const reactData = reactive(
|
|
12242
|
-
|
|
12243
|
-
activeNames: [],
|
|
12244
|
-
initNames: [],
|
|
12245
|
-
cachePaneMaps: {}
|
|
12246
|
-
});
|
|
12276
|
+
const reactData = reactive(createReactData$c());
|
|
12277
|
+
const internalData = createInternalData$b();
|
|
12247
12278
|
const refMaps = {
|
|
12248
12279
|
refElem
|
|
12249
12280
|
};
|
|
@@ -12264,6 +12295,7 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12264
12295
|
props,
|
|
12265
12296
|
context,
|
|
12266
12297
|
reactData,
|
|
12298
|
+
internalData,
|
|
12267
12299
|
getRefMaps: () => refMaps,
|
|
12268
12300
|
getComputeMaps: () => computeMaps
|
|
12269
12301
|
};
|
|
@@ -12294,6 +12326,7 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12294
12326
|
if (name) {
|
|
12295
12327
|
const isActive = activeNames.includes(name);
|
|
12296
12328
|
nameMaps[`${name}`] = {
|
|
12329
|
+
height: 0,
|
|
12297
12330
|
loading: false
|
|
12298
12331
|
};
|
|
12299
12332
|
if (isActive) {
|
|
@@ -12329,8 +12362,14 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12329
12362
|
};
|
|
12330
12363
|
const handleClickEvent = (evnt, item) => {
|
|
12331
12364
|
const { activeNames } = reactData;
|
|
12365
|
+
const { esTime } = internalData;
|
|
12332
12366
|
const { name } = item;
|
|
12367
|
+
if (esTime) {
|
|
12368
|
+
clearTimeout(esTime);
|
|
12369
|
+
}
|
|
12333
12370
|
if (name) {
|
|
12371
|
+
const headEl = evnt.currentTarget;
|
|
12372
|
+
const bodyEl = headEl.nextElementSibling;
|
|
12334
12373
|
const aIndex = activeNames.indexOf(name);
|
|
12335
12374
|
let expanded = false;
|
|
12336
12375
|
if (aIndex === -1) {
|
|
@@ -12340,6 +12379,35 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12340
12379
|
else {
|
|
12341
12380
|
activeNames.splice(aIndex, 1);
|
|
12342
12381
|
}
|
|
12382
|
+
const startAnimation = () => {
|
|
12383
|
+
const itemEl = bodyEl.firstElementChild;
|
|
12384
|
+
if (itemEl) {
|
|
12385
|
+
bodyEl.style.height = toCssUnit(itemEl.scrollHeight);
|
|
12386
|
+
if (expanded) {
|
|
12387
|
+
internalData.esTime = setTimeout(() => {
|
|
12388
|
+
bodyEl.style.height = '';
|
|
12389
|
+
internalData.esTime = undefined;
|
|
12390
|
+
}, 200);
|
|
12391
|
+
}
|
|
12392
|
+
else {
|
|
12393
|
+
nextTick(() => {
|
|
12394
|
+
requestAnimationFrame(() => {
|
|
12395
|
+
bodyEl.style.height = '';
|
|
12396
|
+
});
|
|
12397
|
+
});
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
};
|
|
12401
|
+
if (bodyEl) {
|
|
12402
|
+
const itemEl = bodyEl.firstElementChild;
|
|
12403
|
+
if (itemEl) {
|
|
12404
|
+
startAnimation();
|
|
12405
|
+
}
|
|
12406
|
+
else {
|
|
12407
|
+
bodyEl.style.height = '0';
|
|
12408
|
+
nextTick(startAnimation);
|
|
12409
|
+
}
|
|
12410
|
+
}
|
|
12343
12411
|
addInitName(name);
|
|
12344
12412
|
dispatchEvent('change', { value: activeNames, name }, evnt);
|
|
12345
12413
|
dispatchEvent('toggle-expand', { value: activeNames, name, expanded }, evnt);
|
|
@@ -12388,7 +12456,8 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12388
12456
|
]),
|
|
12389
12457
|
h('div', {
|
|
12390
12458
|
class: ['vxe-collapse--item-content', {
|
|
12391
|
-
'is--visible': isActive
|
|
12459
|
+
'is--visible': isActive,
|
|
12460
|
+
'is--hidden': !isActive
|
|
12392
12461
|
}]
|
|
12393
12462
|
}, [
|
|
12394
12463
|
name && initNames.includes(name)
|
|
@@ -12403,7 +12472,7 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12403
12472
|
});
|
|
12404
12473
|
};
|
|
12405
12474
|
const renderVN = () => {
|
|
12406
|
-
const { padding } = props;
|
|
12475
|
+
const { padding, border } = props;
|
|
12407
12476
|
const vSize = computeSize.value;
|
|
12408
12477
|
const itemOptions = computeItemOptions.value;
|
|
12409
12478
|
const itemStaticOptions = computeItemStaticOptions.value;
|
|
@@ -12413,7 +12482,8 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12413
12482
|
ref: refElem,
|
|
12414
12483
|
class: ['vxe-collapse', {
|
|
12415
12484
|
[`size--${vSize}`]: vSize,
|
|
12416
|
-
'is--padding': padding
|
|
12485
|
+
'is--padding': padding,
|
|
12486
|
+
'is--border': border
|
|
12417
12487
|
}]
|
|
12418
12488
|
}, [
|
|
12419
12489
|
h('div', {
|
|
@@ -12447,6 +12517,14 @@ var VxeCollapseComponent = defineVxeComponent({
|
|
|
12447
12517
|
});
|
|
12448
12518
|
reactData.activeNames = props.modelValue || [];
|
|
12449
12519
|
initDefaultName(reactData.staticPanes.length ? reactData.staticPanes : props.options);
|
|
12520
|
+
onUnmounted(() => {
|
|
12521
|
+
const { esTime } = internalData;
|
|
12522
|
+
if (esTime) {
|
|
12523
|
+
clearTimeout(esTime);
|
|
12524
|
+
}
|
|
12525
|
+
XEUtils.assign(reactData, createReactData$c());
|
|
12526
|
+
XEUtils.assign(internalData, createInternalData$b());
|
|
12527
|
+
});
|
|
12450
12528
|
provide('$xeCollapse', $xeCollapse);
|
|
12451
12529
|
$xeCollapse.renderVN = renderVN;
|
|
12452
12530
|
return $xeCollapse;
|
|
@@ -17943,6 +18021,12 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17943
18021
|
}
|
|
17944
18022
|
return [];
|
|
17945
18023
|
});
|
|
18024
|
+
const computeDateStartDate = computed(() => {
|
|
18025
|
+
return props.startDate ? XEUtils.toStringDate(props.startDate) : null;
|
|
18026
|
+
});
|
|
18027
|
+
const computeDateEndDate = computed(() => {
|
|
18028
|
+
return props.endDate ? XEUtils.toStringDate(props.endDate) : null;
|
|
18029
|
+
});
|
|
17946
18030
|
const computeLimitMaxCount = computed(() => {
|
|
17947
18031
|
return props.multiple ? XEUtils.toNumber(props.limitCount) : 0;
|
|
17948
18032
|
});
|
|
@@ -18192,13 +18276,31 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18192
18276
|
handleInputLabel(panelLabel, true);
|
|
18193
18277
|
};
|
|
18194
18278
|
const afterCheckValue = (inpVal) => {
|
|
18195
|
-
const { type } = props;
|
|
18279
|
+
const { type, editable, multiple, maskedConfig } = props;
|
|
18196
18280
|
const { inputLabel } = internalData;
|
|
18197
18281
|
const dateLabelFormat = computeDateLabelFormat.value;
|
|
18282
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18198
18283
|
if (!inpVal) {
|
|
18199
18284
|
handleChange('', { type: 'check' });
|
|
18200
18285
|
return;
|
|
18201
18286
|
}
|
|
18287
|
+
// 掩码格式处理
|
|
18288
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18289
|
+
const allMaskedKeys = dateLabelFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g'));
|
|
18290
|
+
if (allMaskedKeys) {
|
|
18291
|
+
allMaskedKeys.forEach(formatKey => {
|
|
18292
|
+
const fkIndex = dateLabelFormat.indexOf(formatKey);
|
|
18293
|
+
if (fkIndex > -1) {
|
|
18294
|
+
const val = XEUtils.toNumber(inpVal.slice(fkIndex, formatKey.length).replace(/\D/g, ''));
|
|
18295
|
+
inpVal = inpVal.slice(0, fkIndex) + XEUtils.padStart(checkDateFormat(val, formatKey), formatKey.length, '0') + inpVal.slice(fkIndex + formatKey.length);
|
|
18296
|
+
}
|
|
18297
|
+
});
|
|
18298
|
+
}
|
|
18299
|
+
}
|
|
18300
|
+
const $datePanel = refDatePanel.value;
|
|
18301
|
+
if ($datePanel) {
|
|
18302
|
+
return $datePanel.checkValue(inpVal);
|
|
18303
|
+
}
|
|
18202
18304
|
let inpDateVal = parseDateValue(inpVal, type, {
|
|
18203
18305
|
valueFormat: dateLabelFormat
|
|
18204
18306
|
});
|
|
@@ -18246,6 +18348,16 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18246
18348
|
dispatchEvent('suffix-click', { value: inputValue }, evnt);
|
|
18247
18349
|
}
|
|
18248
18350
|
};
|
|
18351
|
+
const checkMaskedInputValue = (numStr, chunkFormat, isFull) => {
|
|
18352
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18353
|
+
const { align } = maskedOpts;
|
|
18354
|
+
const maskChar = computeMaskChar.value;
|
|
18355
|
+
const restVal = checkDateFormat(XEUtils.toNumber(numStr), chunkFormat);
|
|
18356
|
+
if (isFull) {
|
|
18357
|
+
return XEUtils.padStart(restVal, chunkFormat.length, '0');
|
|
18358
|
+
}
|
|
18359
|
+
return XEUtils[align === 'right' ? 'padStart' : 'padEnd'](restVal, chunkFormat.length, maskChar);
|
|
18360
|
+
};
|
|
18249
18361
|
const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
|
|
18250
18362
|
const { type, multiple } = props;
|
|
18251
18363
|
if (multiple) {
|
|
@@ -18279,7 +18391,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18279
18391
|
const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
18280
18392
|
if (parseInputKayMaps[selectKey]) {
|
|
18281
18393
|
const chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : XEUtils.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
|
|
18282
|
-
const restValue = inpValue.slice(0, chunkStartIndex) +
|
|
18394
|
+
const restValue = inpValue.slice(0, chunkStartIndex) + checkMaskedInputValue(chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
18283
18395
|
evnt.preventDefault();
|
|
18284
18396
|
if (restValue.indexOf(maskChar) === -1) {
|
|
18285
18397
|
// 解析日期
|
|
@@ -18340,6 +18452,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18340
18452
|
return;
|
|
18341
18453
|
}
|
|
18342
18454
|
const { isTriggerMasked } = internalData;
|
|
18455
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18456
|
+
const { align } = maskedOpts;
|
|
18343
18457
|
const dateMaskedFormat = computeDateMaskedFormat.value;
|
|
18344
18458
|
const maskChar = computeMaskChar.value;
|
|
18345
18459
|
let inpValue = targetElem.value || dateMaskedFormat;
|
|
@@ -18359,7 +18473,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18359
18473
|
const chunkEndIndex = chunkStartIndex + chunkFormat.length;
|
|
18360
18474
|
const currKeyIndex = allMaskedKeys.indexOf(selectKey);
|
|
18361
18475
|
// 全选 | 如果无效字符
|
|
18362
|
-
const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
|
|
18476
|
+
const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
|
|
18363
18477
|
const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
|
|
18364
18478
|
if (isAllSelected || isNotMasked) {
|
|
18365
18479
|
inpValue = dateMaskedFormat;
|
|
@@ -18369,11 +18483,12 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18369
18483
|
const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
|
|
18370
18484
|
if (isNumKey) {
|
|
18371
18485
|
chunkNumList.push(numKey);
|
|
18486
|
+
chunkValue = checkMaskedInputValue(chunkNumList.join(''), chunkFormat, false);
|
|
18372
18487
|
}
|
|
18373
18488
|
else if (isBackspaceKey) {
|
|
18374
18489
|
chunkNumList.pop();
|
|
18490
|
+
chunkValue = XEUtils[align === 'right' ? 'padStart' : 'padEnd'](chunkNumList.join(''), chunkFormat.length, maskChar);
|
|
18375
18491
|
}
|
|
18376
|
-
chunkValue = chunkNumList.join('').padEnd(chunkFormat.length, maskChar);
|
|
18377
18492
|
let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
|
|
18378
18493
|
restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
|
|
18379
18494
|
targetElem.value = restValue;
|
|
@@ -18405,7 +18520,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18405
18520
|
const prveChunkNums = (prveChunkValue.match(/\d/g) || []);
|
|
18406
18521
|
if (prveChunkNums.length) {
|
|
18407
18522
|
prveChunkNums.pop();
|
|
18408
|
-
prveChunkValue = prveChunkNums.join('')
|
|
18523
|
+
prveChunkValue = XEUtils[align === 'right' ? 'padStart' : 'padEnd'](prveChunkNums.join(''), prveChunkFormat.length, maskChar);
|
|
18409
18524
|
restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
|
|
18410
18525
|
targetElem.value = restValue;
|
|
18411
18526
|
handleInputLabel(restValue, false);
|
|
@@ -18495,7 +18610,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18495
18610
|
}
|
|
18496
18611
|
}
|
|
18497
18612
|
// 全选 | 如果无效字符
|
|
18498
|
-
const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
|
|
18613
|
+
const isAllSelected = !selectionStart && selectionEnd === inpValue.length && allMaskedKeys.length > 1;
|
|
18499
18614
|
const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
|
|
18500
18615
|
if (isAllSelected || isNotMasked) {
|
|
18501
18616
|
let restValue = '';
|
|
@@ -18539,7 +18654,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18539
18654
|
}
|
|
18540
18655
|
};
|
|
18541
18656
|
const blurEvent = (evnt) => {
|
|
18542
|
-
const $datePanel = refDatePanel.value;
|
|
18543
18657
|
const { inputValue } = reactData;
|
|
18544
18658
|
const inpImmediate = computeInpImmediate.value;
|
|
18545
18659
|
const value = inputValue;
|
|
@@ -18550,12 +18664,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18550
18664
|
const { inputLabel } = internalData;
|
|
18551
18665
|
reactData.isActivated = false;
|
|
18552
18666
|
// 未打开面板时才校验
|
|
18553
|
-
|
|
18554
|
-
$datePanel.checkValue(inputLabel);
|
|
18555
|
-
}
|
|
18556
|
-
else {
|
|
18557
|
-
afterCheckValue(inputLabel);
|
|
18558
|
-
}
|
|
18667
|
+
afterCheckValue(inputLabel);
|
|
18559
18668
|
}
|
|
18560
18669
|
dispatchEvent('blur', { value }, evnt);
|
|
18561
18670
|
// 自动更新校验状态
|
|
@@ -18611,18 +18720,12 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18611
18720
|
const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
|
|
18612
18721
|
if (editable) {
|
|
18613
18722
|
if (isEnter) {
|
|
18614
|
-
const $datePanel = refDatePanel.value;
|
|
18615
18723
|
const { inputLabel } = internalData;
|
|
18616
18724
|
const targetElem = refInputTarget.value;
|
|
18617
18725
|
if (visiblePanel) {
|
|
18618
18726
|
hidePanel();
|
|
18619
18727
|
}
|
|
18620
|
-
|
|
18621
|
-
$datePanel.checkValue(inputLabel);
|
|
18622
|
-
}
|
|
18623
|
-
else {
|
|
18624
|
-
afterCheckValue(inputLabel);
|
|
18625
|
-
}
|
|
18728
|
+
afterCheckValue(inputLabel);
|
|
18626
18729
|
if (targetElem) {
|
|
18627
18730
|
targetElem.blur();
|
|
18628
18731
|
}
|
|
@@ -18669,7 +18772,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18669
18772
|
};
|
|
18670
18773
|
// 全局事件
|
|
18671
18774
|
const handleGlobalMousedownEvent = (evnt) => {
|
|
18672
|
-
const $datePanel = refDatePanel.value;
|
|
18673
18775
|
const { visiblePanel, isActivated } = reactData;
|
|
18674
18776
|
const el = refElem.value;
|
|
18675
18777
|
const panelWrapperElem = refPanelWrapper.value;
|
|
@@ -18683,12 +18785,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18683
18785
|
if (visiblePanel) {
|
|
18684
18786
|
hidePanel();
|
|
18685
18787
|
const { inputLabel } = internalData;
|
|
18686
|
-
|
|
18687
|
-
$datePanel.checkValue(inputLabel);
|
|
18688
|
-
}
|
|
18689
|
-
else {
|
|
18690
|
-
afterCheckValue(inputLabel);
|
|
18691
|
-
}
|
|
18788
|
+
afterCheckValue(inputLabel);
|
|
18692
18789
|
}
|
|
18693
18790
|
}
|
|
18694
18791
|
}
|
|
@@ -18727,7 +18824,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18727
18824
|
}
|
|
18728
18825
|
};
|
|
18729
18826
|
const handleGlobalBlurEvent = () => {
|
|
18730
|
-
const $datePanel = refDatePanel.value;
|
|
18731
18827
|
const { isActivated, visiblePanel } = reactData;
|
|
18732
18828
|
if (visiblePanel) {
|
|
18733
18829
|
hidePanel();
|
|
@@ -18736,9 +18832,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18736
18832
|
reactData.isActivated = false;
|
|
18737
18833
|
}
|
|
18738
18834
|
if (visiblePanel || isActivated) {
|
|
18739
|
-
|
|
18740
|
-
$datePanel.checkValue(internalData.inputLabel);
|
|
18741
|
-
}
|
|
18835
|
+
afterCheckValue(internalData.inputLabel);
|
|
18742
18836
|
const targetElem = refInputTarget.value;
|
|
18743
18837
|
if (targetElem) {
|
|
18744
18838
|
targetElem.blur();
|
|
@@ -18951,6 +19045,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18951
19045
|
const isDateTimeType = computeIsDateTimeType.value;
|
|
18952
19046
|
const shortcutList = computeShortcutList.value;
|
|
18953
19047
|
const timeOpts = computeTimeOpts.value;
|
|
19048
|
+
const dateStartDate = computeDateStartDate.value;
|
|
19049
|
+
const dateEndDate = computeDateEndDate.value;
|
|
18954
19050
|
const { position } = shortcutOpts;
|
|
18955
19051
|
const headerSlot = slots.header;
|
|
18956
19052
|
const footerSlot = slots.footer;
|
|
@@ -19019,8 +19115,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
19019
19115
|
className: props.className,
|
|
19020
19116
|
multiple: props.multiple,
|
|
19021
19117
|
limitCount: props.limitCount,
|
|
19022
|
-
startDate:
|
|
19023
|
-
endDate:
|
|
19118
|
+
startDate: dateStartDate,
|
|
19119
|
+
endDate: dateEndDate,
|
|
19024
19120
|
defaultDate: props.defaultDate,
|
|
19025
19121
|
defaultTime: props.defaultTime,
|
|
19026
19122
|
minDate: props.minDate,
|
|
@@ -31691,7 +31787,7 @@ var VxePulldownComponent = defineVxeComponent({
|
|
|
31691
31787
|
*/
|
|
31692
31788
|
trigger: {
|
|
31693
31789
|
type: String,
|
|
31694
|
-
default: getConfig$3().pulldown.trigger
|
|
31790
|
+
default: () => getConfig$3().pulldown.trigger
|
|
31695
31791
|
},
|
|
31696
31792
|
/**
|
|
31697
31793
|
* 已废弃,请使用 popupConfig.zIndex
|
|
@@ -31705,7 +31801,7 @@ var VxePulldownComponent = defineVxeComponent({
|
|
|
31705
31801
|
options: Array,
|
|
31706
31802
|
className: {
|
|
31707
31803
|
type: [String, Function],
|
|
31708
|
-
default: getConfig$3().pulldown.className
|
|
31804
|
+
default: () => getConfig$3().pulldown.className
|
|
31709
31805
|
},
|
|
31710
31806
|
/**
|
|
31711
31807
|
* 已废弃,请使用 popupConfig.className
|
|
@@ -31716,7 +31812,7 @@ var VxePulldownComponent = defineVxeComponent({
|
|
|
31716
31812
|
popupConfig: Object,
|
|
31717
31813
|
destroyOnClose: {
|
|
31718
31814
|
type: Boolean,
|
|
31719
|
-
default: getConfig$3().pulldown.destroyOnClose
|
|
31815
|
+
default: () => getConfig$3().pulldown.destroyOnClose
|
|
31720
31816
|
},
|
|
31721
31817
|
transfer: {
|
|
31722
31818
|
type: Boolean,
|
|
@@ -35084,7 +35180,7 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
35084
35180
|
modelValue: [String, Number, Array],
|
|
35085
35181
|
clearable: {
|
|
35086
35182
|
type: Boolean,
|
|
35087
|
-
default: getConfig$3().tableSelect.clearable
|
|
35183
|
+
default: () => getConfig$3().tableSelect.clearable
|
|
35088
35184
|
},
|
|
35089
35185
|
placeholder: {
|
|
35090
35186
|
type: String,
|
|
@@ -40565,7 +40661,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40565
40661
|
modelValue: [String, Number, Array],
|
|
40566
40662
|
clearable: {
|
|
40567
40663
|
type: Boolean,
|
|
40568
|
-
default: getConfig$3().treeSelect.clearable
|
|
40664
|
+
default: () => getConfig$3().treeSelect.clearable
|
|
40569
40665
|
},
|
|
40570
40666
|
placeholder: {
|
|
40571
40667
|
type: String,
|
|
@@ -40582,11 +40678,11 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40582
40678
|
},
|
|
40583
40679
|
showFullLabel: {
|
|
40584
40680
|
type: Boolean,
|
|
40585
|
-
default: getConfig$3().treeSelect.showFullLabel
|
|
40681
|
+
default: () => getConfig$3().treeSelect.showFullLabel
|
|
40586
40682
|
},
|
|
40587
40683
|
separator: {
|
|
40588
40684
|
type: String,
|
|
40589
|
-
default: getConfig$3().treeSelect.separator
|
|
40685
|
+
default: () => getConfig$3().treeSelect.separator
|
|
40590
40686
|
},
|
|
40591
40687
|
filterable: Boolean,
|
|
40592
40688
|
filterConfig: Object,
|