sh-view 2.4.9 → 2.4.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.11",
|
|
4
4
|
"description": "基于vxe-table二次封装",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"jszip": "^3.10.1",
|
|
30
30
|
"popper.js": "^1.16.1",
|
|
31
31
|
"resize-observer-polyfill": "^1.5.1",
|
|
32
|
-
"sh-tools": "^
|
|
32
|
+
"sh-tools": "^2.0.0",
|
|
33
33
|
"tinymce": "^5.10.5",
|
|
34
34
|
"vue": "^3.3.4",
|
|
35
35
|
"vue-masonry": "^0.16.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="showChildren(menuItem)" class="sh-menu-group" :class="groupClass">
|
|
3
3
|
<menuItemContent ref="groupItemRef" :menu-item="menuItem" :menu-level="menuLevel" :arrow="isArrow" @click="onMenuExpand(!expand)" />
|
|
4
|
-
<div v-show="expand" ref="
|
|
4
|
+
<div v-show="expand" ref="groupListRef" class="sh-menu-group-list" :class="groupListClass" :style="groupListStyle">
|
|
5
5
|
<template v-for="(item, index) in menuItem.children" :key="`sh-menu-${menuLevel}-${index}`">
|
|
6
6
|
<menuGroupContent :menu-item="item" :menu-level="menuNextLevel" />
|
|
7
7
|
</template>
|
|
@@ -39,6 +39,7 @@ export default defineComponent({
|
|
|
39
39
|
const MenuInstance = inject('MenuInstance')
|
|
40
40
|
|
|
41
41
|
const groupItemRef = ref()
|
|
42
|
+
const groupListRef = ref()
|
|
42
43
|
const expand = ref(false)
|
|
43
44
|
const groupListStyle = ref({})
|
|
44
45
|
|
|
@@ -66,7 +67,8 @@ export default defineComponent({
|
|
|
66
67
|
expand.value = MenuInstance.openedNames.includes(props.menuItem.name)
|
|
67
68
|
if (expand.value && groupItemRef.value && ((mode === 'vertical' && collapsed) || mode === 'horizontal')) {
|
|
68
69
|
nextTick(() => {
|
|
69
|
-
const { offsetHeight, offsetWidth
|
|
70
|
+
const { offsetHeight, offsetWidth } = groupListRef.value
|
|
71
|
+
const { itemRef } = groupItemRef.value
|
|
70
72
|
const { left, right, top, bottom } = itemRef.getBoundingClientRect()
|
|
71
73
|
const winWidth = window.innerWidth
|
|
72
74
|
const winHeight = window.innerHeight
|
|
@@ -116,6 +118,7 @@ export default defineComponent({
|
|
|
116
118
|
|
|
117
119
|
return {
|
|
118
120
|
groupItemRef,
|
|
121
|
+
groupListRef,
|
|
119
122
|
groupClass,
|
|
120
123
|
groupListClass,
|
|
121
124
|
groupListStyle,
|