@lx-frontend/wrap-element-ui 1.0.1-beta.6 → 1.0.1-beta.7
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/src/components/EditableTable/bizHooks/index.ts +17 -0
- package/src/components/EditableTable/{useColumnHeaderOperation.ts → bizHooks/useColumnHeaderOperation.ts} +6 -6
- package/src/components/EditableTable/{useDefaultOperation.ts → bizHooks/useDefaultOperation.ts} +1 -1
- package/src/components/EditableTable/{useDragSort.ts → bizHooks/useDragSort.ts} +1 -1
- package/src/components/EditableTable/{usePagination.ts → bizHooks/usePagination.ts} +1 -1
- package/src/components/EditableTable/{useRowBgColor.ts → bizHooks/useRowBgColor.ts} +7 -7
- package/src/components/EditableTable/{useViewSetting.ts → bizHooks/useViewSetting.ts} +64 -65
- package/src/components/EditableTable/{viewColorSelect.vue → features/bizColorSelect.vue} +3 -3
- package/src/components/EditableTable/features/bizEditCell.vue +44 -0
- package/src/components/EditableTable/features/bizTableHeaderPopover.vue +202 -0
- package/src/components/EditableTable/features/bizViewSettingDialog.vue +137 -0
- package/src/components/EditableTable/index.less +13 -4
- package/src/components/EditableTable/index.vue +76 -331
- package/src/components/EditableTable/{types.ts → types/index.ts} +116 -116
- /package/src/components/EditableTable/{useCellHover.ts → bizHooks/useCellHover.ts} +0 -0
|
@@ -16,93 +16,17 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<!-- <div class="view-setting__content-left-title">
|
|
31
|
-
表头设置
|
|
32
|
-
</div> -->
|
|
33
|
-
<div class="view-setting__checkbox-wrapper">
|
|
34
|
-
<el-checkbox-group v-model="columnsToBeShown">
|
|
35
|
-
<el-checkbox
|
|
36
|
-
v-for="item in columnConfig"
|
|
37
|
-
:key="item.label"
|
|
38
|
-
:label="item.prop"
|
|
39
|
-
:disabled="item.isAlwaysShow"
|
|
40
|
-
>
|
|
41
|
-
<div class="view-setting__content-left-item">
|
|
42
|
-
{{ item.label }}
|
|
43
|
-
</div>
|
|
44
|
-
</el-checkbox>
|
|
45
|
-
</el-checkbox-group>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
<div class="view-setting__content-right">
|
|
49
|
-
<div class="view-setting__content-right-title">
|
|
50
|
-
已选择
|
|
51
|
-
<div class="view-setting__selected-count">
|
|
52
|
-
{{ columnsToBeShown.length }}
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
<div class="view-setting__content-right-frize">
|
|
56
|
-
冻结前
|
|
57
|
-
<el-input
|
|
58
|
-
class="view-setting__content-right-input"
|
|
59
|
-
:value="tempLeftFixedColumnCount"
|
|
60
|
-
@input="handleInputTempLeftFixedColumnCount"
|
|
61
|
-
/>
|
|
62
|
-
列
|
|
63
|
-
</div>
|
|
64
|
-
<div class="view-setting__content-right-selected">
|
|
65
|
-
<div
|
|
66
|
-
v-for="(item, index) in viewSettingDragSortOptions"
|
|
67
|
-
:key="item.prop"
|
|
68
|
-
class="view-setting__selected-item view-setting-draggable-item"
|
|
69
|
-
>
|
|
70
|
-
<div class="view-setting__selected-item-left">
|
|
71
|
-
<div
|
|
72
|
-
class="view-setting-drag-target view-setting__icon-wrapper"
|
|
73
|
-
:data-index="index"
|
|
74
|
-
>
|
|
75
|
-
<div
|
|
76
|
-
class="view-setting-drag-target editable-table-drag-icon"
|
|
77
|
-
:data-index="index"
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="view-setting__selected-item-name">
|
|
81
|
-
{{ item.label }}
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
<div
|
|
85
|
-
:class="['view-setting__selected-item-close', item.isAlwaysShow ? 'view-setting__selected-item-close--disabled' : '']"
|
|
86
|
-
@click="handleColumnClose(item)"
|
|
87
|
-
>
|
|
88
|
-
<i class="el-icon-close" />
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
<template #footer>
|
|
95
|
-
<el-button @click="handleViewSettingClose">
|
|
96
|
-
取消
|
|
97
|
-
</el-button>
|
|
98
|
-
<el-button
|
|
99
|
-
type="primary"
|
|
100
|
-
@click="handleViewSettingConfirm"
|
|
101
|
-
>
|
|
102
|
-
确认
|
|
103
|
-
</el-button>
|
|
104
|
-
</template>
|
|
105
|
-
</el-dialog>
|
|
19
|
+
<biz-view-setting-dialog
|
|
20
|
+
ref="bizViewSettingDialogRef"
|
|
21
|
+
:props="props"
|
|
22
|
+
:actual-columns="actualColumns"
|
|
23
|
+
:showing-columns="showingColumns"
|
|
24
|
+
:view-setting-drag-sort-options="viewSettingDragSortOptions"
|
|
25
|
+
@update:leftFixedColumnCount="(val) => { leftFixedColumnCount = val }"
|
|
26
|
+
@update:showingColumns="(val) => { showingColumns = val }"
|
|
27
|
+
@update:viewSettingDragSortOptions="(val) => { viewSettingDragSortOptions = val }"
|
|
28
|
+
@tableDoLayout="doTableLayout"
|
|
29
|
+
/>
|
|
106
30
|
</div>
|
|
107
31
|
|
|
108
32
|
<!-- 列表展示,属性透传,列编辑 -->
|
|
@@ -125,7 +49,7 @@
|
|
|
125
49
|
v-if="rowDragAble"
|
|
126
50
|
width="30px"
|
|
127
51
|
class-name="editable-table__drag-cell no-inner-cell-border"
|
|
128
|
-
:fixed="leftFixedColumnCount > 0 ? 'left' :
|
|
52
|
+
:fixed="leftFixedColumnCount > 0 ? 'left' : false"
|
|
129
53
|
>
|
|
130
54
|
<template #default="scope">
|
|
131
55
|
<div
|
|
@@ -145,7 +69,7 @@
|
|
|
145
69
|
v-if="hasExpandRow"
|
|
146
70
|
width="30px"
|
|
147
71
|
type="expand"
|
|
148
|
-
:fixed="leftFixedColumnCount > 0 ? 'left' :
|
|
72
|
+
:fixed="leftFixedColumnCount > 0 ? 'left' : false"
|
|
149
73
|
class-name="no-inner-cell-border"
|
|
150
74
|
>
|
|
151
75
|
<template #default="scope">
|
|
@@ -161,7 +85,7 @@
|
|
|
161
85
|
width="45px"
|
|
162
86
|
align="center"
|
|
163
87
|
type="selection"
|
|
164
|
-
:fixed="leftFixedColumnCount > 0 ? 'left' :
|
|
88
|
+
:fixed="leftFixedColumnCount > 0 ? 'left' : false"
|
|
165
89
|
class-name="no-inner-cell-border"
|
|
166
90
|
/>
|
|
167
91
|
<!-- 编号列 -->
|
|
@@ -169,7 +93,7 @@
|
|
|
169
93
|
v-if="hasIndexColumn"
|
|
170
94
|
min-width="30px"
|
|
171
95
|
type="index"
|
|
172
|
-
:fixed="leftFixedColumnCount > 0 ? 'left' :
|
|
96
|
+
:fixed="leftFixedColumnCount > 0 ? 'left' : false"
|
|
173
97
|
class-name="no-inner-cell-border"
|
|
174
98
|
/>
|
|
175
99
|
<!-- 颜色选择列 -->
|
|
@@ -177,13 +101,13 @@
|
|
|
177
101
|
v-if="colorList && colorList.length > 0"
|
|
178
102
|
width="22px"
|
|
179
103
|
class-name="editable-table__color-column no-inner-cell-border"
|
|
180
|
-
:fixed="leftFixedColumnCount > 0 ? 'left' :
|
|
104
|
+
:fixed="leftFixedColumnCount > 0 ? 'left' : false"
|
|
181
105
|
>
|
|
182
106
|
<template #header>
|
|
183
107
|
<div class="editable-table__color-icon" />
|
|
184
108
|
</template>
|
|
185
109
|
<template #default="scope">
|
|
186
|
-
<
|
|
110
|
+
<biz-color-select
|
|
187
111
|
:color-list="colorList"
|
|
188
112
|
:scope="scope"
|
|
189
113
|
@row-bg-change="(params) => emit('row-bg-change', params)"
|
|
@@ -203,168 +127,41 @@
|
|
|
203
127
|
v-if="showColumnHeadSortIcon(column)"
|
|
204
128
|
#header="scope"
|
|
205
129
|
>
|
|
206
|
-
<
|
|
130
|
+
<biz-table-header-popover
|
|
207
131
|
ref="sortFilterPopoverRef"
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
:
|
|
212
|
-
|
|
132
|
+
:head-active="isColumnHeadActive(column)"
|
|
133
|
+
:column="column"
|
|
134
|
+
:showing-columns="showingColumns"
|
|
135
|
+
:temp-summary-list="tempSummaryList"
|
|
136
|
+
:temp-sorting-column="tempSortingColumn"
|
|
137
|
+
:temp-sort-type="tempSortType"
|
|
138
|
+
:temp-filtered-value="tempFilteredValue"
|
|
139
|
+
:temp-search-value="tempSearchValue"
|
|
140
|
+
@update:tempSummaryList="val => { tempSummaryList = val }"
|
|
141
|
+
@update:tempFilteredValue="(key, value) => { tempFilteredValue[key] = value }"
|
|
142
|
+
@update:tempSearchValue="(key, value) => { tempSearchValue[key] = value }"
|
|
143
|
+
@popover-show="() => handleHeaderPopoverShow(column)"
|
|
144
|
+
@update:sort="(type) => handleSort(type, column)"
|
|
145
|
+
@reset="() => handleHeaderOperationReset(column, scope)"
|
|
146
|
+
@confirm="() => handleHeaderOperationConfirm(column, scope)"
|
|
213
147
|
>
|
|
214
|
-
<template
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<div :class="['editable-table__sort-icon', isColumnHeadActive(column) && 'editable-table__sort-icon--active']" />
|
|
219
|
-
</span>
|
|
220
|
-
</template>
|
|
221
|
-
<div class="sort-filter">
|
|
222
|
-
<div class="sort-filter__column-title">
|
|
223
|
-
{{ column.label }}
|
|
224
|
-
</div>
|
|
225
|
-
<div
|
|
226
|
-
v-if="column.isColumnSortable"
|
|
227
|
-
class="sort-filter__sort"
|
|
228
|
-
>
|
|
229
|
-
<div class="sort-filter__sort-title">
|
|
230
|
-
排序
|
|
231
|
-
</div>
|
|
232
|
-
<div class="sort-filter__sort-btns">
|
|
233
|
-
<el-button
|
|
234
|
-
:class="['sort-filter__sort-btn', tempSortingColumn?.prop === column.prop && tempSortType === 'ascending' && 'sort-filter__sort-btn--active']"
|
|
235
|
-
@click="handleSort('ascending', column)"
|
|
236
|
-
>
|
|
237
|
-
升序
|
|
238
|
-
</el-button>
|
|
239
|
-
<el-button
|
|
240
|
-
:class="['sort-filter__sort-btn', tempSortingColumn?.prop === column.prop && tempSortType === 'descending' && 'sort-filter__sort-btn--active']"
|
|
241
|
-
@click="handleSort('descending', column)"
|
|
242
|
-
>
|
|
243
|
-
降序
|
|
244
|
-
</el-button>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
<div
|
|
248
|
-
v-if="column.search && !Array.isArray(column.search)"
|
|
249
|
-
class="sort-filter__search"
|
|
250
|
-
>
|
|
251
|
-
<div class="sort-filter__search-title">
|
|
252
|
-
搜索
|
|
253
|
-
</div>
|
|
254
|
-
<el-input
|
|
255
|
-
v-model.trim="tempSearchValue[column.prop]"
|
|
256
|
-
class="sort-filter__search-input"
|
|
257
|
-
placeholder="请输入内容"
|
|
258
|
-
/>
|
|
259
|
-
</div>
|
|
260
|
-
|
|
261
|
-
<div
|
|
262
|
-
v-if="column.search && Array.isArray(column.search)"
|
|
263
|
-
class="sort-filter__search"
|
|
264
|
-
style="display: flex;flex-direction: column;gap: 12px;"
|
|
265
|
-
>
|
|
266
|
-
<div
|
|
267
|
-
v-for="item in column.search"
|
|
268
|
-
:key="item.prop"
|
|
269
|
-
>
|
|
270
|
-
<div class="sort-filter__search-title">
|
|
271
|
-
{{ item.label }}
|
|
272
|
-
</div>
|
|
273
|
-
<el-input
|
|
274
|
-
v-model.trim="tempSearchValue[item.prop]"
|
|
275
|
-
class="sort-filter__search-input"
|
|
276
|
-
placeholder="请输入内容"
|
|
277
|
-
/>
|
|
278
|
-
</div>
|
|
279
|
-
</div>
|
|
280
|
-
|
|
281
|
-
<div
|
|
282
|
-
v-if="column.filters && ((Array.isArray(column.filters) ? column.filters : column.filters.options).length > 0)"
|
|
283
|
-
class="sort-filter__filter"
|
|
148
|
+
<template #filter-item="item">
|
|
149
|
+
<slot
|
|
150
|
+
:name="column.prop + '-filter-item'"
|
|
151
|
+
v-bind="item"
|
|
284
152
|
>
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
>
|
|
293
|
-
<el-checkbox
|
|
294
|
-
v-for="item in (Array.isArray(column.filters) ? column.filters : column.filters.options)"
|
|
295
|
-
:key="item.value"
|
|
296
|
-
:label="item.value"
|
|
297
|
-
class="sort-filter__filter-checkbox"
|
|
298
|
-
>
|
|
299
|
-
<slot
|
|
300
|
-
:name="column.prop + '-filter-item'"
|
|
301
|
-
v-bind="item"
|
|
302
|
-
>
|
|
303
|
-
{{ item.text }}
|
|
304
|
-
</slot>
|
|
305
|
-
</el-checkbox>
|
|
306
|
-
</el-checkbox-group>
|
|
307
|
-
|
|
308
|
-
<el-radio-group
|
|
309
|
-
v-if="column.filters && !Array.isArray(column.filters) && column.filters.type === 'radio'"
|
|
310
|
-
v-model="tempFilteredValue[column.prop]"
|
|
311
|
-
style="display: flex;flex-direction: column;gap: 6px;"
|
|
312
|
-
>
|
|
313
|
-
<el-radio
|
|
314
|
-
v-for="item in column.filters.options"
|
|
315
|
-
:key="item.value"
|
|
316
|
-
:label="item.value"
|
|
317
|
-
>
|
|
318
|
-
<slot
|
|
319
|
-
:name="column.prop + '-filter-item'"
|
|
320
|
-
v-bind="item"
|
|
321
|
-
>
|
|
322
|
-
{{ item.text }}
|
|
323
|
-
</slot>
|
|
324
|
-
</el-radio>
|
|
325
|
-
</el-radio-group>
|
|
326
|
-
</div>
|
|
327
|
-
<div
|
|
328
|
-
v-if="column.summary"
|
|
329
|
-
class="sort-filter__filter"
|
|
153
|
+
{{ item.text }}
|
|
154
|
+
</slot>
|
|
155
|
+
</template>
|
|
156
|
+
<template #summay-item>
|
|
157
|
+
<slot
|
|
158
|
+
:name="column.prop + '-summay-item'"
|
|
159
|
+
v-bind="column"
|
|
330
160
|
>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
v-model="tempSummaryList"
|
|
336
|
-
class="sort-filter__filter-checkbox-group"
|
|
337
|
-
>
|
|
338
|
-
<el-checkbox
|
|
339
|
-
:label="column.prop"
|
|
340
|
-
class="sort-filter__filter-checkbox"
|
|
341
|
-
>
|
|
342
|
-
<slot
|
|
343
|
-
:name="column.prop + '-summay-item'"
|
|
344
|
-
v-bind="column"
|
|
345
|
-
>
|
|
346
|
-
{{ column.label }}
|
|
347
|
-
</slot>
|
|
348
|
-
</el-checkbox>
|
|
349
|
-
</el-checkbox-group>
|
|
350
|
-
</div>
|
|
351
|
-
<div class="sort-filter__footer">
|
|
352
|
-
<el-button
|
|
353
|
-
class="sort-filter__reset-btn"
|
|
354
|
-
@click="handleHeaderOperationReset(column, scope)"
|
|
355
|
-
>
|
|
356
|
-
重置
|
|
357
|
-
</el-button>
|
|
358
|
-
<el-button
|
|
359
|
-
class="sort-filter__confirm-btn"
|
|
360
|
-
type="primary"
|
|
361
|
-
@click="handleHeaderOperationConfirm(column, scope)"
|
|
362
|
-
>
|
|
363
|
-
确定
|
|
364
|
-
</el-button>
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
</el-popover>
|
|
161
|
+
{{ column.label }}
|
|
162
|
+
</slot>
|
|
163
|
+
</template>
|
|
164
|
+
</biz-table-header-popover>
|
|
368
165
|
</template>
|
|
369
166
|
<!-- 默认操作按钮,defaultOperations属性不为空数组时展示。编辑状态下隐藏 -->
|
|
370
167
|
<template
|
|
@@ -453,30 +250,11 @@
|
|
|
453
250
|
:name="column.editSlotName"
|
|
454
251
|
/>
|
|
455
252
|
<!-- 内置编辑类型 -->
|
|
456
|
-
<
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
/>
|
|
462
|
-
</div>
|
|
463
|
-
<div v-if="column.editType === 'select'">
|
|
464
|
-
<el-select v-model="editingRowData[column.prop]">
|
|
465
|
-
<el-option
|
|
466
|
-
v-for="item in column.selectOptions"
|
|
467
|
-
:key="item.label"
|
|
468
|
-
:label="item.label"
|
|
469
|
-
:value="item.value"
|
|
470
|
-
/>
|
|
471
|
-
</el-select>
|
|
472
|
-
</div>
|
|
473
|
-
<el-date-picker
|
|
474
|
-
v-if="column.editType === 'date'"
|
|
475
|
-
v-model="editingRowData[column.prop]"
|
|
476
|
-
type="date"
|
|
477
|
-
placeholder="选择日期"
|
|
478
|
-
/>
|
|
479
|
-
</div>
|
|
253
|
+
<biz-edit-cell
|
|
254
|
+
v-else-if="column.editType"
|
|
255
|
+
v-model="editingRowData[column.prop]"
|
|
256
|
+
:column="column"
|
|
257
|
+
/>
|
|
480
258
|
<!-- 不支持编辑 -->
|
|
481
259
|
<slot
|
|
482
260
|
v-else
|
|
@@ -491,32 +269,11 @@
|
|
|
491
269
|
#default="scope"
|
|
492
270
|
>
|
|
493
271
|
<!-- 当前行编辑中,内置编辑类型 -->
|
|
494
|
-
<
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
type="text"
|
|
500
|
-
/>
|
|
501
|
-
</div>
|
|
502
|
-
<div v-if="column.editType === 'select'">
|
|
503
|
-
<el-select v-model="editingRowData[column.prop]">
|
|
504
|
-
<el-option
|
|
505
|
-
v-for="item in column.selectOptions"
|
|
506
|
-
:key="item.value"
|
|
507
|
-
:label="item.label"
|
|
508
|
-
:value="item.value"
|
|
509
|
-
/>
|
|
510
|
-
</el-select>
|
|
511
|
-
</div>
|
|
512
|
-
<div v-if="column.editType === 'date'">
|
|
513
|
-
<el-date-picker
|
|
514
|
-
v-model="editingRowData[column.prop]"
|
|
515
|
-
type="date"
|
|
516
|
-
placeholder="选择日期"
|
|
517
|
-
/>
|
|
518
|
-
</div>
|
|
519
|
-
</template>
|
|
272
|
+
<biz-edit-cell
|
|
273
|
+
v-if="editingRowIndex === scope.$index && column.editType"
|
|
274
|
+
v-model="editingRowData[column.prop]"
|
|
275
|
+
:column="column"
|
|
276
|
+
/>
|
|
520
277
|
<!-- 当前行编辑中,自定义编辑类型 -->
|
|
521
278
|
<slot
|
|
522
279
|
v-else-if="column.editSlotName && scope.$index === editingRowIndex"
|
|
@@ -567,17 +324,23 @@
|
|
|
567
324
|
</template>
|
|
568
325
|
|
|
569
326
|
<script lang="ts" setup>
|
|
570
|
-
import
|
|
327
|
+
import BizColorSelect from './features/bizColorSelect.vue';
|
|
328
|
+
import BizViewSettingDialog from './features/bizViewSettingDialog.vue'
|
|
329
|
+
import BizTableHeaderPopover from './features/bizTableHeaderPopover.vue'
|
|
330
|
+
import BizEditCell from './features/bizEditCell.vue'
|
|
571
331
|
|
|
572
332
|
import { computed, nextTick, ref, watch } from 'vue';
|
|
573
333
|
import { Message } from 'element-ui';
|
|
574
|
-
|
|
575
|
-
import
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
334
|
+
|
|
335
|
+
import {
|
|
336
|
+
usePagination,
|
|
337
|
+
useCellHover,
|
|
338
|
+
useRowBgColor,
|
|
339
|
+
useDefaultOperation,
|
|
340
|
+
useColumnHeaderOperation,
|
|
341
|
+
useDragSort,
|
|
342
|
+
} from './bizHooks'
|
|
343
|
+
|
|
581
344
|
import { ITableDataItem, IColumnConfig, IDefaultOperationType, IColorList } from './types';
|
|
582
345
|
|
|
583
346
|
// defineProps泛型参数如果从外部传入,编译报错
|
|
@@ -667,6 +430,8 @@ const props = withDefaults(defineProps<IProps>(), {
|
|
|
667
430
|
const emit = defineEmits<IEmits>();
|
|
668
431
|
|
|
669
432
|
const showingColumns = ref<string[]>([]); // 表格中实际展示的列
|
|
433
|
+
const leftFixedColumnCount = ref(0) // 左侧固定列数量
|
|
434
|
+
const viewSettingDragSortOptions = ref<IColumnConfig[]>([])
|
|
670
435
|
|
|
671
436
|
const actualColumns = computed(() => {
|
|
672
437
|
const res: IColumnConfig[] = [];
|
|
@@ -754,24 +519,6 @@ const {
|
|
|
754
519
|
hasExpandRow: props.hasExpandRow
|
|
755
520
|
});
|
|
756
521
|
|
|
757
|
-
/************ 显示设置相关 ************ */
|
|
758
|
-
const {
|
|
759
|
-
viewSettingDragSortOptions,
|
|
760
|
-
columnsToBeShown,
|
|
761
|
-
viewSettingVisible,
|
|
762
|
-
leftFixedColumnCount,
|
|
763
|
-
tempLeftFixedColumnCount,
|
|
764
|
-
handleInputTempLeftFixedColumnCount,
|
|
765
|
-
handleViewSettingShow,
|
|
766
|
-
handleViewSettingClose,
|
|
767
|
-
handleViewSettingConfirm
|
|
768
|
-
} = useViewSetting({
|
|
769
|
-
tableDomRef,
|
|
770
|
-
showingColumns,
|
|
771
|
-
actualColumns,
|
|
772
|
-
props
|
|
773
|
-
});
|
|
774
|
-
|
|
775
522
|
/************ 列头部操作相关 ************ */
|
|
776
523
|
const {
|
|
777
524
|
setSort,
|
|
@@ -856,10 +603,8 @@ const handleSelectionChange = (e) => {
|
|
|
856
603
|
emit('selection-change', e);
|
|
857
604
|
};
|
|
858
605
|
|
|
859
|
-
const
|
|
860
|
-
|
|
861
|
-
columnsToBeShown.value = columnsToBeShown.value.filter(c => c !== item.prop);
|
|
862
|
-
};
|
|
606
|
+
const bizViewSettingDialogRef = ref(null as unknown as InstanceType<typeof BizViewSettingDialog>)
|
|
607
|
+
const handleViewSettingShow = () => bizViewSettingDialogRef.value.open()
|
|
863
608
|
|
|
864
609
|
defineExpose({
|
|
865
610
|
closeAllExpandedRows,
|