vxe-pc-ui 4.16.6 → 4.16.7
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 +144 -97
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/menu/src/menu.js +64 -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-menu/style.css +15 -8
- package/es/vxe-menu/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +69 -17
- package/lib/index.umd.min.js +1 -1
- package/lib/menu/src/menu.js +65 -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-menu/style/style.css +15 -8
- package/lib/vxe-menu/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/menu/src/menu.ts +70 -17
- package/packages/ui/index.ts +2 -2
- package/styles/components/menu.scss +9 -5
- package/types/components/menu.d.ts +6 -0
- /package/es/icon/{iconfont.1783838735018.ttf → iconfont.1783873713408.ttf} +0 -0
- /package/es/icon/{iconfont.1783838735018.woff → iconfont.1783873713408.woff} +0 -0
- /package/es/icon/{iconfont.1783838735018.woff2 → iconfont.1783873713408.woff2} +0 -0
- /package/es/{iconfont.1783838735018.ttf → iconfont.1783873713408.ttf} +0 -0
- /package/es/{iconfont.1783838735018.woff → iconfont.1783873713408.woff} +0 -0
- /package/es/{iconfont.1783838735018.woff2 → iconfont.1783873713408.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.ttf → iconfont.1783873713408.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.woff → iconfont.1783873713408.woff} +0 -0
- /package/lib/icon/style/{iconfont.1783838735018.woff2 → iconfont.1783873713408.woff2} +0 -0
- /package/lib/{iconfont.1783838735018.ttf → iconfont.1783873713408.ttf} +0 -0
- /package/lib/{iconfont.1783838735018.woff → iconfont.1783873713408.woff} +0 -0
- /package/lib/{iconfont.1783838735018.woff2 → iconfont.1783873713408.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.7"}`;
|
|
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.7";
|
|
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',
|
|
@@ -36139,6 +36139,23 @@ const {
|
|
|
36139
36139
|
getConfig: menu_getConfig,
|
|
36140
36140
|
getIcon: menu_getIcon
|
|
36141
36141
|
} = VxeUI;
|
|
36142
|
+
function menu_createInternalData() {
|
|
36143
|
+
return {
|
|
36144
|
+
menuEffectMaps: {}
|
|
36145
|
+
};
|
|
36146
|
+
}
|
|
36147
|
+
function menu_createReactData() {
|
|
36148
|
+
return {
|
|
36149
|
+
initialized: false,
|
|
36150
|
+
isEnterCollapse: false,
|
|
36151
|
+
collapseStyle: {},
|
|
36152
|
+
collapseZindex: 0,
|
|
36153
|
+
activeName: '',
|
|
36154
|
+
menuList: [],
|
|
36155
|
+
itemHeight: 1
|
|
36156
|
+
};
|
|
36157
|
+
}
|
|
36158
|
+
let nemuUniqueKey = 100000000;
|
|
36142
36159
|
/* harmony default export */ var menu = (defineVxeComponent({
|
|
36143
36160
|
name: 'VxeMenu',
|
|
36144
36161
|
props: {
|
|
@@ -36177,15 +36194,8 @@ const {
|
|
|
36177
36194
|
const {
|
|
36178
36195
|
computeSize
|
|
36179
36196
|
} = 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
|
-
});
|
|
36197
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(menu_createReactData());
|
|
36198
|
+
const internalData = menu_createInternalData();
|
|
36189
36199
|
const refMaps = {
|
|
36190
36200
|
refElem
|
|
36191
36201
|
};
|
|
@@ -36268,6 +36278,7 @@ const {
|
|
|
36268
36278
|
...item,
|
|
36269
36279
|
parentKey: parent ? parent.name || path.slice(0, path.length - 1).join(',') : '',
|
|
36270
36280
|
level: path.length,
|
|
36281
|
+
itemId: ++nemuUniqueKey,
|
|
36271
36282
|
itemKey: item.name || path.join(','),
|
|
36272
36283
|
isExactActive: false,
|
|
36273
36284
|
isActive: false,
|
|
@@ -36337,12 +36348,20 @@ const {
|
|
|
36337
36348
|
accordion
|
|
36338
36349
|
} = props;
|
|
36339
36350
|
const {
|
|
36351
|
+
menuEffectMaps
|
|
36352
|
+
} = internalData;
|
|
36353
|
+
const {
|
|
36354
|
+
itemId,
|
|
36340
36355
|
hasChild,
|
|
36341
36356
|
isExpand
|
|
36342
36357
|
} = item;
|
|
36358
|
+
const expanded = !isExpand;
|
|
36343
36359
|
if (hasChild) {
|
|
36344
36360
|
evnt.stopPropagation();
|
|
36345
36361
|
evnt.preventDefault();
|
|
36362
|
+
if (menuEffectMaps[itemId]) {
|
|
36363
|
+
clearTimeout(menuEffectMaps[itemId]);
|
|
36364
|
+
}
|
|
36346
36365
|
if (accordion) {
|
|
36347
36366
|
itemList.forEach(obj => {
|
|
36348
36367
|
if (obj !== item) {
|
|
@@ -36350,7 +36369,32 @@ const {
|
|
|
36350
36369
|
}
|
|
36351
36370
|
});
|
|
36352
36371
|
}
|
|
36353
|
-
item.isExpand =
|
|
36372
|
+
item.isExpand = expanded;
|
|
36373
|
+
const el = refElem.value;
|
|
36374
|
+
if (el) {
|
|
36375
|
+
const nemuEl = el.querySelector(`.vxe-menu--item-wrapper[data-menu-id="${itemId}"]`);
|
|
36376
|
+
const groupEl = nemuEl ? nemuEl.querySelector('.vxe-menu--item-group') : null;
|
|
36377
|
+
if (groupEl) {
|
|
36378
|
+
if (expanded) {
|
|
36379
|
+
groupEl.style.height = '0';
|
|
36380
|
+
groupEl.setAttribute('data-effect', 'y');
|
|
36381
|
+
requestAnimationFrame(() => {
|
|
36382
|
+
groupEl.style.height = `${groupEl.scrollHeight}px`;
|
|
36383
|
+
});
|
|
36384
|
+
} else {
|
|
36385
|
+
groupEl.style.height = `${groupEl.scrollHeight}px`;
|
|
36386
|
+
groupEl.setAttribute('data-effect', 'y');
|
|
36387
|
+
requestAnimationFrame(() => {
|
|
36388
|
+
groupEl.style.height = '0';
|
|
36389
|
+
});
|
|
36390
|
+
}
|
|
36391
|
+
menuEffectMaps[itemId] = setTimeout(() => {
|
|
36392
|
+
delete menuEffectMaps[itemId];
|
|
36393
|
+
groupEl.removeAttribute('data-effect');
|
|
36394
|
+
groupEl.style.height = '';
|
|
36395
|
+
}, 350);
|
|
36396
|
+
}
|
|
36397
|
+
}
|
|
36354
36398
|
}
|
|
36355
36399
|
};
|
|
36356
36400
|
const emitModel = value => {
|
|
@@ -36513,6 +36557,7 @@ const {
|
|
|
36513
36557
|
};
|
|
36514
36558
|
const renderDefaultChildren = (item, itemList) => {
|
|
36515
36559
|
const {
|
|
36560
|
+
itemId,
|
|
36516
36561
|
itemKey,
|
|
36517
36562
|
level,
|
|
36518
36563
|
hasChild,
|
|
@@ -36537,7 +36582,8 @@ const {
|
|
|
36537
36582
|
'is--exact-active': isExactActive,
|
|
36538
36583
|
'is--active': isActive,
|
|
36539
36584
|
'is--expand': (!isCollapsed || isEnterCollapse) && isExpand
|
|
36540
|
-
}]
|
|
36585
|
+
}],
|
|
36586
|
+
'data-menu-id': itemId
|
|
36541
36587
|
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
36542
36588
|
class: 'vxe-menu--item-link',
|
|
36543
36589
|
to: routerLink,
|
|
@@ -36563,6 +36609,7 @@ const {
|
|
|
36563
36609
|
};
|
|
36564
36610
|
const renderCollapseChildren = (item, itemList) => {
|
|
36565
36611
|
const {
|
|
36612
|
+
itemId,
|
|
36566
36613
|
itemKey,
|
|
36567
36614
|
level,
|
|
36568
36615
|
hasChild,
|
|
@@ -36581,7 +36628,8 @@ const {
|
|
|
36581
36628
|
class: ['vxe-menu--item-wrapper', `vxe-menu--item-level${level}`, {
|
|
36582
36629
|
'is--exact-active': isExactActive,
|
|
36583
36630
|
'is--active': isActive
|
|
36584
|
-
}]
|
|
36631
|
+
}],
|
|
36632
|
+
'data-menu-id': itemId
|
|
36585
36633
|
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
36586
36634
|
class: 'vxe-menu--item-link',
|
|
36587
36635
|
to: routerLink,
|
|
@@ -36688,7 +36736,6 @@ const {
|
|
|
36688
36736
|
updateCollapseStyle();
|
|
36689
36737
|
});
|
|
36690
36738
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
36691
|
-
globalEvents.off($xeMenu, 'resize');
|
|
36692
36739
|
const collapseEl = refCollapseElem.value;
|
|
36693
36740
|
if (collapseEl) {
|
|
36694
36741
|
const parentNode = collapseEl.parentNode;
|
|
@@ -36696,7 +36743,12 @@ const {
|
|
|
36696
36743
|
parentNode.removeChild(collapseEl);
|
|
36697
36744
|
}
|
|
36698
36745
|
}
|
|
36746
|
+
globalEvents.off($xeMenu, 'resize');
|
|
36747
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, menu_createReactData());
|
|
36748
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, menu_createInternalData());
|
|
36699
36749
|
});
|
|
36750
|
+
reactData.initialized = !!props.collapsed;
|
|
36751
|
+
reactData.activeName = props.modelValue;
|
|
36700
36752
|
updateMenuConfig();
|
|
36701
36753
|
updateActiveMenu(true);
|
|
36702
36754
|
$xeMenu.renderVN = renderVN;
|