@idooel/components 0.0.1-beta.99 → 0.0.2

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.
Files changed (105) hide show
  1. package/README.md +98 -98
  2. package/dist/@idooel/components.esm.js +256 -159
  3. package/dist/@idooel/components.umd.js +256 -159
  4. package/jsconfig.json +7 -7
  5. package/package.json +50 -50
  6. package/packages/alert/index.js +4 -4
  7. package/packages/alert/src/index.vue +45 -45
  8. package/packages/batch-export/index.js +4 -4
  9. package/packages/batch-export/src/index.vue +104 -104
  10. package/packages/business-components/modal-fsm/index.js +4 -4
  11. package/packages/business-components/modal-fsm/src/index.vue +163 -163
  12. package/packages/business-components/modal-import/index.js +4 -4
  13. package/packages/business-components/modal-import/src/index.vue +139 -139
  14. package/packages/business-components/modal-timeline/index.js +4 -4
  15. package/packages/business-components/modal-timeline/src/index.vue +77 -77
  16. package/packages/business-components/tabs-sub-center/index.js +4 -4
  17. package/packages/business-components/tabs-sub-center/src/index.vue +116 -116
  18. package/packages/button/index.js +4 -4
  19. package/packages/button/src/index.vue +65 -65
  20. package/packages/checkbox/index.js +4 -4
  21. package/packages/checkbox/src/index.vue +52 -52
  22. package/packages/composite-components/button-group/index.js +4 -4
  23. package/packages/composite-components/button-group/src/index.vue +151 -151
  24. package/packages/composite-components/form-attachment/src/index.vue +14 -14
  25. package/packages/composite-components/form-img-crop/index.js +4 -4
  26. package/packages/composite-components/form-img-crop/src/index.vue +120 -111
  27. package/packages/composite-components/modal-confirm/index.js +4 -4
  28. package/packages/composite-components/modal-confirm/src/index.vue +103 -103
  29. package/packages/composite-components/modal-form/index.js +4 -4
  30. package/packages/composite-components/modal-form/src/index.vue +230 -223
  31. package/packages/composite-components/modal-img-crop/index.js +4 -4
  32. package/packages/composite-components/modal-img-crop/src/index.vue +298 -289
  33. package/packages/composite-components/modal-table/index.js +4 -4
  34. package/packages/composite-components/modal-table/src/index.vue +155 -155
  35. package/packages/composite-components/modal-tree/index.js +4 -4
  36. package/packages/composite-components/modal-tree/src/index.vue +75 -75
  37. package/packages/composite-components/search-area/index.js +4 -4
  38. package/packages/composite-components/search-area/src/index.vue +237 -237
  39. package/packages/composite-components/search-area/src/label.vue +35 -35
  40. package/packages/composite-components/select-entity-modal-table/index.js +4 -4
  41. package/packages/composite-components/select-entity-modal-table/src/index.vue +171 -168
  42. package/packages/date/index.js +4 -4
  43. package/packages/date/src/index.vue +112 -112
  44. package/packages/date-range/index.js +4 -4
  45. package/packages/date-range/src/index.vue +47 -47
  46. package/packages/form/index.js +4 -4
  47. package/packages/form/src/index.vue +318 -302
  48. package/packages/icon/index.js +4 -4
  49. package/packages/icon/src/index.vue +31 -31
  50. package/packages/index.js +153 -153
  51. package/packages/input/index.js +4 -4
  52. package/packages/input/src/index.vue +35 -35
  53. package/packages/input-number/index.js +4 -4
  54. package/packages/input-number/src/index.vue +23 -23
  55. package/packages/loading/index.js +4 -4
  56. package/packages/loading/src/index.vue +36 -36
  57. package/packages/modal/index.js +4 -4
  58. package/packages/modal/src/index.vue +184 -184
  59. package/packages/models/form-group-model/index.js +4 -4
  60. package/packages/models/form-group-model/src/index.vue +273 -273
  61. package/packages/models/form-model/index.js +4 -4
  62. package/packages/models/form-model/src/index.vue +232 -221
  63. package/packages/models/step-model/index.js +4 -4
  64. package/packages/models/step-model/src/index.vue +224 -224
  65. package/packages/models/tree-table-model/index.js +4 -4
  66. package/packages/models/tree-table-model/src/index.vue +689 -681
  67. package/packages/radio/index.js +4 -4
  68. package/packages/radio/src/index.vue +56 -56
  69. package/packages/select/index.js +4 -4
  70. package/packages/select/src/index.vue +105 -105
  71. package/packages/select-entity/index.js +4 -4
  72. package/packages/select-entity/src/index.vue +119 -119
  73. package/packages/table/index.js +4 -4
  74. package/packages/table/src/action.vue +172 -172
  75. package/packages/table/src/index.vue +289 -335
  76. package/packages/tabs/index.js +4 -4
  77. package/packages/tabs/src/index.vue +55 -55
  78. package/packages/text/index.js +4 -4
  79. package/packages/text/src/index.vue +47 -47
  80. package/packages/text-editor/index.js +4 -4
  81. package/packages/text-editor/src/index.vue +72 -72
  82. package/packages/textarea/index.js +4 -4
  83. package/packages/textarea/src/index.vue +57 -57
  84. package/packages/theme/form.scss +21 -21
  85. package/packages/theme/index.scss +42 -42
  86. package/packages/theme/overrid.scss +7 -7
  87. package/packages/theme/styleClass.scss +2 -2
  88. package/packages/theme/variables.scss +55 -55
  89. package/packages/timeline/index.js +4 -4
  90. package/packages/timeline/src/index.vue +257 -257
  91. package/packages/tpl/index.js +4 -4
  92. package/packages/tpl/src/index.vue +55 -55
  93. package/packages/tree/index.js +4 -4
  94. package/packages/tree/src/TreeNode.vue +29 -29
  95. package/packages/tree/src/index.vue +101 -101
  96. package/packages/tree-select/index.js +4 -4
  97. package/packages/tree-select/src/index.vue +142 -142
  98. package/packages/upload/index.js +4 -4
  99. package/packages/upload/src/index.vue +444 -444
  100. package/packages/utils/index.js +62 -62
  101. package/scripts/rollup.config.js +42 -42
  102. package/scripts/rollup.esm.config.js +11 -11
  103. package/scripts/rollup.umd.config.js +14 -14
  104. package/dist/@idooel/components.esm.js.map +0 -1
  105. package/dist/@idooel/components.umd.js.map +0 -1
@@ -1,336 +1,290 @@
1
- <template>
2
- <div class="g-table__wrapper" :style="{ height: `${height}px` }">
3
- <a-table
4
- :bordered="bordered"
5
- :class="[isNoData && 'g-table__no-data']"
6
- :style="{ height: noDataAntTableHeight }"
7
- :pagination="false"
8
- :loading="loading"
9
- :columns="innerColumns"
10
- :row-selection="rowSelection"
11
- :row-class-name="setRowClassName"
12
- :data-source="dataSource"
13
- :scroll="getScroll">
14
- <template slot="action" slot-scope="record">
15
- <Actions v-on="$listeners" :data-source="actions" :record="record"></Actions>
16
- </template>
17
- </a-table>
18
- <div class="g-table__pagination">
19
- <a-pagination
20
- :show-total="all => `共 ${all} 条数据`"
21
- show-size-changer
22
- show-quick-jumper
23
- :pageSize="innerPageSize"
24
- :current="innerCurrentPage"
25
- :pageSizeOptions="pageSizeOptions"
26
- @change="onChangePagination"
27
- @showSizeChange="onShowSizeChange"
28
- :total="total">
29
- </a-pagination>
30
- </div>
31
- </div>
32
- </template>
33
-
34
- <script>
35
- import Actions from './action.vue'
36
- export default {
37
- name: 'ele-table',
38
- components: {
39
- Actions
40
- },
41
- props: {
42
- // ant table wrapper
43
- height: {
44
- type: Number
45
- },
46
- width: {
47
- type: Number
48
- },
49
- x: {
50
- type: Number,
51
- default: 1200
52
- },
53
- y: {
54
- type: Number,
55
- default: 200
56
- },
57
- scroll: {
58
- type: Object
59
- },
60
- rowSelection: {
61
- type: Object
62
- },
63
- actions: {
64
- type: Array,
65
- default: () => []
66
- },
67
- total: {
68
- type: Number,
69
- default: 0
70
- },
71
- loading: {
72
- type: Boolean,
73
- default: false
74
- },
75
- columns: {
76
- type: Array,
77
- default: () => []
78
- },
79
- dataSource: {
80
- type: Array,
81
- default: () => []
82
- },
83
- pageSize: {
84
- type: Number,
85
- default: 10
86
- },
87
- pageSizeOptions: {
88
- type: Array,
89
- default: () => ['10', '20', '30', '40']
90
- },
91
- bordered: {
92
- type: Boolean,
93
- default: true
94
- }
95
- },
96
- data() {
97
- return {
98
- tableHeaderHeight: 0,
99
- paginationHeight: 0,
100
- innerPageSize: 10,
101
- innerCurrentPage: 1,
102
- tableContentHeight: 0,
103
- obs: [],
104
- tableTbodyHeight: 0
105
- }
106
- },
107
- computed: {
108
- innerColumns () {
109
- return this.columns.filter(col => !Object.keys(col).includes('multiple'))
110
- },
111
- isNoData () {
112
- return !this.dataSource.length
113
- },
114
- noDataAntTableHeight () {
115
- //TODO
116
- if (this.dataSource.length) {
117
- // return 'auto'
118
- return `${this.height - this.paginationHeight - 16}px`
119
- }
120
- return `${this.height - this.paginationHeight - 16}px`
121
- },
122
- getScrollHeightByHeight () {
123
- const height = this.height - this.tableHeaderHeight - this.paginationHeight
124
- if (this.tableTbodyHeight == 0) {
125
- //暂无数据
126
- document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'auto')
127
- } else if (this.tableTbodyHeight !== 0 && height > this.tableTbodyHeight) {
128
- document.querySelector('.ant-table-content') && (document.querySelector('.ant-table-content').style.height = 'inherit')
129
- document.querySelector('.ant-table-scroll') && (document.querySelector('.ant-table-scroll').style.height = 'inherit')
130
- document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'inherit')
131
- if (this.tableTbodyHeight > height) {
132
- document.querySelector('.ant-table-content').style.height = 'auto'
133
- document.querySelector('.ant-table-scroll').style.height = 'auto'
134
- document.querySelector('.ant-table-body').style.height = 'auto'
135
- }
136
- return 0
137
- // 0的时候没有y滚动条
138
- }
139
- return this.height - this.tableHeaderHeight - this.paginationHeight
140
- },
141
- isFlexColumn () {
142
- return this.columns.every(col => !col.width)
143
- },
144
- getScroll () {
145
- if (this.scroll) {
146
- return this.scroll
147
- } else {
148
- if (this.height) {
149
- return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.getScrollHeightByHeight }
150
- }
151
- return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.y }
152
- }
153
- }
154
- },
155
- watch: {
156
- pageSize: {
157
- handler (pageSize) {
158
- this.innerPageSize = pageSize
159
- },
160
- immediate: true
161
- }
162
- },
163
- methods: {
164
- onShowSizeChange (current, pageSize) {
165
- this.innerCurrentPage = current
166
- this.innerPageSize = pageSize
167
- this.$emit('change-page', current, pageSize)
168
- },
169
- setPaginationHeight () {
170
- this.$nextTick(() => {
171
- const { height } = document.querySelector('.g-table__pagination').getBoundingClientRect()
172
- this.paginationHeight = height
173
- })
174
- },
175
- setTableHeaderHeight () {
176
- this.$nextTick(() => {
177
- const el = document.querySelector('.ant-table-header')
178
- if (!el) return
179
- const { height } = el.getBoundingClientRect()
180
- this.tableHeaderHeight = height
181
- })
182
- },
183
- setTableTbodyHeight () {
184
- const el = document.querySelector('table .ant-table-tbody')
185
- const ob = new ResizeObserver((entries => {
186
- if (this.tableHeaderHeight) return
187
- for (const _ of entries) {
188
- requestAnimationFrame(() => {
189
- const { height } = el.getBoundingClientRect()
190
- this.tableTbodyHeight = height
191
- this.setTableHeaderHeight()
192
- })
193
- }
194
- }))
195
- ob.observe(el)
196
- this.obs.push(ob)
197
- },
198
- setRowClassName (record, idx) {
199
- return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'
200
- },
201
- onChangePagination (page, pageSize) {
202
- this.innerCurrentPage = page
203
- this.innerPageSize = pageSize
204
- this.$emit('change-page', page, pageSize)
205
- }
206
- },
207
- mounted() {
208
- this.setPaginationHeight()
209
- setTimeout(() => {
210
- this.setTableTbodyHeight()
211
- }, 100)
212
- },
213
- destroyed () {
214
- this.obs.forEach(ob => ob.disconnect())
215
- }
216
- }
217
- </script>
218
-
219
- <style lang="scss" scoped>
220
- .g-table__wrapper {
221
- ::v-deep .ant-spin-nested-loading {
222
- height: inherit;
223
- .ant-table-fixed-header {
224
- .ant-table-body-inner {
225
- overflow: hidden;
226
- }
227
- }
228
- .ant-spin-container {
229
- height: inherit;
230
- .ant-table {
231
- height: inherit;
232
- .ant-table-content {
233
- // height: inherit;
234
- // .ant-table-scroll {
235
- // height: inherit;
236
- // .ant-table-body {
237
- // height: inherit;
238
- // }
239
- // }
240
- }
241
- }
242
- }
243
- }
244
- ::v-deep .ant-table-wrapper {
245
- .ant-table {
246
- border-width: calc(var(--idooel-border-width) * 1px);
247
- border-style: solid;
248
- border-color: var(--idooel-border-color);
249
- }
250
- .ant-table-header {
251
- .ant-table-fixed {
252
- /* border-bottom: 2px solid #53a8ff !important; */
253
- }
254
- tr {
255
- th {
256
- border-bottom-width: calc(var(--idooel-border-width) * 1px);
257
- border-bottom-style: solid;
258
- border-bottom-color: var(--idooel-border-color);
259
- }
260
- }
261
- }
262
- .ant-table-tbody {
263
- tr {
264
- td {
265
- border-color: var(--idooel-column-border-color);
266
- border-width: calc(var(--idooel-column-border-width) * 1px);;
267
- border-style: solid;
268
- border-top: unset;
269
- border-left: unset;
270
- }
271
- }
272
- }
273
- .ant-table-body {
274
- // border-top-width: calc(var(--idooel-border-width) * 1px);
275
- // border-top-style: solid;
276
- // border-top-color: var(--idooel-border-color);
277
- }
278
- .ant-table-fixed-left {
279
- border-bottom-width: calc(var(--idooel-border-width) * 1px);
280
- border-bottom-style: solid;
281
- border-bottom-color: var(--idooel-border-color);
282
- .ant-table-header {
283
- /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */
284
- /* border-bottom-style: solid; */
285
- /* border-bottom-color: var(--idooel-border-color); */
286
- }
287
- .ant-table-body-inner {
288
- border-right-width: calc(var(--idooel-border-width) * 1px);
289
- border-right-style: solid;
290
- border-right-color: var(--idooel-border-color);
291
- }
292
- .ant-table-fixed {
293
- border-right-width: calc(var(--idooel-border-width) * 1px);
294
- border-right-color: var(--idooel-border-color);
295
- border-right-style: solid;
296
- }
297
- }
298
- .ant-table-fixed-right {
299
- .ant-table-header {
300
- /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */
301
- /* border-bottom-color: var(--idooel-border-color); */
302
- /* border-bottom-style: solid; */
303
- }
304
- // border-bottom-width: calc(var(--idooel-border-width) * 1px);
305
- // border-bottom-style: solid;
306
- // border-bottom-color: var(--idooel-border-color);
307
- .ant-table-fixed {
308
- border-left-width: calc(var(--idooel-border-width) * 1px);
309
- border-left-style: solid;
310
- border-left-color: var(--idooel-border-color);
311
- }
312
- }
313
- }
314
- padding: 16px;
315
- padding-top: unset;
316
- ::v-deep .g-table__row--even {
317
- background: var(--idooel-row-even-color);
318
- }
319
- .g-table__row--odd {
320
- background: var(--idooel-row-odd-color);
321
- }
322
- .g-table__pagination {
323
- display: flex;
324
- flex-direction: row;
325
- justify-content: end;
326
- border-width: calc(var(--idooel-border-width) * 1px);
327
- border-color: var(--idooel-border-color);
328
- border-style: solid;
329
- border-top: unset;
330
- padding-top: 8px;
331
- padding-bottom: 8px;
332
- position: relative;
333
- z-index: 999;
334
- }
335
- }
1
+ <template>
2
+ <div class="g-table__wrapper" :style="wrapperStyle" :class="{ 'g-table--no-scroll-y': !needScrollY }">
3
+ <a-table
4
+ :bordered="bordered"
5
+ :class="[isNoData && 'g-table__no-data']"
6
+ :pagination="false"
7
+ :loading="loading"
8
+ :columns="innerColumns"
9
+ :row-selection="rowSelection"
10
+ :row-class-name="setRowClassName"
11
+ :data-source="dataSource"
12
+ :scroll="getScroll">
13
+ <template slot="action" slot-scope="record">
14
+ <Actions v-on="$listeners" :data-source="actions" :record="record"></Actions>
15
+ </template>
16
+ </a-table>
17
+ <div class="g-table__pagination">
18
+ <a-pagination
19
+ :show-total="all => `共 ${all} 条数据`"
20
+ show-size-changer
21
+ show-quick-jumper
22
+ :pageSize="innerPageSize"
23
+ :current="innerCurrentPage"
24
+ :pageSizeOptions="pageSizeOptions"
25
+ @change="onChangePagination"
26
+ @showSizeChange="onShowSizeChange"
27
+ :total="total">
28
+ </a-pagination>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import Actions from './action.vue'
35
+ export default {
36
+ name: 'ele-table',
37
+ components: {
38
+ Actions
39
+ },
40
+ props: {
41
+ // ant table wrapper
42
+ height: {
43
+ type: Number
44
+ },
45
+ width: {
46
+ type: Number
47
+ },
48
+ x: {
49
+ type: Number,
50
+ default: 1200
51
+ },
52
+ y: {
53
+ type: Number,
54
+ default: 200
55
+ },
56
+ scroll: {
57
+ type: Object
58
+ },
59
+ rowSelection: {
60
+ type: Object
61
+ },
62
+ actions: {
63
+ type: Array,
64
+ default: () => []
65
+ },
66
+ total: {
67
+ type: Number,
68
+ default: 0
69
+ },
70
+ loading: {
71
+ type: Boolean,
72
+ default: false
73
+ },
74
+ columns: {
75
+ type: Array,
76
+ default: () => []
77
+ },
78
+ dataSource: {
79
+ type: Array,
80
+ default: () => []
81
+ },
82
+ pageSize: {
83
+ type: Number,
84
+ default: 10
85
+ },
86
+ pageSizeOptions: {
87
+ type: Array,
88
+ default: () => ['10', '20', '30', '40']
89
+ },
90
+ bordered: {
91
+ type: Boolean,
92
+ default: true
93
+ }
94
+ },
95
+ data() {
96
+ return {
97
+ tableHeaderHeight: 0,
98
+ paginationHeight: 0,
99
+ innerPageSize: 10,
100
+ innerCurrentPage: 1,
101
+ tableContentHeight: 0,
102
+ obs: []
103
+ }
104
+ },
105
+ computed: {
106
+ wrapperStyle () {
107
+ // 外层容器样式:确保分页始终可见,表格充满剩余空间
108
+ if (!this.height) return {}
109
+ return { height: `${this.height}px` }
110
+ },
111
+ needScrollY () {
112
+ // 判断是否需要 y 轴滚动:基于数据行数与可用高度预估
113
+ if (!this.height) return false
114
+
115
+ const availableHeight = this.getScrollHeightByHeight
116
+ if (availableHeight <= 0) return false
117
+
118
+ // 预估每行高度(包含边框),antd 默认约 54px
119
+ const estimatedRowHeight = 54
120
+ const estimatedTableHeight = this.dataSource.length * estimatedRowHeight
121
+
122
+ return estimatedTableHeight > availableHeight
123
+ },
124
+ innerColumns () {
125
+ return this.columns.filter(col => !Object.keys(col).includes('multiple'))
126
+ },
127
+ isNoData () {
128
+ return !this.dataSource.length
129
+ },
130
+ getScrollHeightByHeight () {
131
+ // 始终返回可用的剩余高度,让表格内容不足时也能占满容器
132
+ return this.height - this.tableHeaderHeight - this.paginationHeight
133
+ },
134
+ isFlexColumn () {
135
+ return this.columns.every(col => !col.width)
136
+ },
137
+ getScroll () {
138
+ if (this.scroll) {
139
+ return this.scroll
140
+ } else {
141
+ const baseX = this.isFlexColumn ? 0 : (this.width > this.x ? 0 : this.x)
142
+ if (this.height) {
143
+ // 计算表体可用高度
144
+ const availableHeight = this.tableHeaderHeight && this.paginationHeight
145
+ ? this.getScrollHeightByHeight
146
+ : this.height - 100 // 预估值,给表头和分页留空间
147
+
148
+ if (availableHeight > 50) { // 确保有足够的最小高度
149
+ console.log('Table scroll config:', { x: baseX, y: availableHeight, height: this.height, headerHeight: this.tableHeaderHeight, paginationHeight: this.paginationHeight })
150
+ return { x: baseX, y: availableHeight }
151
+ }
152
+ }
153
+ return { x: baseX }
154
+ }
155
+ }
156
+ },
157
+ watch: {
158
+ pageSize: {
159
+ handler (pageSize) {
160
+ this.innerPageSize = pageSize
161
+ },
162
+ immediate: true
163
+ }
164
+ },
165
+ methods: {
166
+ onShowSizeChange (current, pageSize) {
167
+ this.innerCurrentPage = current
168
+ this.innerPageSize = pageSize
169
+ this.$emit('change-page', current, pageSize)
170
+ },
171
+ setPaginationHeight () {
172
+ this.$nextTick(() => {
173
+ const { height } = document.querySelector('.g-table__pagination').getBoundingClientRect()
174
+ this.paginationHeight = height
175
+ })
176
+ },
177
+ setTableHeaderHeight () {
178
+ this.$nextTick(() => {
179
+ const el = document.querySelector('.ant-table-header')
180
+ if (!el) return
181
+ const { height } = el.getBoundingClientRect()
182
+ this.tableHeaderHeight = height
183
+ })
184
+ },
185
+ setTableTbodyHeight () {
186
+ // 简化:仅需要获取表头高度,不再依赖表体高度的动态监听
187
+ this.$nextTick(() => {
188
+ this.setTableHeaderHeight()
189
+ })
190
+ },
191
+ setRowClassName (record, idx) {
192
+ return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'
193
+ },
194
+ onChangePagination (page, pageSize) {
195
+ this.innerCurrentPage = page
196
+ this.innerPageSize = pageSize
197
+ this.$emit('change-page', page, pageSize)
198
+ }
199
+ },
200
+ mounted() {
201
+ this.$nextTick(() => {
202
+ this.setPaginationHeight()
203
+ setTimeout(() => {
204
+ this.setTableTbodyHeight()
205
+ // 再测一次分页高度,确保初次渲染完成后数值准确
206
+ this.setPaginationHeight()
207
+ }, 200)
208
+ })
209
+ },
210
+ destroyed () {
211
+ this.obs.forEach(ob => ob.disconnect())
212
+ }
213
+ }
214
+ </script>
215
+
216
+ <style lang="scss" scoped>
217
+ .g-table__wrapper {
218
+ /* 外层采用列布局,确保分页始终可见,表格充满剩余空间 */
219
+ display: flex;
220
+ flex-direction: column;
221
+ overflow: hidden;
222
+
223
+ /* 表格区域占满剩余空间,启用纵向滚动 */
224
+ ::v-deep .ant-table-wrapper {
225
+ flex: 1 1 auto;
226
+ min-height: 0;
227
+ display: flex;
228
+ flex-direction: column;
229
+ }
230
+
231
+ ::v-deep .ant-spin-nested-loading {
232
+ flex: 1 1 auto;
233
+ min-height: 0;
234
+ display: flex;
235
+ flex-direction: column;
236
+ }
237
+
238
+ ::v-deep .ant-spin-container {
239
+ flex: 1 1 auto;
240
+ min-height: 0;
241
+ display: flex;
242
+ flex-direction: column;
243
+ }
244
+
245
+ ::v-deep .ant-table {
246
+ flex: 1 1 auto;
247
+ min-height: 0;
248
+ display: flex;
249
+ flex-direction: column;
250
+ }
251
+
252
+ /* 确保表体能够正常纵向滚动 */
253
+ ::v-deep .ant-table-content {
254
+ flex: 1 1 auto;
255
+ min-height: 0;
256
+ overflow: hidden;
257
+ }
258
+
259
+ ::v-deep .ant-table-scroll {
260
+ height: 100%;
261
+ display: flex;
262
+ flex-direction: column;
263
+ }
264
+
265
+ ::v-deep .ant-table-header {
266
+ flex: 0 0 auto;
267
+ overflow: hidden;
268
+ }
269
+
270
+ ::v-deep .ant-table-body {
271
+ flex: 1 1 auto;
272
+ overflow: auto !important;
273
+ /* 确保滚动条稳定,避免列宽抖动 */
274
+ scrollbar-gutter: stable;
275
+ }
276
+
277
+ /* 分页区域固定在底部,不被挤出视口 */
278
+ .g-table__pagination {
279
+ flex: 0 0 auto;
280
+ display: flex;
281
+ flex-direction: row;
282
+ justify-content: end;
283
+ border-top: unset;
284
+ padding-top: 8px;
285
+ padding-bottom: 8px;
286
+ background: #fff;
287
+ z-index: 999;
288
+ }
289
+ }
336
290
  </style>
@@ -1,5 +1,5 @@
1
- import EleTabs from './src/index.vue'
2
-
3
- EleTabs.install = Vue => Vue.component(EleTabs.name, EleTabs)
4
-
1
+ import EleTabs from './src/index.vue'
2
+
3
+ EleTabs.install = Vue => Vue.component(EleTabs.name, EleTabs)
4
+
5
5
  export default EleTabs