@idooel/components 0.0.2-beta.2 → 0.0.2-beta.21

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