vxe-pc-ui 4.16.6 → 4.16.8
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 +236 -132
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/cascader/src/cascader.js +66 -26
- package/es/cascader/style.css +9 -9
- package/es/cascader/style.min.css +1 -1
- package/es/date-range-picker/src/date-range-picker.js +25 -9
- package/es/icon/style.css +1 -1
- package/es/menu/src/menu.js +65 -17
- package/es/menu/style.css +15 -8
- package/es/menu/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +3 -3
- package/es/ui/src/log.js +1 -1
- package/es/vxe-cascader/style.css +9 -9
- package/es/vxe-cascader/style.min.css +1 -1
- package/es/vxe-menu/style.css +15 -8
- package/es/vxe-menu/style.min.css +1 -1
- package/lib/cascader/src/cascader.js +73 -27
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/cascader/style/style.css +9 -9
- package/lib/cascader/style/style.min.css +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +27 -9
- package/lib/date-range-picker/src/date-range-picker.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 +171 -53
- package/lib/index.umd.min.js +1 -1
- package/lib/menu/src/menu.js +66 -13
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/menu/style/style.css +15 -8
- package/lib/menu/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +3 -3
- 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-cascader/style/style.css +9 -9
- package/lib/vxe-cascader/style/style.min.css +1 -1
- package/lib/vxe-menu/style/style.css +15 -8
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/cascader/src/cascader.ts +66 -25
- package/packages/date-range-picker/src/date-range-picker.ts +23 -9
- package/packages/menu/src/menu.ts +71 -17
- package/packages/ui/index.ts +2 -2
- package/styles/components/cascader.scss +9 -9
- package/styles/components/menu.scss +9 -5
- package/types/components/cascader.d.ts +1 -0
- package/types/components/menu.d.ts +6 -0
- /package/es/icon/{iconfont.1783838735018.ttf → iconfont.1783923662673.ttf} +0 -0
- /package/es/icon/{iconfont.1783838735018.woff → iconfont.1783923662673.woff} +0 -0
- /package/es/icon/{iconfont.1783838735018.woff2 → iconfont.1783923662673.woff2} +0 -0
- /package/es/{iconfont.1783838735018.ttf → iconfont.1783923662673.ttf} +0 -0
- /package/es/{iconfont.1783838735018.woff → iconfont.1783923662673.woff} +0 -0
- /package/es/{iconfont.1783838735018.woff2 → iconfont.1783923662673.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.ttf → iconfont.1783923662673.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.woff → iconfont.1783923662673.woff} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.woff2 → iconfont.1783923662673.woff2} +0 -0
- /package/lib/{iconfont.1783838735018.ttf → iconfont.1783923662673.ttf} +0 -0
- /package/lib/{iconfont.1783838735018.woff → iconfont.1783923662673.woff} +0 -0
- /package/lib/{iconfont.1783838735018.woff2 → iconfont.1783923662673.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -4657,7 +4657,7 @@ function checkDynamic() {
|
|
|
4657
4657
|
const {
|
|
4658
4658
|
log: log_log
|
|
4659
4659
|
} = VxeUI;
|
|
4660
|
-
const uiVersion = `ui v${"4.16.
|
|
4660
|
+
const uiVersion = `ui v${"4.16.8"}`;
|
|
4661
4661
|
function createComponentLog(name) {
|
|
4662
4662
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
4663
4663
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -4675,7 +4675,7 @@ const errLog = log_log.create('error', uiVersion);
|
|
|
4675
4675
|
|
|
4676
4676
|
|
|
4677
4677
|
|
|
4678
|
-
const ui_version = "4.16.
|
|
4678
|
+
const ui_version = "4.16.8";
|
|
4679
4679
|
VxeUI.uiVersion = ui_version;
|
|
4680
4680
|
VxeUI.dynamicApp = dynamicApp;
|
|
4681
4681
|
function config(options) {
|
|
@@ -5171,8 +5171,8 @@ setIcon({
|
|
|
5171
5171
|
BUTTON_LOADING: iconPrefix + 'spinner roll',
|
|
5172
5172
|
BUTTON_TOOLTIP_ICON: iconPrefix + 'question-circle-fill',
|
|
5173
5173
|
// menu
|
|
5174
|
-
MENU_ITEM_EXPAND_OPEN: iconPrefix + 'arrow-
|
|
5175
|
-
MENU_ITEM_EXPAND_CLOSE: iconPrefix + 'arrow-
|
|
5174
|
+
MENU_ITEM_EXPAND_OPEN: iconPrefix + 'arrow-right rotate90',
|
|
5175
|
+
MENU_ITEM_EXPAND_CLOSE: iconPrefix + 'arrow-right',
|
|
5176
5176
|
// select
|
|
5177
5177
|
SELECT_LOADED: iconPrefix + 'spinner roll',
|
|
5178
5178
|
SELECT_OPEN: iconPrefix + 'caret-down rotate180',
|
|
@@ -17403,6 +17403,7 @@ const Input = VxeInput;
|
|
|
17403
17403
|
|
|
17404
17404
|
|
|
17405
17405
|
|
|
17406
|
+
|
|
17406
17407
|
/**
|
|
17407
17408
|
* 生成节点的唯一主键
|
|
17408
17409
|
*/
|
|
@@ -17449,6 +17450,7 @@ function cascader_createInternalData() {
|
|
|
17449
17450
|
selectCheckboxMaps: {},
|
|
17450
17451
|
treeExpandedMaps: {},
|
|
17451
17452
|
treeExpandLazyLoadedMaps: {}
|
|
17453
|
+
// isUpdateMode: false
|
|
17452
17454
|
};
|
|
17453
17455
|
}
|
|
17454
17456
|
/* harmony default export */ var cascader = (defineVxeComponent({
|
|
@@ -17728,6 +17730,20 @@ function cascader_createInternalData() {
|
|
|
17728
17730
|
const nodeKey = node[valueField];
|
|
17729
17731
|
return enNodeValue(nodeKey);
|
|
17730
17732
|
};
|
|
17733
|
+
const isPathInTree = (treeData, pathIds) => {
|
|
17734
|
+
if (!pathIds || !pathIds.length) {
|
|
17735
|
+
return false;
|
|
17736
|
+
}
|
|
17737
|
+
let currentNodes = treeData;
|
|
17738
|
+
for (const nodeid of pathIds) {
|
|
17739
|
+
const found = currentNodes.find(node => getNodeId(node) === nodeid);
|
|
17740
|
+
if (!found) {
|
|
17741
|
+
return false;
|
|
17742
|
+
}
|
|
17743
|
+
currentNodes = found.children || [];
|
|
17744
|
+
}
|
|
17745
|
+
return true;
|
|
17746
|
+
};
|
|
17731
17747
|
const isCheckedByCheckboxNodeId = nodeid => {
|
|
17732
17748
|
const {
|
|
17733
17749
|
updateCheckboxFlag
|
|
@@ -17969,7 +17985,7 @@ function cascader_createInternalData() {
|
|
|
17969
17985
|
if (transform) {
|
|
17970
17986
|
treeList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(treeFullData, handleSearch, {
|
|
17971
17987
|
original: true,
|
|
17972
|
-
isEvery:
|
|
17988
|
+
isEvery: false,
|
|
17973
17989
|
children: childrenField,
|
|
17974
17990
|
mapChildren: mapChildrenField
|
|
17975
17991
|
});
|
|
@@ -17987,7 +18003,7 @@ function cascader_createInternalData() {
|
|
|
17987
18003
|
if (transform) {
|
|
17988
18004
|
treeList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(treeFullData, () => true, {
|
|
17989
18005
|
original: true,
|
|
17990
|
-
isEvery:
|
|
18006
|
+
isEvery: false,
|
|
17991
18007
|
children: childrenField,
|
|
17992
18008
|
mapChildren: mapChildrenField
|
|
17993
18009
|
});
|
|
@@ -18091,20 +18107,31 @@ function cascader_createInternalData() {
|
|
|
18091
18107
|
}
|
|
18092
18108
|
const triggerSearchEvent = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(() => {
|
|
18093
18109
|
handleData(true);
|
|
18094
|
-
|
|
18095
|
-
const filterOpts = computeFilterOpts.value;
|
|
18110
|
+
updateCheckboxStatus();
|
|
18096
18111
|
const {
|
|
18097
|
-
|
|
18098
|
-
} =
|
|
18112
|
+
currentItems
|
|
18113
|
+
} = reactData;
|
|
18099
18114
|
const {
|
|
18100
18115
|
afterTreeList
|
|
18101
18116
|
} = internalData;
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
|
|
18117
|
+
const filterOpts = computeFilterOpts.value;
|
|
18118
|
+
const {
|
|
18119
|
+
autoExpandMode
|
|
18120
|
+
} = filterOpts;
|
|
18121
|
+
// 如果当前不在列表情况下,触发默认行为
|
|
18122
|
+
if (!isPathInTree(afterTreeList, currentItems)) {
|
|
18123
|
+
// 默认展开
|
|
18124
|
+
if (autoExpandMode === 'first' || autoExpandMode === 'last') {
|
|
18125
|
+
const stItems = handleHasChildNodeIds(afterTreeList, autoExpandMode);
|
|
18126
|
+
const expandedMaps = {};
|
|
18127
|
+
stItems.forEach(nodeid => {
|
|
18128
|
+
expandedMaps[nodeid] = true;
|
|
18129
|
+
});
|
|
18130
|
+
internalData.treeExpandedMaps = expandedMaps;
|
|
18131
|
+
reactData.currentItems = stItems;
|
|
18132
|
+
} else {
|
|
18133
|
+
handleCurrentItems();
|
|
18134
|
+
}
|
|
18108
18135
|
}
|
|
18109
18136
|
updateCurrentChunk();
|
|
18110
18137
|
}, 350, {
|
|
@@ -18282,6 +18309,7 @@ function cascader_createInternalData() {
|
|
|
18282
18309
|
};
|
|
18283
18310
|
const setCurrentNode = node => {
|
|
18284
18311
|
reactData.currentNode = node;
|
|
18312
|
+
updateCurrentChunk();
|
|
18285
18313
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
18286
18314
|
};
|
|
18287
18315
|
const setAllCheckboxNode = checked => {
|
|
@@ -18330,6 +18358,7 @@ function cascader_createInternalData() {
|
|
|
18330
18358
|
};
|
|
18331
18359
|
const changeEvent = (evnt, selectValue, node) => {
|
|
18332
18360
|
const value = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(selectValue) ? selectValue.map(deNodeValue) : deNodeValue(selectValue);
|
|
18361
|
+
internalData.isUpdateMode = true;
|
|
18333
18362
|
emitModel(value);
|
|
18334
18363
|
if (value !== props.modelValue) {
|
|
18335
18364
|
dispatchEvent('change', {
|
|
@@ -18476,9 +18505,12 @@ function cascader_createInternalData() {
|
|
|
18476
18505
|
checked: isChecked
|
|
18477
18506
|
}, evnt);
|
|
18478
18507
|
};
|
|
18479
|
-
const changeRadioEvent = (evnt, node) => {
|
|
18508
|
+
const changeRadioEvent = (evnt, node, chunks, chunkIndex) => {
|
|
18480
18509
|
evnt.preventDefault();
|
|
18481
18510
|
evnt.stopPropagation();
|
|
18511
|
+
const {
|
|
18512
|
+
currentItems
|
|
18513
|
+
} = reactData;
|
|
18482
18514
|
const {
|
|
18483
18515
|
nodeMaps
|
|
18484
18516
|
} = internalData;
|
|
@@ -18508,6 +18540,10 @@ function cascader_createInternalData() {
|
|
|
18508
18540
|
const value = nodeid;
|
|
18509
18541
|
reactData.selectRadioKey = value;
|
|
18510
18542
|
changeEvent(evnt, value, node);
|
|
18543
|
+
if (!currentItems.includes(nodeid)) {
|
|
18544
|
+
changeCurrentEvent(evnt, node);
|
|
18545
|
+
toggleExpandEvent(evnt, node, chunks, chunkIndex);
|
|
18546
|
+
}
|
|
18511
18547
|
hideOptionPanel(evnt);
|
|
18512
18548
|
};
|
|
18513
18549
|
const handleAsyncTreeExpandChilds = node => {
|
|
@@ -18679,7 +18715,6 @@ function cascader_createInternalData() {
|
|
|
18679
18715
|
handleBaseTreeExpand([node], expanded);
|
|
18680
18716
|
}
|
|
18681
18717
|
setCurrentNode(node);
|
|
18682
|
-
updateCurrentChunk();
|
|
18683
18718
|
dispatchEvent('node-expand', {
|
|
18684
18719
|
node,
|
|
18685
18720
|
expanded
|
|
@@ -18793,9 +18828,13 @@ function cascader_createInternalData() {
|
|
|
18793
18828
|
reactData.updateCheckboxFlag++;
|
|
18794
18829
|
}
|
|
18795
18830
|
};
|
|
18796
|
-
const changeCheckboxEvent = (evnt, node) => {
|
|
18831
|
+
const changeCheckboxEvent = (evnt, node, chunks, chunkIndex) => {
|
|
18797
18832
|
evnt.preventDefault();
|
|
18798
18833
|
evnt.stopPropagation();
|
|
18834
|
+
// const { filterable } = props
|
|
18835
|
+
const {
|
|
18836
|
+
currentItems
|
|
18837
|
+
} = reactData;
|
|
18799
18838
|
const {
|
|
18800
18839
|
selectCheckboxMaps,
|
|
18801
18840
|
nodeMaps
|
|
@@ -18832,11 +18871,11 @@ function cascader_createInternalData() {
|
|
|
18832
18871
|
selectCheckboxMaps[nodeid] = node;
|
|
18833
18872
|
}
|
|
18834
18873
|
if (!checkStrictly) {
|
|
18835
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(
|
|
18874
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(childList, childNode => {
|
|
18836
18875
|
const childNodeid = getNodeId(childNode);
|
|
18837
18876
|
if (isChecked) {
|
|
18838
18877
|
if (!selectCheckboxMaps[childNodeid]) {
|
|
18839
|
-
selectCheckboxMaps[childNodeid] =
|
|
18878
|
+
selectCheckboxMaps[childNodeid] = childNode;
|
|
18840
18879
|
}
|
|
18841
18880
|
} else {
|
|
18842
18881
|
if (selectCheckboxMaps[childNodeid]) {
|
|
@@ -18847,11 +18886,16 @@ function cascader_createInternalData() {
|
|
|
18847
18886
|
children: transform ? mapChildrenField : childrenField
|
|
18848
18887
|
});
|
|
18849
18888
|
}
|
|
18889
|
+
selectCheckboxMaps[nodeid] = node;
|
|
18850
18890
|
reactData.updateCheckboxFlag++;
|
|
18851
18891
|
updateCheckboxStatus();
|
|
18852
18892
|
const nodeids = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().keys(selectCheckboxMaps);
|
|
18853
18893
|
const value = nodeids;
|
|
18854
18894
|
changeEvent(evnt, value, node);
|
|
18895
|
+
if (!currentItems.includes(nodeid)) {
|
|
18896
|
+
changeCurrentEvent(evnt, node);
|
|
18897
|
+
toggleExpandEvent(evnt, node, chunks, chunkIndex);
|
|
18898
|
+
}
|
|
18855
18899
|
};
|
|
18856
18900
|
const handleNodeClickEvent = (evnt, node, chunks, chunkIndex) => {
|
|
18857
18901
|
const {
|
|
@@ -18882,12 +18926,12 @@ function cascader_createInternalData() {
|
|
|
18882
18926
|
if (multiple) {
|
|
18883
18927
|
if (checkboxOpts.trigger === 'node' || !showCheckbox && (!childList || !childList.length)) {
|
|
18884
18928
|
triggerCheckbox = true;
|
|
18885
|
-
changeCheckboxEvent(evnt, node);
|
|
18929
|
+
changeCheckboxEvent(evnt, node, chunks, chunkIndex);
|
|
18886
18930
|
}
|
|
18887
18931
|
} else {
|
|
18888
18932
|
if (radioOpts.trigger === 'node' || !showRadio && (!childList || !childList.length)) {
|
|
18889
18933
|
triggerRadio = true;
|
|
18890
|
-
changeRadioEvent(evnt, node);
|
|
18934
|
+
changeRadioEvent(evnt, node, chunks, chunkIndex);
|
|
18891
18935
|
}
|
|
18892
18936
|
}
|
|
18893
18937
|
dispatchEvent('node-click', {
|
|
@@ -19033,7 +19077,7 @@ function cascader_createInternalData() {
|
|
|
19033
19077
|
}
|
|
19034
19078
|
return true;
|
|
19035
19079
|
};
|
|
19036
|
-
const renderRadio = (node, isExistChild, nLevel, isChecked) => {
|
|
19080
|
+
const renderRadio = (node, isExistChild, nLevel, isChecked, chunks, chunkIndex) => {
|
|
19037
19081
|
const {
|
|
19038
19082
|
showRadio
|
|
19039
19083
|
} = props;
|
|
@@ -19060,7 +19104,7 @@ function cascader_createInternalData() {
|
|
|
19060
19104
|
}],
|
|
19061
19105
|
onClick: evnt => {
|
|
19062
19106
|
if (!isDisabled) {
|
|
19063
|
-
changeRadioEvent(evnt, node);
|
|
19107
|
+
changeRadioEvent(evnt, node, chunks, chunkIndex);
|
|
19064
19108
|
}
|
|
19065
19109
|
}
|
|
19066
19110
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
@@ -19069,7 +19113,7 @@ function cascader_createInternalData() {
|
|
|
19069
19113
|
}
|
|
19070
19114
|
return renderEmptyElement($xeCascader);
|
|
19071
19115
|
};
|
|
19072
|
-
const renderCheckbox = (node, isExistChild, nLevel, isChecked, isIndeterminate) => {
|
|
19116
|
+
const renderCheckbox = (node, isExistChild, nLevel, isChecked, isIndeterminate, chunks, chunkIndex) => {
|
|
19073
19117
|
const {
|
|
19074
19118
|
showCheckbox
|
|
19075
19119
|
} = props;
|
|
@@ -19097,7 +19141,7 @@ function cascader_createInternalData() {
|
|
|
19097
19141
|
}],
|
|
19098
19142
|
onClick: evnt => {
|
|
19099
19143
|
if (!isDisabled) {
|
|
19100
|
-
changeCheckboxEvent(evnt, node);
|
|
19144
|
+
changeCheckboxEvent(evnt, node, chunks, chunkIndex);
|
|
19101
19145
|
}
|
|
19102
19146
|
}
|
|
19103
19147
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
@@ -19183,7 +19227,7 @@ function cascader_createInternalData() {
|
|
|
19183
19227
|
onClick(evnt) {
|
|
19184
19228
|
handleNodeClickEvent(evnt, node, chunks, chunkIndex);
|
|
19185
19229
|
}
|
|
19186
|
-
}, [multiple ? renderCheckbox(node, isExistChild, nLevel, isCheckboxChecked, isIndeterminate) : renderRadio(node, isExistChild, nLevel, isRadioChecked), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
19230
|
+
}, [multiple ? renderCheckbox(node, isExistChild, nLevel, isCheckboxChecked, isIndeterminate, chunks, chunkIndex) : renderRadio(node, isExistChild, nLevel, isRadioChecked, chunks, chunkIndex), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
19187
19231
|
class: 'vxe-cascader-chunk--node-item-inner'
|
|
19188
19232
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
19189
19233
|
class: 'vxe-cascader-chunk--node-item-title'
|
|
@@ -19354,9 +19398,12 @@ function cascader_createInternalData() {
|
|
|
19354
19398
|
})]) : renderEmptyElement($xeCascader)])]) : renderEmptyElement($xeCascader)])] : [])])]);
|
|
19355
19399
|
};
|
|
19356
19400
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, () => {
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
19401
|
+
if (!internalData.isUpdateMode) {
|
|
19402
|
+
updateModelChecked();
|
|
19403
|
+
handleCurrentItems();
|
|
19404
|
+
updateCurrentChunk();
|
|
19405
|
+
}
|
|
19406
|
+
internalData.isUpdateMode = false;
|
|
19360
19407
|
});
|
|
19361
19408
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.options, () => {
|
|
19362
19409
|
cacheNodeMap();
|
|
@@ -28877,6 +28924,9 @@ function date_range_picker_createInternalData() {
|
|
|
28877
28924
|
hidePanel();
|
|
28878
28925
|
};
|
|
28879
28926
|
const startPanelChangeEvent = params => {
|
|
28927
|
+
const {
|
|
28928
|
+
paneStartVal
|
|
28929
|
+
} = reactData;
|
|
28880
28930
|
const {
|
|
28881
28931
|
selectStatus
|
|
28882
28932
|
} = internalData;
|
|
@@ -28889,11 +28939,17 @@ function date_range_picker_createInternalData() {
|
|
|
28889
28939
|
let startValue = '';
|
|
28890
28940
|
let endValue = '';
|
|
28891
28941
|
if (selectStatus) {
|
|
28892
|
-
|
|
28893
|
-
if (
|
|
28894
|
-
|
|
28942
|
+
// 如果选择同一天
|
|
28943
|
+
if (!value && currValue === paneStartVal[0]) {
|
|
28944
|
+
startValue = currValue;
|
|
28945
|
+
endValue = currValue;
|
|
28895
28946
|
} else {
|
|
28896
|
-
|
|
28947
|
+
startValue = paneVals[0];
|
|
28948
|
+
if (paneVals[1]) {
|
|
28949
|
+
endValue = paneVals[1];
|
|
28950
|
+
} else {
|
|
28951
|
+
endValue = reactData.selectEdValue;
|
|
28952
|
+
}
|
|
28897
28953
|
}
|
|
28898
28954
|
} else {
|
|
28899
28955
|
startValue = currValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(paneVals);
|
|
@@ -28914,6 +28970,9 @@ function date_range_picker_createInternalData() {
|
|
|
28914
28970
|
});
|
|
28915
28971
|
};
|
|
28916
28972
|
const endPanelChangeEvent = params => {
|
|
28973
|
+
const {
|
|
28974
|
+
paneEndVal
|
|
28975
|
+
} = reactData;
|
|
28917
28976
|
const {
|
|
28918
28977
|
selectStatus
|
|
28919
28978
|
} = internalData;
|
|
@@ -28926,12 +28985,18 @@ function date_range_picker_createInternalData() {
|
|
|
28926
28985
|
let startValue = '';
|
|
28927
28986
|
let endValue = '';
|
|
28928
28987
|
if (selectStatus) {
|
|
28929
|
-
|
|
28930
|
-
if (
|
|
28931
|
-
startValue =
|
|
28932
|
-
endValue =
|
|
28988
|
+
// 如果选择同一天
|
|
28989
|
+
if (!value && currValue === paneEndVal[1]) {
|
|
28990
|
+
startValue = currValue;
|
|
28991
|
+
endValue = currValue;
|
|
28933
28992
|
} else {
|
|
28934
|
-
|
|
28993
|
+
endValue = paneVals[0];
|
|
28994
|
+
if (paneVals[1]) {
|
|
28995
|
+
startValue = paneVals[0];
|
|
28996
|
+
endValue = paneVals[1];
|
|
28997
|
+
} else {
|
|
28998
|
+
startValue = reactData.selectStValue;
|
|
28999
|
+
}
|
|
28935
29000
|
}
|
|
28936
29001
|
} else {
|
|
28937
29002
|
endValue = currValue || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().last(paneVals);
|
|
@@ -36139,6 +36204,23 @@ const {
|
|
|
36139
36204
|
getConfig: menu_getConfig,
|
|
36140
36205
|
getIcon: menu_getIcon
|
|
36141
36206
|
} = VxeUI;
|
|
36207
|
+
function menu_createInternalData() {
|
|
36208
|
+
return {
|
|
36209
|
+
menuEffectMaps: {}
|
|
36210
|
+
};
|
|
36211
|
+
}
|
|
36212
|
+
function menu_createReactData() {
|
|
36213
|
+
return {
|
|
36214
|
+
initialized: false,
|
|
36215
|
+
isEnterCollapse: false,
|
|
36216
|
+
collapseStyle: {},
|
|
36217
|
+
collapseZindex: 0,
|
|
36218
|
+
activeName: '',
|
|
36219
|
+
menuList: [],
|
|
36220
|
+
itemHeight: 1
|
|
36221
|
+
};
|
|
36222
|
+
}
|
|
36223
|
+
let nemuUniqueKey = 100000000;
|
|
36142
36224
|
/* harmony default export */ var menu = (defineVxeComponent({
|
|
36143
36225
|
name: 'VxeMenu',
|
|
36144
36226
|
props: {
|
|
@@ -36177,15 +36259,8 @@ const {
|
|
|
36177
36259
|
const {
|
|
36178
36260
|
computeSize
|
|
36179
36261
|
} = useSize(props);
|
|
36180
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(
|
|
36181
|
-
|
|
36182
|
-
isEnterCollapse: false,
|
|
36183
|
-
collapseStyle: {},
|
|
36184
|
-
collapseZindex: 0,
|
|
36185
|
-
activeName: props.modelValue,
|
|
36186
|
-
menuList: [],
|
|
36187
|
-
itemHeight: 1
|
|
36188
|
-
});
|
|
36262
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(menu_createReactData());
|
|
36263
|
+
const internalData = menu_createInternalData();
|
|
36189
36264
|
const refMaps = {
|
|
36190
36265
|
refElem
|
|
36191
36266
|
};
|
|
@@ -36268,6 +36343,7 @@ const {
|
|
|
36268
36343
|
...item,
|
|
36269
36344
|
parentKey: parent ? parent.name || path.slice(0, path.length - 1).join(',') : '',
|
|
36270
36345
|
level: path.length,
|
|
36346
|
+
itemId: ++nemuUniqueKey,
|
|
36271
36347
|
itemKey: item.name || path.join(','),
|
|
36272
36348
|
isExactActive: false,
|
|
36273
36349
|
isActive: false,
|
|
@@ -36337,12 +36413,21 @@ const {
|
|
|
36337
36413
|
accordion
|
|
36338
36414
|
} = props;
|
|
36339
36415
|
const {
|
|
36416
|
+
menuEffectMaps
|
|
36417
|
+
} = internalData;
|
|
36418
|
+
const {
|
|
36419
|
+
itemId,
|
|
36340
36420
|
hasChild,
|
|
36341
36421
|
isExpand
|
|
36342
36422
|
} = item;
|
|
36423
|
+
const isCollapsed = computeIsCollapsed.value;
|
|
36424
|
+
const expanded = !isExpand;
|
|
36343
36425
|
if (hasChild) {
|
|
36344
36426
|
evnt.stopPropagation();
|
|
36345
36427
|
evnt.preventDefault();
|
|
36428
|
+
if (menuEffectMaps[itemId]) {
|
|
36429
|
+
clearTimeout(menuEffectMaps[itemId]);
|
|
36430
|
+
}
|
|
36346
36431
|
if (accordion) {
|
|
36347
36432
|
itemList.forEach(obj => {
|
|
36348
36433
|
if (obj !== item) {
|
|
@@ -36350,7 +36435,32 @@ const {
|
|
|
36350
36435
|
}
|
|
36351
36436
|
});
|
|
36352
36437
|
}
|
|
36353
|
-
item.isExpand =
|
|
36438
|
+
item.isExpand = expanded;
|
|
36439
|
+
const wrapperEl = isCollapsed ? refCollapseElem.value : refElem.value;
|
|
36440
|
+
if (wrapperEl) {
|
|
36441
|
+
const nemuEl = wrapperEl.querySelector(`.vxe-menu--item-wrapper[data-menu-id="${itemId}"]`);
|
|
36442
|
+
const groupEl = nemuEl ? nemuEl.querySelector('.vxe-menu--item-group') : null;
|
|
36443
|
+
if (groupEl) {
|
|
36444
|
+
if (expanded) {
|
|
36445
|
+
groupEl.style.height = '0';
|
|
36446
|
+
groupEl.setAttribute('data-effect', 'y');
|
|
36447
|
+
requestAnimationFrame(() => {
|
|
36448
|
+
groupEl.style.height = `${groupEl.scrollHeight}px`;
|
|
36449
|
+
});
|
|
36450
|
+
} else {
|
|
36451
|
+
groupEl.style.height = `${groupEl.scrollHeight}px`;
|
|
36452
|
+
groupEl.setAttribute('data-effect', 'y');
|
|
36453
|
+
requestAnimationFrame(() => {
|
|
36454
|
+
groupEl.style.height = '0';
|
|
36455
|
+
});
|
|
36456
|
+
}
|
|
36457
|
+
menuEffectMaps[itemId] = setTimeout(() => {
|
|
36458
|
+
delete menuEffectMaps[itemId];
|
|
36459
|
+
groupEl.removeAttribute('data-effect');
|
|
36460
|
+
groupEl.style.height = '';
|
|
36461
|
+
}, 350);
|
|
36462
|
+
}
|
|
36463
|
+
}
|
|
36354
36464
|
}
|
|
36355
36465
|
};
|
|
36356
36466
|
const emitModel = value => {
|
|
@@ -36513,6 +36623,7 @@ const {
|
|
|
36513
36623
|
};
|
|
36514
36624
|
const renderDefaultChildren = (item, itemList) => {
|
|
36515
36625
|
const {
|
|
36626
|
+
itemId,
|
|
36516
36627
|
itemKey,
|
|
36517
36628
|
level,
|
|
36518
36629
|
hasChild,
|
|
@@ -36537,7 +36648,8 @@ const {
|
|
|
36537
36648
|
'is--exact-active': isExactActive,
|
|
36538
36649
|
'is--active': isActive,
|
|
36539
36650
|
'is--expand': (!isCollapsed || isEnterCollapse) && isExpand
|
|
36540
|
-
}]
|
|
36651
|
+
}],
|
|
36652
|
+
'data-menu-id': itemId
|
|
36541
36653
|
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
36542
36654
|
class: 'vxe-menu--item-link',
|
|
36543
36655
|
to: routerLink,
|
|
@@ -36563,6 +36675,7 @@ const {
|
|
|
36563
36675
|
};
|
|
36564
36676
|
const renderCollapseChildren = (item, itemList) => {
|
|
36565
36677
|
const {
|
|
36678
|
+
itemId,
|
|
36566
36679
|
itemKey,
|
|
36567
36680
|
level,
|
|
36568
36681
|
hasChild,
|
|
@@ -36581,7 +36694,8 @@ const {
|
|
|
36581
36694
|
class: ['vxe-menu--item-wrapper', `vxe-menu--item-level${level}`, {
|
|
36582
36695
|
'is--exact-active': isExactActive,
|
|
36583
36696
|
'is--active': isActive
|
|
36584
|
-
}]
|
|
36697
|
+
}],
|
|
36698
|
+
'data-menu-id': itemId
|
|
36585
36699
|
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
36586
36700
|
class: 'vxe-menu--item-link',
|
|
36587
36701
|
to: routerLink,
|
|
@@ -36688,7 +36802,6 @@ const {
|
|
|
36688
36802
|
updateCollapseStyle();
|
|
36689
36803
|
});
|
|
36690
36804
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
36691
|
-
globalEvents.off($xeMenu, 'resize');
|
|
36692
36805
|
const collapseEl = refCollapseElem.value;
|
|
36693
36806
|
if (collapseEl) {
|
|
36694
36807
|
const parentNode = collapseEl.parentNode;
|
|
@@ -36696,7 +36809,12 @@ const {
|
|
|
36696
36809
|
parentNode.removeChild(collapseEl);
|
|
36697
36810
|
}
|
|
36698
36811
|
}
|
|
36812
|
+
globalEvents.off($xeMenu, 'resize');
|
|
36813
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, menu_createReactData());
|
|
36814
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, menu_createInternalData());
|
|
36699
36815
|
});
|
|
36816
|
+
reactData.initialized = !!props.collapsed;
|
|
36817
|
+
reactData.activeName = props.modelValue;
|
|
36700
36818
|
updateMenuConfig();
|
|
36701
36819
|
updateActiveMenu(true);
|
|
36702
36820
|
$xeMenu.renderVN = renderVN;
|