sh-view 2.4.1 → 2.4.3
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 +1 -1
- package/packages/components/global-components/sh-pull-refresh/index.vue +1 -1
- package/packages/components/global-components/sh-table/components/sh-column.vue +1 -1
- package/packages/components/other-components/sh-menu/menu-group-content.vue +4 -5
- package/packages/components/other-components/sh-menu/menu-item-content.vue +1 -1
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script>
|
|
20
|
-
import { defineComponent, computed, onMounted, getCurrentInstance, ref, reactive, watch } from 'vue'
|
|
20
|
+
import { defineComponent, computed, onMounted, getCurrentInstance, ref, reactive, watch, nextTick } from 'vue'
|
|
21
21
|
export default defineComponent({
|
|
22
22
|
name: 'ShPullRefresh',
|
|
23
23
|
props: {
|
|
@@ -18,7 +18,7 @@ export default defineComponent({
|
|
|
18
18
|
})
|
|
19
19
|
const columnConfig = computed(() => {
|
|
20
20
|
let renderObj = { name: props.column.renderName, props: props.column.renderProps }
|
|
21
|
-
let config = Object.assign({}, shTable.columnObjConfig
|
|
21
|
+
let config = Object.assign({}, shTable.columnObjConfig, props.column)
|
|
22
22
|
if (props.column.readonly) {
|
|
23
23
|
config.cellRender = config.cellRender || renderObj
|
|
24
24
|
} else {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
|
-
import { defineComponent, computed, getCurrentInstance, ref, watch, onMounted, inject } from 'vue'
|
|
16
|
+
import { defineComponent, computed, getCurrentInstance, ref, watch, onMounted, inject, nextTick } from 'vue'
|
|
17
17
|
import menuItemContent from './menu-item-content.vue'
|
|
18
18
|
export default defineComponent({
|
|
19
19
|
name: 'MenuGroupContent',
|
|
@@ -49,7 +49,7 @@ export default defineComponent({
|
|
|
49
49
|
const groupClass = computed(() => {
|
|
50
50
|
return {
|
|
51
51
|
is__level: !props.menuLevel,
|
|
52
|
-
is__active: MenuInstance.activeNames.
|
|
52
|
+
is__active: MenuInstance.activeNames.includes(props.menuItem.name),
|
|
53
53
|
is__expand: expand.value
|
|
54
54
|
}
|
|
55
55
|
})
|
|
@@ -63,8 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
|
|
64
64
|
const setMenuExpand = () => {
|
|
65
65
|
const { mode, collapsed, openedNames } = MenuInstance
|
|
66
|
-
|
|
67
|
-
expand.value = names.includes(props.menuItem.name)
|
|
66
|
+
expand.value = openedNames.includes(props.menuItem.name)
|
|
68
67
|
if (expand.value && groupItemRef.value && ((mode === 'vertical' && collapsed) || mode === 'horizontal')) {
|
|
69
68
|
nextTick(() => {
|
|
70
69
|
const { offsetHeight, offsetWidth, itemRef } = groupItemRef.value
|
|
@@ -105,7 +104,7 @@ export default defineComponent({
|
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
watch(
|
|
108
|
-
() => MenuInstance.openedNames
|
|
107
|
+
() => MenuInstance.openedNames,
|
|
109
108
|
() => {
|
|
110
109
|
setMenuExpand()
|
|
111
110
|
}
|
|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
const itemClass = computed(() => {
|
|
42
42
|
return {
|
|
43
43
|
'sh-menu-item-level': !props.menuLevel,
|
|
44
|
-
'sh-menu-item-active': MenuInstance.activeName
|
|
44
|
+
'sh-menu-item-active': MenuInstance.activeName === props.menuItem.name
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
const itemStyle = computed(() => {
|