vue2-client 1.15.35 → 1.15.36
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
@@ -569,6 +569,17 @@ export default {
|
|
569
569
|
},
|
570
570
|
mounted () {
|
571
571
|
window.addEventListener('resize', this.handleResize)
|
572
|
+
// 监听 DOM 变化,更实时地响应布局变化
|
573
|
+
this.resizeObserver = new ResizeObserver(() => {
|
574
|
+
this.handleResize()
|
575
|
+
})
|
576
|
+
if (this.$refs.table) {
|
577
|
+
this.resizeObserver.observe(this.$refs.table)
|
578
|
+
}
|
579
|
+
// 监听父容器变化
|
580
|
+
if (this.$el && this.$el.parentElement) {
|
581
|
+
this.resizeObserver.observe(this.$el.parentElement)
|
582
|
+
}
|
572
583
|
// 初始化时如果有外部选中值,等待 table 准备好后设置
|
573
584
|
if (this.externalSelectedRowKeys && this.externalSelectedRowKeys.length > 0) {
|
574
585
|
this.$nextTick(() => {
|
@@ -582,6 +593,9 @@ export default {
|
|
582
593
|
clearInterval(this.queryTimer)
|
583
594
|
}
|
584
595
|
window.removeEventListener('resize', this.handleResize)
|
596
|
+
if (this.resizeObserver) {
|
597
|
+
this.resizeObserver.disconnect()
|
598
|
+
}
|
585
599
|
},
|
586
600
|
methods: {
|
587
601
|
showTempData () {
|
@@ -691,9 +705,7 @@ export default {
|
|
691
705
|
this.$forceUpdate()
|
692
706
|
},
|
693
707
|
handleResize () {
|
694
|
-
|
695
|
-
this.setScrollYHeight({})
|
696
|
-
}, 100)()
|
708
|
+
this.setScrollYHeight({})
|
697
709
|
},
|
698
710
|
isInAModal () {
|
699
711
|
let parent = this.$parent
|
@@ -1130,7 +1142,7 @@ export default {
|
|
1130
1142
|
},
|
1131
1143
|
setScrollYHeight ({ extraHeight = this.extraHeight, id = this.uniqueId, type = '' }) {
|
1132
1144
|
this.$nextTick(() => {
|
1133
|
-
|
1145
|
+
debounce(() => {
|
1134
1146
|
const curDocument = window?.rawDocument || document
|
1135
1147
|
const innerHeight = window?.rawWindow?.innerHeight || window.innerHeight || 0
|
1136
1148
|
if (typeof extraHeight == 'undefined') {
|
@@ -1146,7 +1158,8 @@ export default {
|
|
1146
1158
|
// 表格内容距离顶部的距离
|
1147
1159
|
let tHeaderBottom = 0
|
1148
1160
|
if (tHeader) {
|
1149
|
-
|
1161
|
+
// 8px是分页器marginTop
|
1162
|
+
tHeaderBottom = tHeader.getBoundingClientRect().bottom + 8
|
1150
1163
|
}
|
1151
1164
|
if (tHeaderBottom === 0) {
|
1152
1165
|
this.scrollYHeight = 'calc(100vh - 31rem)'
|
@@ -1177,7 +1190,7 @@ export default {
|
|
1177
1190
|
// 窗体高度-表格内容顶部的高度-表格内容底部的高度
|
1178
1191
|
// this.scrollYHeight = document.body.clientHeight - tHeaderBottom - extraHeight
|
1179
1192
|
this.scrollYHeight = `calc(100vh - ${tHeaderBottom + extraHeight}px)`
|
1180
|
-
},
|
1193
|
+
}, 100)()
|
1181
1194
|
})
|
1182
1195
|
},
|
1183
1196
|
/**
|
@@ -145,6 +145,7 @@ export default {
|
|
145
145
|
}
|
146
146
|
}
|
147
147
|
.admin-layout-main{
|
148
|
+
height: 100%;
|
148
149
|
.admin-header{
|
149
150
|
top: 0;
|
150
151
|
right: 0;
|
@@ -157,8 +158,9 @@ export default {
|
|
157
158
|
}
|
158
159
|
.admin-layout-content{
|
159
160
|
padding: 24px;
|
160
|
-
|
161
|
-
|
161
|
+
display: flex;
|
162
|
+
flex-direction: column;
|
163
|
+
min-height: auto;
|
162
164
|
}
|
163
165
|
.setting{
|
164
166
|
background-color: @primary-color;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div id="TabsView">
|
3
|
-
<admin-layout>
|
3
|
+
<admin-layout style="height: 100%;">
|
4
4
|
<contextmenu :itemList="menuItemList" :visible.sync="menuVisible" @select="onMenuSelect" />
|
5
5
|
<tabs-head
|
6
6
|
v-if="multiPage"
|
@@ -365,6 +365,7 @@ export default {
|
|
365
365
|
|
366
366
|
<style lang="less">
|
367
367
|
#TabsView {
|
368
|
+
height: 100%;
|
368
369
|
.tabs-view {
|
369
370
|
margin: -16px auto 8px;
|
370
371
|
&.head.fixed {
|
@@ -377,13 +378,6 @@ export default {
|
|
377
378
|
width: 100%;
|
378
379
|
margin: 0 auto;
|
379
380
|
}
|
380
|
-
> div > div > .ant-card:first-of-type > .ant-card-body {
|
381
|
-
max-height: calc(100vh - 64px - 48px - 24px);
|
382
|
-
overflow-y: auto;
|
383
|
-
&::-webkit-scrollbar {
|
384
|
-
display: none;
|
385
|
-
}
|
386
|
-
}
|
387
381
|
}
|
388
382
|
}
|
389
383
|
</style>
|
@@ -54,14 +54,13 @@ routerResource.example = {
|
|
54
54
|
path: 'example',
|
55
55
|
name: '示例主页面',
|
56
56
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
|
57
|
-
component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo3.vue'),
|
58
57
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
59
58
|
// component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
|
60
59
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
61
60
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
62
61
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
63
62
|
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
64
|
-
|
63
|
+
component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
65
64
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
66
65
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
67
66
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.vue'),
|