@94ai/nf-table 3.2.4 → 3.2.20
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/lib/index.d.ts +1299 -308
- package/lib/nf-column-check-dialog.vue.d.ts +9 -0
- package/lib/nf-column-check-drawer.vue.d.ts +122 -0
- package/lib/nf-table.cjs.js +6378 -254
- package/lib/nf-table.esm-bundler.js +6379 -255
- package/lib/nf-table.vue.d.ts +438 -49
- package/lib/types.d.ts +3 -0
- package/lib/utils.d.ts +1 -0
- package/package/index.ts +14 -1
- package/package/nf-column-check-dialog.vue +17 -2
- package/package/nf-column-check-drawer.vue +420 -0
- package/package/nf-table.vue +928 -495
- package/package/types.ts +3 -0
- package/package/utils.ts +15 -0
- package/package.json +9 -5
package/package/nf-table.vue
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="nf-table" ref="nfTableRef">
|
|
3
|
-
<slot name="searchBox" ref="searchBox"
|
|
3
|
+
<slot name="searchBox" ref="searchBox">
|
|
4
4
|
<nf-search-form
|
|
5
5
|
ref="nfSearchFormRef"
|
|
6
6
|
v-bind="searchFormAttrs"
|
|
7
7
|
v-on="searchFormEvents"
|
|
8
|
+
:operation-prop-key="operationPropKey"
|
|
9
|
+
:storage-key="searchFormStorageKey"
|
|
10
|
+
:property="priority"
|
|
11
|
+
:select-empty-warning-tips="selectEmptyWarningTips"
|
|
8
12
|
>
|
|
9
13
|
<template v-for="item in (nfSearchFormRef?.renderSearchFormItemOptions || [])">
|
|
10
14
|
<!-- 定制化SearchItem?提示-->
|
|
@@ -21,432 +25,521 @@
|
|
|
21
25
|
<slot name="searchFormColumnEditDialogFooter" slot="dialogFooter" />
|
|
22
26
|
</nf-search-form>
|
|
23
27
|
</slot>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</el-table-column>
|
|
62
|
-
<el-table-column :key="column.label" :type="column.type" :label="column.label" v-bind="column.attr" v-else />
|
|
28
|
+
<div class="nf-table-content" ref="nfTableContent">
|
|
29
|
+
<slot name="columnEdit" v-if="columnEdit && columnPosition === 'free'">
|
|
30
|
+
<el-button @click="nfColumCheckDialogVisible = true"
|
|
31
|
+
:class="(columnDisplayBtnClass || '') + ' nf-column-display'"
|
|
32
|
+
:type="columnDisplayBtnType"
|
|
33
|
+
:plain="columnDisplayBtnPlain"
|
|
34
|
+
:icon="columnDisplayBtnIcon"
|
|
35
|
+
:size="columnDisplayBtnSize"
|
|
36
|
+
:round="columnDisplayBtnRound"
|
|
37
|
+
:circle="columnDisplayBtnCircle"
|
|
38
|
+
:loading="columnDisplayBtnLoading"
|
|
39
|
+
:disabled="columnDisplayBtnDisabled"
|
|
40
|
+
>
|
|
41
|
+
{{ columnDisplayBtnText }}
|
|
42
|
+
</el-button>
|
|
43
|
+
</slot>
|
|
44
|
+
<el-table
|
|
45
|
+
ref="elTableRef"
|
|
46
|
+
:class="{'nf-table-container': true, 'nf-default-table-border': !tableAttrs?.border }"
|
|
47
|
+
:data="showData"
|
|
48
|
+
:fit="tableAttrer?.fit ?? true"
|
|
49
|
+
:height="elTableHeight"
|
|
50
|
+
v-bind="tableAttrer"
|
|
51
|
+
v-on="tableEventer"
|
|
52
|
+
:key="elTableRefKey"
|
|
53
|
+
>
|
|
54
|
+
<template v-for="column in tableColumns">
|
|
55
|
+
<template v-if="isShow(column)">
|
|
56
|
+
<template v-if="column.type">
|
|
57
|
+
<el-table-column :key="column.label" :type="column.type" :label="column.label" v-bind="column.attr"
|
|
58
|
+
v-if="column.render || column.prop || column.slot">
|
|
59
|
+
<template slot-scope="scope">
|
|
60
|
+
<render-component v-if="column.render" :render="column.render" :row="scope.row" />
|
|
61
|
+
<template v-else>
|
|
62
|
+
<slot v-if="column.slot" :name="column.slot" :row="scope.row" :index="scope.$index" />
|
|
63
|
+
<span v-else>{{ scope.row[column.prop] }}</span>
|
|
64
|
+
</template>
|
|
63
65
|
</template>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
66
|
+
</el-table-column>
|
|
67
|
+
<el-table-column :key="column.label" :type="column.type" :label="column.label" v-bind="column.attr"
|
|
68
|
+
v-else />
|
|
69
|
+
</template>
|
|
70
|
+
<template v-else>
|
|
71
|
+
<el-table-column
|
|
72
|
+
v-if="column.attr&&column.attr.formatter"
|
|
73
|
+
:key="column.label"
|
|
74
|
+
:prop="column.prop"
|
|
75
|
+
:label="column.label"
|
|
76
|
+
v-bind="column.attr"
|
|
77
|
+
>
|
|
78
|
+
<slot v-if="column.singleHeadMutiColSlot" :name="column.singleHeadMutiColSlot" />
|
|
79
|
+
<template slot="header" slot-scope="scope">
|
|
80
|
+
<template v-if="column.headerSlot">
|
|
81
|
+
<slot :name="column.headerSlot" :$index="scope.$index" :column="scope.column" />
|
|
82
|
+
</template>
|
|
83
|
+
<span v-else>
|
|
84
|
+
{{ column.label }}
|
|
85
|
+
</span>
|
|
86
|
+
</template>
|
|
87
|
+
</el-table-column>
|
|
88
|
+
<el-table-column v-else :key="column.label" :prop="column.prop" :label="column.label"
|
|
89
|
+
v-bind="column.attr">
|
|
90
|
+
<slot v-if="column.singleHeadMutiColSlot" :name="column.singleHeadMutiColSlot" />
|
|
91
|
+
<template slot="header" slot-scope="scope">
|
|
92
|
+
<template v-if="column.headerSlot">
|
|
93
|
+
<slot :name="column.headerSlot" :$index="scope.$index" :column="scope.column" />
|
|
94
|
+
</template>
|
|
95
|
+
<span v-else>
|
|
89
96
|
{{ column.label }}
|
|
90
97
|
</span>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
98
|
+
|
|
99
|
+
<slot name="operationIconColumnCheck" :column="column"
|
|
100
|
+
v-if="column.prop === operationPropKey && columnEdit && columnPosition === 'embed'">
|
|
101
|
+
<el-tooltip
|
|
102
|
+
popper-class="actionTooltipRef"
|
|
103
|
+
placement="top"
|
|
104
|
+
effect="dark"
|
|
105
|
+
:content="columnDisplayBtnText">
|
|
106
|
+
<i class="iconfont icon-liebiao_xianshiliemu operation-icon-column-check"
|
|
107
|
+
@click="nfColumCheckDialogVisible = true"
|
|
108
|
+
/>
|
|
109
|
+
</el-tooltip>
|
|
110
|
+
</slot>
|
|
111
|
+
|
|
112
|
+
</template>
|
|
113
|
+
<template slot-scope="scope">
|
|
114
|
+
<render-component v-if="column.render" :render="column.render" :row="scope.row" />
|
|
115
|
+
<template v-else>
|
|
116
|
+
<slot v-if="column.slot" :name="column.slot" :row="scope.row" :index="scope.$index" />
|
|
117
|
+
<template v-else>
|
|
118
|
+
<template v-if="column.prop === operationPropKey && !hasOperationSlot">
|
|
119
|
+
<el-button
|
|
120
|
+
:size="item.size || 'mini'"
|
|
121
|
+
:type="item.type || 'text'"
|
|
122
|
+
:disabled="item.disabled"
|
|
123
|
+
:loading="item.loading"
|
|
124
|
+
:class="item.class"
|
|
125
|
+
:plain="item.plain"
|
|
126
|
+
:icon="item.icon"
|
|
127
|
+
:round="item.round"
|
|
128
|
+
:circle="item.circle"
|
|
129
|
+
:style="item.style"
|
|
130
|
+
v-for="(item, index) in column.operationList"
|
|
131
|
+
v-on="item.events"
|
|
132
|
+
:key="item.key || index"
|
|
133
|
+
>{{ item.text }}
|
|
134
|
+
</el-button>
|
|
116
135
|
</template>
|
|
136
|
+
<span v-else>{{ scope.row[column.prop] }}</span>
|
|
117
137
|
</template>
|
|
118
|
-
</
|
|
138
|
+
</template>
|
|
119
139
|
</template>
|
|
120
|
-
</
|
|
140
|
+
</el-table-column>
|
|
121
141
|
</template>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
142
|
+
</template>
|
|
143
|
+
</template>
|
|
144
|
+
<slot name="append" slot="append"></slot>
|
|
145
|
+
<slot name="empty" slot="empty">
|
|
146
|
+
<nf-empty style="margin-top: 20px;" slot="empty" :image-size="145"></nf-empty>
|
|
147
|
+
</slot>
|
|
148
|
+
</el-table>
|
|
149
|
+
<div ref="nfTableActionContainerRef" class="nf-action-box nf-clearfix">
|
|
150
|
+
<slot name="actionBar" ref="nfTableActionBarRef">
|
|
151
|
+
<template v-if="actionBarOptList?.length && !hasActionBarSlot">
|
|
152
|
+
<template v-for="(item, index) in actionBarOptList">
|
|
153
|
+
<el-button
|
|
154
|
+
:key="item.key || index"
|
|
155
|
+
v-if="item.element === 'el-button'"
|
|
156
|
+
:size="item.size || 'mini'"
|
|
157
|
+
:type="item.type || 'text'"
|
|
158
|
+
:disabled="item.disabled"
|
|
159
|
+
:loading="item.loading"
|
|
160
|
+
:class="item.class"
|
|
161
|
+
:plain="item.plain"
|
|
162
|
+
:icon="item.icon"
|
|
163
|
+
:round="item.round"
|
|
164
|
+
:circle="item.circle"
|
|
165
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
166
|
+
v-on="item.events"
|
|
167
|
+
>{{ item.value }}
|
|
168
|
+
</el-button>
|
|
169
|
+
<el-checkbox
|
|
170
|
+
:key="item.key || index"
|
|
171
|
+
v-model="item.value"
|
|
172
|
+
:class="item.class"
|
|
173
|
+
:label="item.label"
|
|
174
|
+
:true-label="item['true-label']"
|
|
175
|
+
:false-label="item['false-label']"
|
|
176
|
+
:disabled="item.disabled"
|
|
177
|
+
:border="item.border"
|
|
178
|
+
:size="item.size"
|
|
179
|
+
:name="item.name"
|
|
180
|
+
:checked="item.checked"
|
|
181
|
+
:indeterminate="item.indeterminate"
|
|
182
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
183
|
+
v-if="item.element === 'el-checkbox'"
|
|
184
|
+
v-on="item.events"
|
|
185
|
+
>{{ item.text }}
|
|
186
|
+
</el-checkbox>
|
|
187
|
+
<el-checkbox-group
|
|
188
|
+
:key="item.key || index"
|
|
189
|
+
v-model="item.value"
|
|
190
|
+
:class="item.class"
|
|
191
|
+
:label="item.label"
|
|
192
|
+
:true-label="item['true-label']"
|
|
193
|
+
:false-label="item['false-label']"
|
|
194
|
+
:disabled="item.disabled"
|
|
195
|
+
:border="item.border"
|
|
196
|
+
:size="item.size"
|
|
197
|
+
:name="item.name"
|
|
198
|
+
:checked="item.checked"
|
|
199
|
+
:indeterminate="item.indeterminate"
|
|
200
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
201
|
+
v-if="item.element === 'el-checkbox-group'"
|
|
202
|
+
v-on="item.events"
|
|
203
|
+
>
|
|
204
|
+
<template v-if="item.children?.length">
|
|
205
|
+
<template
|
|
206
|
+
v-for="(itemChildren, j) in item.children"
|
|
207
|
+
>
|
|
208
|
+
<el-checkbox
|
|
209
|
+
:key="itemChildren.key || j"
|
|
210
|
+
v-model="itemChildren.value"
|
|
211
|
+
:class="itemChildren.class"
|
|
212
|
+
:label="itemChildren.label"
|
|
213
|
+
:true-label="itemChildren['true-label']"
|
|
214
|
+
:false-label="itemChildren['false-label']"
|
|
215
|
+
:disabled="itemChildren.disabled"
|
|
216
|
+
:border="itemChildren.border"
|
|
217
|
+
:size="itemChildren.size"
|
|
218
|
+
:name="itemChildren.name"
|
|
219
|
+
:checked="itemChildren.checked"
|
|
220
|
+
:indeterminate="itemChildren.indeterminate"
|
|
221
|
+
:style="{...(itemChildren.style || {}), marginRight: j === 0 ? 0 : '10px'}"
|
|
222
|
+
v-if="itemChildren.element === 'el-checkbox'"
|
|
223
|
+
v-on="itemChildren.events"
|
|
224
|
+
>{{ item.text }}
|
|
225
|
+
</el-checkbox>
|
|
226
|
+
<el-checkbox-button
|
|
227
|
+
:key="itemChildren.key || j"
|
|
228
|
+
v-model="itemChildren.value"
|
|
229
|
+
:class="itemChildren.class"
|
|
230
|
+
:label="itemChildren.label"
|
|
231
|
+
:true-label="itemChildren['true-label']"
|
|
232
|
+
:false-label="itemChildren['false-label']"
|
|
233
|
+
:disabled="itemChildren.disabled"
|
|
234
|
+
:border="itemChildren.border"
|
|
235
|
+
:size="itemChildren.size"
|
|
236
|
+
:name="itemChildren.name"
|
|
237
|
+
:checked="itemChildren.checked"
|
|
238
|
+
:indeterminate="itemChildren.indeterminate"
|
|
239
|
+
:style="{...(itemChildren.style || {}), marginRight: j === 0 ? 0 : '10px'}"
|
|
240
|
+
v-if="itemChildren.element === 'el-checkbox-button'"
|
|
241
|
+
v-on="itemChildren.events"
|
|
242
|
+
>{{ item.text }}
|
|
243
|
+
</el-checkbox-button>
|
|
217
244
|
</template>
|
|
218
|
-
</
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
245
|
+
</template>
|
|
246
|
+
</el-checkbox-group>
|
|
247
|
+
<el-checkbox-button
|
|
248
|
+
:key="item.key || index"
|
|
249
|
+
v-model="item.value"
|
|
250
|
+
:class="item.class"
|
|
251
|
+
:label="item.label"
|
|
252
|
+
:true-label="item['true-label']"
|
|
253
|
+
:false-label="item['false-label']"
|
|
254
|
+
:disabled="item.disabled"
|
|
255
|
+
:border="item.border"
|
|
256
|
+
:size="item.size"
|
|
257
|
+
:name="item.name"
|
|
258
|
+
:checked="item.checked"
|
|
259
|
+
:indeterminate="item.indeterminate"
|
|
260
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
261
|
+
v-if="item.element === 'el-checkbox-button'"
|
|
262
|
+
v-on="item.events"
|
|
263
|
+
>{{ item.text }}
|
|
264
|
+
</el-checkbox-button>
|
|
265
|
+
<el-radio
|
|
266
|
+
:key="item.key || index"
|
|
267
|
+
v-model="item.value"
|
|
268
|
+
:label="item.label"
|
|
269
|
+
:disabled="item.disabled"
|
|
270
|
+
:border="item.border"
|
|
271
|
+
:name="item.name"
|
|
272
|
+
:size="item.size"
|
|
273
|
+
:class="item.class"
|
|
274
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
275
|
+
v-if="item.element === 'el-radio'"
|
|
276
|
+
v-on="item.events"
|
|
277
|
+
>{{ item.text }}
|
|
278
|
+
</el-radio>
|
|
279
|
+
<el-radio-group
|
|
280
|
+
:key="item.key || index"
|
|
281
|
+
v-model="item.value"
|
|
282
|
+
:disabled="item.disabled"
|
|
283
|
+
:size="item.size"
|
|
284
|
+
:class="item.class"
|
|
285
|
+
:text-color="item['text-color']"
|
|
286
|
+
:fill="item['fill']"
|
|
287
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
288
|
+
v-if="item.element === 'el-radio-group'"
|
|
289
|
+
v-on="item.events"
|
|
290
|
+
>
|
|
291
|
+
<template v-if="item.children?.length">
|
|
292
|
+
<template
|
|
293
|
+
v-for="(itemChildren, j) in item.children"
|
|
294
|
+
>
|
|
295
|
+
<el-radio
|
|
296
|
+
:key="itemChildren.key || j"
|
|
297
|
+
v-model="itemChildren.value"
|
|
298
|
+
:label="itemChildren.label"
|
|
299
|
+
:disabled="itemChildren.disabled"
|
|
300
|
+
:border="itemChildren.border"
|
|
301
|
+
:name="itemChildren.name"
|
|
302
|
+
:size="itemChildren.size"
|
|
303
|
+
:class="itemChildren.class"
|
|
304
|
+
:style="{...(itemChildren.style || {}), marginRight: j === 0 ? 0 : '10px'}"
|
|
305
|
+
v-if="itemChildren.element === 'el-radio'"
|
|
306
|
+
v-on="itemChildren.events"
|
|
307
|
+
>{{ item.text }}
|
|
308
|
+
</el-radio>
|
|
309
|
+
<el-radio-button
|
|
310
|
+
:key="itemChildren.key || j"
|
|
311
|
+
v-model="itemChildren.value"
|
|
312
|
+
:label="itemChildren.label"
|
|
313
|
+
:disabled="itemChildren.disabled"
|
|
314
|
+
:border="itemChildren.border"
|
|
315
|
+
:name="itemChildren.name"
|
|
316
|
+
:size="itemChildren.size"
|
|
317
|
+
:class="itemChildren.class"
|
|
318
|
+
:style="{...(itemChildren.style || {}), marginRight: j === 0 ? 0 : '10px'}"
|
|
319
|
+
v-if="itemChildren.element === 'el-radio-button'"
|
|
320
|
+
v-on="itemChildren.events"
|
|
321
|
+
>{{ item.text }}
|
|
322
|
+
</el-radio-button>
|
|
292
323
|
</template>
|
|
293
|
-
</
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
<
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
<
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
324
|
+
</template>
|
|
325
|
+
</el-radio-group>
|
|
326
|
+
<el-radio-button
|
|
327
|
+
:key="item.key || index"
|
|
328
|
+
v-model="item.value"
|
|
329
|
+
:label="item.label"
|
|
330
|
+
:disabled="item.disabled"
|
|
331
|
+
:border="item.border"
|
|
332
|
+
:name="item.name"
|
|
333
|
+
:size="item.size"
|
|
334
|
+
:class="item.class"
|
|
335
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
336
|
+
v-if="item.element === 'el-radio-button'"
|
|
337
|
+
v-on="item.events"
|
|
338
|
+
>{{ item.text }}
|
|
339
|
+
</el-radio-button>
|
|
340
|
+
<el-input
|
|
341
|
+
:key="item.key || index"
|
|
342
|
+
v-model="item.value"
|
|
343
|
+
:class="item.class"
|
|
344
|
+
:show-word-limit="item['show-word-limit']"
|
|
345
|
+
:show-password="item['show-password']"
|
|
346
|
+
:prefix-icon="item['prefix-icon']"
|
|
347
|
+
:suffix-icon="item['suffix-icon']"
|
|
348
|
+
:validate-event="item['validate-event']"
|
|
349
|
+
:type="item.type"
|
|
350
|
+
:placeholder="item.placeholder"
|
|
351
|
+
:disabled="item.disabled"
|
|
352
|
+
:size="item.size"
|
|
353
|
+
:name="item.name"
|
|
354
|
+
:max="item.max"
|
|
355
|
+
:min="item.min"
|
|
356
|
+
:step="item.step"
|
|
357
|
+
:label="item.label"
|
|
358
|
+
:maxlength="item.maxlength"
|
|
359
|
+
:minlength="item.minlength"
|
|
360
|
+
:clearable="item.clearable"
|
|
361
|
+
:rows="item.rows"
|
|
362
|
+
:autosize="item.autosize"
|
|
363
|
+
:autocomplete="item.autocomplete"
|
|
364
|
+
:readonly="item.readonly"
|
|
365
|
+
:resize="item.resize"
|
|
366
|
+
:autofocus="item.autofocus"
|
|
367
|
+
:form="item.form"
|
|
368
|
+
:tabindex="item.tabindex"
|
|
369
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
370
|
+
v-if="item.element === 'el-input'"
|
|
371
|
+
v-on="item.events"
|
|
372
|
+
>
|
|
373
|
+
<slot v-if="item.slot?.prefix" :name="item.slot.prefix" slot="prefix" />
|
|
374
|
+
<slot v-if="item.slot?.suffix" :name="item.slot.suffix" slot="suffix" />
|
|
375
|
+
<slot v-if="item.slot?.prepend" :name="item.slot.prepend" slot="prepend" />
|
|
376
|
+
<slot v-if="item.slot?.append" :name="item.slot.append" slot="append" />
|
|
377
|
+
</el-input>
|
|
378
|
+
<el-autocomplete
|
|
379
|
+
:key="item.key || index"
|
|
380
|
+
v-model="item.value"
|
|
381
|
+
:class="item.class"
|
|
382
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
383
|
+
:value-key="item['value-key']"
|
|
384
|
+
:fetch-suggestions="item['fetch-suggestions']"
|
|
385
|
+
:popper-class="item['popper-class']"
|
|
386
|
+
:trigger-on-focus="item['trigger-on-focus']"
|
|
387
|
+
:select-when-unmatched="item['select-when-unmatched']"
|
|
388
|
+
:hide-loading="item['hide-loading']"
|
|
389
|
+
:popper-append-to-body="item['popper-append-to-body']"
|
|
390
|
+
:highlight-first-item="item['highlight-first-item']"
|
|
391
|
+
:prefix-icon="item['prefix-icon']"
|
|
392
|
+
:suffix-icon="item['suffix-icon']"
|
|
393
|
+
:placeholder="item.placeholder"
|
|
394
|
+
:disabled="item.disabled"
|
|
395
|
+
:debounce="item.debounce"
|
|
396
|
+
:placement="item.placement"
|
|
397
|
+
:label="item.label"
|
|
398
|
+
:name="item.name"
|
|
399
|
+
v-if="item.element === 'el-autocomplete'"
|
|
400
|
+
v-on="item.events"
|
|
401
|
+
>
|
|
402
|
+
<slot v-if="item.slot?.prefix" :name="item.slot.prefix" slot="prefix" />
|
|
403
|
+
<slot v-if="item.slot?.suffix" :name="item.slot.suffix" slot="suffix" />
|
|
404
|
+
<slot v-if="item.slot?.prepend" :name="item.slot.prepend" slot="prepend" />
|
|
405
|
+
<slot v-if="item.slot?.append" :name="item.slot.append" slot="append" />
|
|
406
|
+
</el-autocomplete>
|
|
407
|
+
<el-switch
|
|
408
|
+
:key="item.key || index"
|
|
409
|
+
v-model="item.value"
|
|
410
|
+
:disabled="item.disabled"
|
|
411
|
+
:width="item.width"
|
|
412
|
+
:name="item.name"
|
|
413
|
+
:active-icon-class="item['active-icon-class']"
|
|
414
|
+
:inactive-icon-class="item['inactive-icon-class']"
|
|
415
|
+
:active-text="item['active-text']"
|
|
416
|
+
:inactive-text="item['inactive-text']"
|
|
417
|
+
:active-value="item['active-value']"
|
|
418
|
+
:inactive-value="item['inactive-value']"
|
|
419
|
+
:active-color="item['active-color']"
|
|
420
|
+
:inactive-color="item['inactive-color']"
|
|
421
|
+
:validate-event="item['validate-event']"
|
|
422
|
+
:class="item.class"
|
|
423
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
424
|
+
v-if="item.element === 'el-switch'"
|
|
425
|
+
v-on="item.events"
|
|
426
|
+
>{{ item.text }}
|
|
427
|
+
</el-switch>
|
|
428
|
+
<el-input-number
|
|
429
|
+
:key="item.key || index"
|
|
430
|
+
v-model="item.value"
|
|
431
|
+
:class="item.class"
|
|
432
|
+
:min="item.min"
|
|
433
|
+
:max="item.max"
|
|
434
|
+
:step="item.step"
|
|
435
|
+
:step-strictly="item['step-strictly']"
|
|
436
|
+
:precision="item.precision"
|
|
437
|
+
:size="item.size"
|
|
438
|
+
:disabled="item.disabled"
|
|
439
|
+
:controls="item.controls"
|
|
440
|
+
:controls-position="item['controls-position']"
|
|
441
|
+
:name="item.name"
|
|
442
|
+
:label="item.label"
|
|
443
|
+
:placeholder="item.placeholder"
|
|
444
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
445
|
+
v-if="item.element === 'el-input-number'"
|
|
446
|
+
v-on="item.events"
|
|
447
|
+
></el-input-number>
|
|
448
|
+
<span
|
|
449
|
+
:key="item.key || index"
|
|
450
|
+
:class="item.class"
|
|
451
|
+
v-if="item.element === 'text'"
|
|
452
|
+
:style="{...(item.style || {}), marginRight: '10px'}"
|
|
453
|
+
v-on="item.events"
|
|
454
|
+
v-bind="item.attr"
|
|
455
|
+
>
|
|
422
456
|
{{ item.value }}
|
|
423
457
|
</span>
|
|
424
|
-
</template>
|
|
425
458
|
</template>
|
|
426
|
-
</
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
459
|
+
</template>
|
|
460
|
+
</slot>
|
|
461
|
+
<slot name="pagination">
|
|
462
|
+
<el-pagination ref="nfTablePaginationRef" v-if="renderPage" v-bind="pageAttrer" v-on="pageEvents"
|
|
463
|
+
class="nf-pagination-box nf-fr" />
|
|
464
|
+
</slot>
|
|
431
465
|
</div>
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
466
|
+
</div>
|
|
467
|
+
<column-check-dialog
|
|
468
|
+
v-if="nfColumCheckDialogVisible && checkMode === 'dialog'"
|
|
469
|
+
:show.sync="nfColumCheckDialogVisible"
|
|
470
|
+
:table-columns="props.columns"
|
|
471
|
+
:show-column="localShowColumn"
|
|
472
|
+
:storage-key="storageKey"
|
|
473
|
+
@save="fieldsConfirm"
|
|
474
|
+
:title="columnCheckTitle"
|
|
475
|
+
:width="columnCheckWidth"
|
|
476
|
+
:confirm-text="columnCheckConfirmText"
|
|
477
|
+
:cancel-text="columnCheckCancelText"
|
|
478
|
+
:modal-append-to-body="columnCheckModalAppendToBody"
|
|
479
|
+
:modal="columnCheckModal"
|
|
480
|
+
:fullscreen="columnCheckFullscreen"
|
|
481
|
+
:top="columnCheckTop"
|
|
482
|
+
:append-to-body="columnCheckAppendToBody"
|
|
483
|
+
:lock-scroll="columnCheckLockScroll"
|
|
484
|
+
:custom-class="columnCheckCustomClass"
|
|
485
|
+
:close-onlick-modal="columnCheckCloseOnlickModal"
|
|
486
|
+
:close-on-press-escape="columnCheckCloseOnPressEscape"
|
|
487
|
+
:show-close="columnCheckShowClose"
|
|
488
|
+
:before-close="columnCheckBeforeClose"
|
|
489
|
+
:center="columnCheckCenter"
|
|
490
|
+
:destroy-on-close="columnCheckDestroyOnClose"
|
|
491
|
+
ref="columnCheckDialog"
|
|
492
|
+
>
|
|
493
|
+
<slot slot="tableColumnEditDialogTitle" name="title"></slot>
|
|
494
|
+
<slot slot="tableColumnEditDialogFooter" name="footer"></slot>
|
|
435
495
|
</column-check-dialog>
|
|
496
|
+
<nf-drawer
|
|
497
|
+
ref="columnCheckNfDrawer"
|
|
498
|
+
size="680px"
|
|
499
|
+
v-if="checkMode === 'drawer'"
|
|
500
|
+
:title="columnCheckTitle"
|
|
501
|
+
:cancel-button-text="columnCheckCancelButtonText"
|
|
502
|
+
:confirm-button-text="columnCheckConfirmButtonText"
|
|
503
|
+
:visible.sync="nfColumCheckDialogVisible"
|
|
504
|
+
:tabs="columnCheckTabs"
|
|
505
|
+
:destroy-on-close="true"
|
|
506
|
+
:currentTab="columnCheckCurrentTab"
|
|
507
|
+
@confirm="columnCheckConfirm"
|
|
508
|
+
@changeTab="(done) => $emit('changeTab', done)"
|
|
509
|
+
@cancel="(name) => $emit('cancel', name)"
|
|
510
|
+
>
|
|
511
|
+
<slot slot="tableColumnEditDialogTitle" name="title" />
|
|
512
|
+
<slot slot="tableColumnEditDialogFooter" name="footer" />
|
|
513
|
+
<column-check-drawer
|
|
514
|
+
:search-placeholder="columnCheckSearchPlaceholder"
|
|
515
|
+
:fixed-left-desc="columnCheckFixedLeftDesc"
|
|
516
|
+
:clear-desc="columnCheckClearDesc"
|
|
517
|
+
:no-fixed-desc="columnCheckNoFixedDesc"
|
|
518
|
+
:get-checked-length-desc="columnCheckGetCheckedLengthDesc"
|
|
519
|
+
:get-all-check-desc="columnCheckGetAllCheckDesc"
|
|
520
|
+
:operation-prop-key="operationPropKey"
|
|
521
|
+
ref="columnCheckDrawer"
|
|
522
|
+
:storage-key="storageKey"
|
|
523
|
+
:table-columns="props.columns"
|
|
524
|
+
:select-empty-warning-tips="selectEmptyWarningTips"
|
|
525
|
+
/>
|
|
526
|
+
</nf-drawer>
|
|
436
527
|
</div>
|
|
437
528
|
</template>
|
|
438
529
|
|
|
439
530
|
<script lang="ts">
|
|
440
531
|
import { defineComponent } from 'vue-demi'
|
|
532
|
+
|
|
441
533
|
export default defineComponent({
|
|
442
|
-
name:
|
|
534
|
+
name: 'nf-table'
|
|
443
535
|
})
|
|
444
536
|
</script>
|
|
445
537
|
|
|
446
538
|
<script lang="ts" setup>
|
|
447
539
|
import ColumnCheckDialog from './nf-column-check-dialog.vue'
|
|
540
|
+
import ColumnCheckDrawer from './nf-column-check-drawer.vue'
|
|
448
541
|
import RenderComponent from './nf-render-component.vue'
|
|
449
|
-
import { Loading } from 'element-ui'
|
|
542
|
+
import { Loading } from 'element-ui'
|
|
450
543
|
import {
|
|
451
544
|
computed,
|
|
452
545
|
getCurrentInstance,
|
|
@@ -466,6 +559,7 @@ import {
|
|
|
466
559
|
NfSearchFormEventKey,
|
|
467
560
|
NfTableActionBtnAttributes
|
|
468
561
|
} from './types'
|
|
562
|
+
import { ITabItem } from '@94ai/nf-drawer/lib/types'
|
|
469
563
|
|
|
470
564
|
const props = withDefaults(defineProps<{
|
|
471
565
|
data?: Record<string, any>[],
|
|
@@ -482,26 +576,22 @@ const props = withDefaults(defineProps<{
|
|
|
482
576
|
*/
|
|
483
577
|
calHeight?: boolean,
|
|
484
578
|
/**
|
|
485
|
-
*
|
|
579
|
+
* 列编辑显示开关
|
|
486
580
|
*/
|
|
487
581
|
columnEdit?: boolean,
|
|
582
|
+
columnPosition?: 'free' | 'embed',
|
|
583
|
+
checkMode?: 'dialog' | 'drawer',
|
|
584
|
+
priority?: 'cached' | 'value',
|
|
585
|
+
storageKey?: string
|
|
586
|
+
searchFormStorageKey?: string
|
|
488
587
|
/**
|
|
489
|
-
*
|
|
588
|
+
* 列编辑要显示的表格项字段
|
|
490
589
|
*/
|
|
491
590
|
showColumn?: string[],
|
|
591
|
+
selectEmptyWarningTips?: string,
|
|
492
592
|
/**
|
|
493
|
-
*
|
|
593
|
+
* 列编辑按钮修饰
|
|
494
594
|
*/
|
|
495
|
-
loading?: boolean,
|
|
496
|
-
target?: HTMLElement,
|
|
497
|
-
body?: boolean,
|
|
498
|
-
fullscreen?: boolean,
|
|
499
|
-
lock?: boolean,
|
|
500
|
-
text?: string,
|
|
501
|
-
spinner?: string,
|
|
502
|
-
background?: string,
|
|
503
|
-
customClass?: string,
|
|
504
|
-
|
|
505
595
|
columnDisplayBtnClass?: string,
|
|
506
596
|
columnDisplayBtnIcon?: string,
|
|
507
597
|
columnDisplayBtnType?: string,
|
|
@@ -512,11 +602,70 @@ const props = withDefaults(defineProps<{
|
|
|
512
602
|
columnDisplayBtnLoading?: boolean,
|
|
513
603
|
columnDisplayBtnDisabled?: boolean,
|
|
514
604
|
columnDisplayBtnText?: string,
|
|
605
|
+
/**
|
|
606
|
+
* 列编辑dialog/drawer模式
|
|
607
|
+
*/
|
|
608
|
+
columnCheckTitle?: string,
|
|
609
|
+
columnCheckCancelButtonText?: string,
|
|
610
|
+
columnCheckConfirmButtonText?: string,
|
|
611
|
+
/**
|
|
612
|
+
* 列编辑dialog模式
|
|
613
|
+
*/
|
|
614
|
+
columnCheckWidth?: string,
|
|
615
|
+
columnCheckConfirmText?: string
|
|
616
|
+
columnCheckCancelText?: string
|
|
617
|
+
columnCheckModalAppendToBody?: boolean,
|
|
618
|
+
columnCheckModal?: boolean,
|
|
619
|
+
columnCheckFullscreen?: boolean,
|
|
620
|
+
columnCheckTop?: string,
|
|
621
|
+
columnCheckAppendToBody?: boolean,
|
|
622
|
+
columnCheckLockScroll?: boolean,
|
|
623
|
+
columnCheckCustomClass?: string,
|
|
624
|
+
columnCheckCloseOnlickModal?: boolean,
|
|
625
|
+
columnCheckCloseOnPressEscape?: boolean,
|
|
626
|
+
columnCheckShowClose?: boolean,
|
|
627
|
+
columnCheckBeforeClose?: Function,
|
|
628
|
+
columnCheckCenter?: boolean,
|
|
629
|
+
columnCheckDestroyOnClose?: boolean,
|
|
630
|
+
/**
|
|
631
|
+
* 列编辑drawer模式
|
|
632
|
+
*/
|
|
633
|
+
columnCheckSearchPlaceholder?: string
|
|
634
|
+
columnCheckFixedLeftDesc?: string
|
|
635
|
+
columnCheckClearDesc?: string
|
|
636
|
+
columnCheckNoFixedDesc?: string
|
|
637
|
+
columnCheckGetCheckedLengthDesc?: Function
|
|
638
|
+
columnCheckGetAllCheckDesc?: Function
|
|
639
|
+
columnCheckTabs?: ITabItem[],
|
|
640
|
+
columnCheckCurrentTab?: string,
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* 表格loading
|
|
644
|
+
*/
|
|
645
|
+
loading?: boolean,
|
|
646
|
+
target?: HTMLElement,
|
|
647
|
+
body?: boolean,
|
|
648
|
+
fullscreen?: boolean,
|
|
649
|
+
lock?: boolean,
|
|
650
|
+
text?: string,
|
|
651
|
+
spinner?: string,
|
|
652
|
+
background?: string,
|
|
653
|
+
customClass?: string,
|
|
515
654
|
|
|
655
|
+
/**
|
|
656
|
+
* 分页
|
|
657
|
+
*/
|
|
516
658
|
alwaysShowPage?: boolean,
|
|
659
|
+
/**
|
|
660
|
+
* 操作列属性key
|
|
661
|
+
*/
|
|
517
662
|
operationPropKey?: string
|
|
518
|
-
|
|
519
663
|
}>(), {
|
|
664
|
+
selectEmptyWarningTips: '请选择至少一个选项',
|
|
665
|
+
priority: 'cached',
|
|
666
|
+
storageKey: 'nf-table-columns-cached-key',
|
|
667
|
+
searchFormStorageKey: 'nf-search-form-columns-cached-key',
|
|
668
|
+
checkMode: 'drawer',
|
|
520
669
|
data: () => [],
|
|
521
670
|
columns: () => [],
|
|
522
671
|
searchFormAttrs: () => ({}),
|
|
@@ -527,7 +676,8 @@ const props = withDefaults(defineProps<{
|
|
|
527
676
|
pageEvents: () => ({}),
|
|
528
677
|
actionBarOptList: () => [],
|
|
529
678
|
calHeight: false,
|
|
530
|
-
columnEdit:
|
|
679
|
+
columnEdit: false,
|
|
680
|
+
columnPosition: 'embed',
|
|
531
681
|
showColumn: undefined,
|
|
532
682
|
loading: false,
|
|
533
683
|
target: undefined,
|
|
@@ -549,24 +699,77 @@ const props = withDefaults(defineProps<{
|
|
|
549
699
|
columnDisplayBtnText: '定制表格列目显示隐藏',
|
|
550
700
|
columnDisplayBtnClass: '',
|
|
551
701
|
alwaysShowPage: true,
|
|
552
|
-
operationPropKey: 'operation'
|
|
702
|
+
operationPropKey: 'operation',
|
|
703
|
+
columnCheckTitle: '设置显示字段',
|
|
704
|
+
columnCheckWidth: '600px',
|
|
705
|
+
columnCheckConfirmText: '保 存',
|
|
706
|
+
columnCheckCancelText: '取 消',
|
|
707
|
+
columnCheckModalAppendToBody: true,
|
|
708
|
+
columnCheckModal: true,
|
|
709
|
+
columnCheckFullscreen: false,
|
|
710
|
+
columnCheckTop: '15vh',
|
|
711
|
+
columnCheckAppendToBody: false,
|
|
712
|
+
columnCheckLockScroll: true,
|
|
713
|
+
columnCheckCustomClass: '',
|
|
714
|
+
columnCheckCloseOnlickModal: true,
|
|
715
|
+
columnCheckCloseOnPressEscape: true,
|
|
716
|
+
columnCheckShowClose: true,
|
|
717
|
+
columnCheckBeforeClose: undefined,
|
|
718
|
+
columnCheckCenter: false,
|
|
719
|
+
columnCheckDestroyOnClose: false,
|
|
720
|
+
columnCheckCancelButtonText: '取消',
|
|
721
|
+
columnCheckConfirmButtonText: '确定',
|
|
722
|
+
columnCheckSearchPlaceholder: '搜索',
|
|
723
|
+
columnCheckFixedLeftDesc: '固定在左侧',
|
|
724
|
+
columnCheckClearDesc: '清除',
|
|
725
|
+
columnCheckNoFixedDesc: '不固定',
|
|
726
|
+
columnCheckGetCheckedLengthDesc: (length) => '已选(' + length + ')',
|
|
727
|
+
columnCheckGetAllCheckDesc: (length) => '全选(' + length + ')'
|
|
553
728
|
})
|
|
554
729
|
|
|
730
|
+
const emit = defineEmits<{
|
|
731
|
+
(e: 'fieldsChange', event: string[]): void
|
|
732
|
+
(e: 'update:showColumn', event: string[] | undefined): void
|
|
733
|
+
}>()
|
|
734
|
+
|
|
735
|
+
const instance = getCurrentInstance()?.proxy
|
|
736
|
+
const elTableRef = ref()
|
|
737
|
+
const nfTableActionContainerRef = ref()
|
|
738
|
+
const nfTablePaginationRef = ref()
|
|
739
|
+
const nfTableActionBarRef = ref()
|
|
740
|
+
const nfTableRef = ref()
|
|
741
|
+
const nfTableContent = ref()
|
|
742
|
+
const nfSearchFormRef = ref()
|
|
743
|
+
const columnCheckDrawer = ref()
|
|
744
|
+
const columnCheckDialog = ref()
|
|
745
|
+
const columnCheckNfDrawer = ref()
|
|
746
|
+
const elTableHeight = ref()
|
|
747
|
+
const nfColumCheckDialogVisible = ref(false)
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* 处理前端分页和后端分页
|
|
751
|
+
*/
|
|
555
752
|
const showData = computed(() => {
|
|
556
753
|
const pageSize = props.pageAttrs['page-size']
|
|
557
754
|
const currentPage = props.pageAttrs['current-page'] || 1
|
|
558
755
|
const noTotal = typeof props.pageAttrs.total === 'undefined'
|
|
559
756
|
if (!pageSize || !noTotal) return props.data
|
|
560
|
-
if(props.data.length > pageSize) {
|
|
561
|
-
return
|
|
757
|
+
if (props.data.length > pageSize) {
|
|
758
|
+
return props.data.slice((currentPage - 1) * pageSize, currentPage * pageSize)
|
|
562
759
|
} else {
|
|
563
|
-
return
|
|
760
|
+
return props.data
|
|
564
761
|
}
|
|
565
762
|
})
|
|
763
|
+
/**
|
|
764
|
+
* 定制按钮
|
|
765
|
+
*/
|
|
766
|
+
const hasOperationSlot = computed(() => {
|
|
767
|
+
return instance?.$slots.operation
|
|
768
|
+
})
|
|
769
|
+
const hasActionBarSlot = computed(() => {
|
|
770
|
+
return instance?.$slots.actionBar
|
|
771
|
+
})
|
|
566
772
|
|
|
567
|
-
const emit = defineEmits<{
|
|
568
|
-
(e: 'fieldsChange', event: string[]): void
|
|
569
|
-
}>()
|
|
570
773
|
|
|
571
774
|
const loadingInstance = ref()
|
|
572
775
|
watch(() => {
|
|
@@ -581,7 +784,7 @@ watch(() => {
|
|
|
581
784
|
text,
|
|
582
785
|
spinner,
|
|
583
786
|
background,
|
|
584
|
-
customClass
|
|
787
|
+
customClass
|
|
585
788
|
} = props
|
|
586
789
|
loadingInstance.value = Loading.service({
|
|
587
790
|
target: target || elTableRef.value?.$el || document.body,
|
|
@@ -590,51 +793,105 @@ watch(() => {
|
|
|
590
793
|
text,
|
|
591
794
|
spinner,
|
|
592
795
|
background,
|
|
593
|
-
customClass
|
|
796
|
+
customClass
|
|
594
797
|
})
|
|
595
798
|
} else {
|
|
596
|
-
loadingInstance.value?.close()
|
|
799
|
+
loadingInstance.value?.close()
|
|
597
800
|
}
|
|
598
801
|
}, {
|
|
599
802
|
immediate: true
|
|
600
803
|
})
|
|
804
|
+
// 同步用户参数
|
|
805
|
+
const initLocalShow = () => {
|
|
806
|
+
return props.columns.filter(item => {
|
|
807
|
+
const prop = item.prop || item.attr?.prop
|
|
808
|
+
if (props.showColumn?.includes(prop!)) {
|
|
809
|
+
item.initHidden = true
|
|
810
|
+
}
|
|
811
|
+
return item.initHidden
|
|
812
|
+
}).map(item => item.prop! || item.attr?.prop!)
|
|
813
|
+
}
|
|
814
|
+
const localShowColumn = ref<string[]>(initLocalShow())
|
|
815
|
+
watch(() => localShowColumn.value?.length, () => {
|
|
816
|
+
emit('update:showColumn', localShowColumn.value)
|
|
817
|
+
}, {
|
|
818
|
+
immediate: true
|
|
819
|
+
})
|
|
601
820
|
|
|
821
|
+
const syncLocalShowColumnToCookies = () => {
|
|
822
|
+
if (props.columnEdit) {
|
|
823
|
+
const columnState = {}
|
|
824
|
+
props.columns.map((i, index) => {
|
|
825
|
+
const prop = i.prop || i.attr?.prop
|
|
826
|
+
columnState[prop!] = {
|
|
827
|
+
initHidden: i.initHidden || false,
|
|
828
|
+
fixed: i.attr?.fixed || false,
|
|
829
|
+
prop,
|
|
830
|
+
index
|
|
831
|
+
}
|
|
832
|
+
})
|
|
833
|
+
// @ts-ignore
|
|
834
|
+
instance?.$cookies?.set(props.storageKey, JSON.stringify(columnState), -1)
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
const syncCookiesToLocalShowColumn = () => {
|
|
838
|
+
if (props.columnEdit) {
|
|
839
|
+
let columnState: string | NfTableColumnAttributes | null = instance?.$cookies?.get(props.storageKey)
|
|
840
|
+
if (columnState) {
|
|
841
|
+
if (typeof columnState === 'string') {
|
|
842
|
+
columnState = JSON.parse(columnState)
|
|
843
|
+
}
|
|
844
|
+
const showColumnItems: string[] = []
|
|
845
|
+
for (const key in columnState as NfTableColumnAttributes) {
|
|
846
|
+
if (!columnState![key].initHidden) {
|
|
847
|
+
showColumnItems.push(columnState![key].prop)
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
localShowColumn.value = showColumnItems
|
|
602
851
|
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
return instance?.$slots.operation
|
|
625
|
-
})
|
|
626
|
-
const hasActionBarSlot = computed(() => {
|
|
627
|
-
return instance?.$slots.actionBar
|
|
628
|
-
})
|
|
852
|
+
props.columns.forEach(item => {
|
|
853
|
+
const prop = item.prop || item.attr?.prop
|
|
854
|
+
if (localShowColumn.value?.includes(prop!)) {
|
|
855
|
+
item.initHidden = true
|
|
856
|
+
} else {
|
|
857
|
+
item.initHidden = false
|
|
858
|
+
}
|
|
859
|
+
})
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
if (props.columnEdit) {
|
|
864
|
+
// 同步缓存参数
|
|
865
|
+
const cached = instance?.$cookies?.get(props.storageKey)
|
|
866
|
+
const cachedPriority = props.priority === 'cached'
|
|
867
|
+
if (cachedPriority ? cached : localShowColumn.value?.length) {
|
|
868
|
+
cachedPriority ? syncCookiesToLocalShowColumn() : syncLocalShowColumnToCookies()
|
|
869
|
+
} else if (cachedPriority ? localShowColumn.value?.length : cached) {
|
|
870
|
+
cachedPriority ? syncLocalShowColumnToCookies() : syncCookiesToLocalShowColumn()
|
|
871
|
+
}
|
|
872
|
+
}
|
|
629
873
|
|
|
630
|
-
const tableColumns =
|
|
631
|
-
|
|
874
|
+
const tableColumns = ref<NfTableColumnAttributes[]>([])
|
|
875
|
+
const elTableRefKey = ref(Date.now())
|
|
876
|
+
const syncCookiesToTableColumn = () => {
|
|
877
|
+
const columns = props.columns!.map((item, index) => {
|
|
632
878
|
const len = item.label?.length || 0
|
|
633
879
|
const fz = 15 // 每个字大小,其实是每个字的比例值,大概会比字体大小差不多大一点,
|
|
634
880
|
const attr = (item.attr || {}) as ElTableColumnAttributes
|
|
635
|
-
const minWidth = fz * len +
|
|
636
|
-
if (!attr['min-width'] || minWidth > parseFloat(attr['min-width'])) {
|
|
637
|
-
|
|
881
|
+
// const minWidth = fz * len + 32 + (attr.sortable ? 24 : 0)
|
|
882
|
+
// if (!attr['min-width'] || minWidth > parseFloat(attr['min-width'])) {
|
|
883
|
+
// attr['min-width'] = String(minWidth) + 'px' // 字大小乘个数即长度 ,注意不要加px像素,这里minWidth只是一个比例值,不是真正的长度,+32表示th左右两边的内边距
|
|
884
|
+
// }
|
|
885
|
+
// 区分中文、数字、其他字符
|
|
886
|
+
if (!attr['min-width'] && item.label) {
|
|
887
|
+
const fs = 14
|
|
888
|
+
const char = item.label.match(/[\u2E80-\u9FFF]/g)
|
|
889
|
+
const charLen = char ? char.length : 0
|
|
890
|
+
const num = item.label.match(/\d|\./g)
|
|
891
|
+
const numLen = num ? num.length : 0
|
|
892
|
+
const otherLen = item.label.length - charLen - numLen
|
|
893
|
+
const minWidth = fs * (charLen * 1.1 + numLen * 0.65 + otherLen * 0.5) + 32 + (attr.sortable ? 24 : 0)
|
|
894
|
+
attr['min-width'] = String(minWidth) + 'px'
|
|
638
895
|
}
|
|
639
896
|
item.attr = {
|
|
640
897
|
...item.attr,
|
|
@@ -642,15 +899,47 @@ const tableColumns = computed(() => {
|
|
|
642
899
|
} as ElTableColumnAttributes
|
|
643
900
|
delete item.attr.prop
|
|
644
901
|
delete item.attr.label
|
|
645
|
-
|
|
902
|
+
item._index = index
|
|
903
|
+
item.__index = index
|
|
904
|
+
return item
|
|
646
905
|
})
|
|
647
|
-
|
|
648
|
-
|
|
906
|
+
if (props.columnEdit) {
|
|
907
|
+
// 读取缓存 Column 配置
|
|
908
|
+
let columnState: string | NfTableColumnAttributes | null = instance?.$cookies?.get(props.storageKey)
|
|
909
|
+
if (columnState) {
|
|
910
|
+
if (typeof columnState === 'string') {
|
|
911
|
+
columnState = JSON.parse(columnState)
|
|
912
|
+
}
|
|
913
|
+
for (const key in columnState as NfTableColumnAttributes) {
|
|
914
|
+
const state = columnState![key]
|
|
915
|
+
columns.every(i => {
|
|
916
|
+
if (i.prop === key) {
|
|
917
|
+
i.initHidden = state.initHidden
|
|
918
|
+
i.attr ? i.attr['fixed'] = state.fixed : i.attr = { fixed: state.fixed }
|
|
919
|
+
i._index = state.index
|
|
920
|
+
return false
|
|
921
|
+
}
|
|
922
|
+
return true
|
|
923
|
+
})
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
tableColumns.value = columns.sort((a, b) => a._index! - b._index! < 0 ? -1 : a._index! - b._index! > 0 ? 1 : 0)
|
|
928
|
+
elTableRefKey.value = Date.now()
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
syncCookiesToTableColumn()
|
|
649
932
|
|
|
650
933
|
const tableAttrer = computed(() => {
|
|
651
|
-
const obj:Record<string, any> = {
|
|
652
|
-
'header-cell-style':{
|
|
653
|
-
|
|
934
|
+
const obj: Record<string, any> = {
|
|
935
|
+
'header-cell-style': {
|
|
936
|
+
'text-align': 'left',
|
|
937
|
+
'background': '#F5F7FA',
|
|
938
|
+
'height': '48px',
|
|
939
|
+
'color': '#303133',
|
|
940
|
+
'font-size': '14px'
|
|
941
|
+
},
|
|
942
|
+
'cell-style': { 'text-align': 'left' },
|
|
654
943
|
resizable: true,
|
|
655
944
|
border: true,
|
|
656
945
|
...props.tableAttrs
|
|
@@ -659,18 +948,10 @@ const tableAttrer = computed(() => {
|
|
|
659
948
|
return obj
|
|
660
949
|
})
|
|
661
950
|
|
|
662
|
-
const headerDragend = async (newWidth, oldWidth, column, event) => {
|
|
663
|
-
await nextTick()
|
|
664
|
-
if (newWidth < column.minWidth) {
|
|
665
|
-
column.width = column.minWidth
|
|
666
|
-
}
|
|
667
|
-
await props.tableEvents['header-dragend']?.(newWidth, oldWidth, column, event)
|
|
668
|
-
}
|
|
669
|
-
|
|
670
951
|
const tableEventer = computed(() => {
|
|
671
|
-
const obj:Record<string, any> = {
|
|
952
|
+
const obj: Record<string, any> = {
|
|
672
953
|
...props.tableEvents,
|
|
673
|
-
'header-dragend': headerDragend
|
|
954
|
+
'header-dragend': headerDragend
|
|
674
955
|
}
|
|
675
956
|
return obj
|
|
676
957
|
})
|
|
@@ -704,27 +985,26 @@ const pageAttrer = computed(() => {
|
|
|
704
985
|
})
|
|
705
986
|
|
|
706
987
|
const isShow = (row: Record<string, any>) => {
|
|
707
|
-
if (!
|
|
988
|
+
if (!localShowColumn.value?.length || row.type) {
|
|
708
989
|
return true
|
|
709
990
|
}
|
|
710
|
-
return
|
|
991
|
+
return localShowColumn.value.includes(row.prop) && !row.initHidden
|
|
711
992
|
}
|
|
712
993
|
|
|
713
|
-
|
|
714
|
-
const resetNfSearchFormModel = () =>{
|
|
994
|
+
const resetNfSearchFormModel = () => {
|
|
715
995
|
nfSearchFormRef.value?.resetNfSearchFormModel()
|
|
716
996
|
}
|
|
717
|
-
const
|
|
997
|
+
const onNfSearchFormValidate = (callback) => {
|
|
718
998
|
nfSearchFormRef.value?.onNfSearchFormValidate(callback)
|
|
719
999
|
}
|
|
720
|
-
const
|
|
1000
|
+
const onNfSearchFormSearch = () => {
|
|
721
1001
|
nfSearchFormRef.value?.onNfSearchFormSearch()
|
|
722
1002
|
}
|
|
723
|
-
const onNfSearchFormExport = () =>{
|
|
1003
|
+
const onNfSearchFormExport = () => {
|
|
724
1004
|
nfSearchFormRef.value?.onNfSearchFormExport()
|
|
725
1005
|
}
|
|
726
1006
|
|
|
727
|
-
const clearSelection = () =>{
|
|
1007
|
+
const clearSelection = () => {
|
|
728
1008
|
elTableRef.value?.clearSelection()
|
|
729
1009
|
}
|
|
730
1010
|
const toggleRowSelection = (row: Record<string, any>, selected: boolean) => {
|
|
@@ -751,15 +1031,66 @@ const doLayout = () => {
|
|
|
751
1031
|
const sort = (prop, order) => {
|
|
752
1032
|
elTableRef.value?.sort(prop, order)
|
|
753
1033
|
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
1034
|
+
|
|
1035
|
+
const headerDragend = async (newWidth, oldWidth, column, event) => {
|
|
1036
|
+
await nextTick()
|
|
1037
|
+
if (newWidth < column.minWidth) {
|
|
1038
|
+
column.width = column.minWidth
|
|
1039
|
+
}
|
|
1040
|
+
await props.tableEvents['header-dragend']?.(newWidth, oldWidth, column, event)
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
const syncShowItemToInitHidden = () => {
|
|
1044
|
+
props.columns.forEach(item => {
|
|
1045
|
+
if (localShowColumn.value?.includes(item.prop!)) {
|
|
1046
|
+
item.initHidden = false
|
|
1047
|
+
} else {
|
|
1048
|
+
item.initHidden = true
|
|
1049
|
+
}
|
|
1050
|
+
})
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
const columnCheckConfirmFeedback = (value: Record<string, any>) => {
|
|
1054
|
+
if (!props.columnEdit) {
|
|
1055
|
+
const itemsList: string[] = []
|
|
1056
|
+
for (const key in value) {
|
|
1057
|
+
if (value[key]) {
|
|
1058
|
+
itemsList.push(key)
|
|
1059
|
+
}
|
|
759
1060
|
}
|
|
1061
|
+
localShowColumn.value = itemsList
|
|
1062
|
+
syncShowItemToInitHidden()
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* 弹框确定
|
|
1068
|
+
* @param { Object } value
|
|
1069
|
+
*/
|
|
1070
|
+
const fieldsConfirm = (value) => {
|
|
1071
|
+
columnCheckConfirmFeedback(value)
|
|
1072
|
+
syncCookiesToLocalShowColumn()
|
|
1073
|
+
syncCookiesToTableColumn()
|
|
1074
|
+
emit('fieldsChange', localShowColumn.value)
|
|
1075
|
+
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* 抽屉确定
|
|
1079
|
+
* @param { Function } cb
|
|
1080
|
+
* @param { Function } error
|
|
1081
|
+
*/
|
|
1082
|
+
const columnCheckConfirm = (cb, error) => {
|
|
1083
|
+
try {
|
|
1084
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies()
|
|
1085
|
+
columnCheckConfirmFeedback(value)
|
|
1086
|
+
syncCookiesToLocalShowColumn()
|
|
1087
|
+
syncCookiesToTableColumn()
|
|
1088
|
+
emit('fieldsChange', localShowColumn.value)
|
|
1089
|
+
cb()
|
|
1090
|
+
} catch (e) {
|
|
1091
|
+
error()
|
|
1092
|
+
console.log(e)
|
|
760
1093
|
}
|
|
761
|
-
items.value = itemResult
|
|
762
|
-
emit('fieldsChange', itemResult)
|
|
763
1094
|
}
|
|
764
1095
|
|
|
765
1096
|
onMounted(() => {
|
|
@@ -779,28 +1110,130 @@ onMounted(() => {
|
|
|
779
1110
|
|
|
780
1111
|
|
|
781
1112
|
defineExpose({
|
|
1113
|
+
/**
|
|
1114
|
+
* 表格clearFilter
|
|
1115
|
+
*/
|
|
782
1116
|
clearFilter,
|
|
1117
|
+
/**
|
|
1118
|
+
* 表格sort
|
|
1119
|
+
*/
|
|
783
1120
|
sort,
|
|
1121
|
+
/**
|
|
1122
|
+
* 表格doLayout
|
|
1123
|
+
*/
|
|
784
1124
|
doLayout,
|
|
1125
|
+
/**
|
|
1126
|
+
* 表格clearSort
|
|
1127
|
+
*/
|
|
785
1128
|
clearSort,
|
|
1129
|
+
/**
|
|
1130
|
+
* 表格setCurrentRow
|
|
1131
|
+
*/
|
|
786
1132
|
setCurrentRow,
|
|
1133
|
+
/**
|
|
1134
|
+
* 表格toggleRowExpansion
|
|
1135
|
+
*/
|
|
787
1136
|
toggleRowExpansion,
|
|
1137
|
+
/**
|
|
1138
|
+
* 表格toggleAllSelection
|
|
1139
|
+
*/
|
|
788
1140
|
toggleAllSelection,
|
|
1141
|
+
/**
|
|
1142
|
+
* 表格toggleRowSelection
|
|
1143
|
+
*/
|
|
789
1144
|
toggleRowSelection,
|
|
1145
|
+
/**
|
|
1146
|
+
* 表格clearSelection
|
|
1147
|
+
*/
|
|
790
1148
|
clearSelection,
|
|
1149
|
+
/**
|
|
1150
|
+
* 表单重置
|
|
1151
|
+
*/
|
|
1152
|
+
resetNfSearchFormModel,
|
|
1153
|
+
/**
|
|
1154
|
+
* 表单验证
|
|
1155
|
+
*/
|
|
1156
|
+
onNfSearchFormValidate,
|
|
1157
|
+
/**
|
|
1158
|
+
* 表单搜索
|
|
1159
|
+
*/
|
|
1160
|
+
onNfSearchFormSearch,
|
|
1161
|
+
/**
|
|
1162
|
+
* 表单导出
|
|
1163
|
+
*/
|
|
1164
|
+
onNfSearchFormExport,
|
|
1165
|
+
/**
|
|
1166
|
+
* 表格nf-table ref(div)
|
|
1167
|
+
*/
|
|
1168
|
+
nfTableRef,
|
|
1169
|
+
/**
|
|
1170
|
+
* 表格el-table ref
|
|
1171
|
+
*/
|
|
791
1172
|
elTableRef,
|
|
1173
|
+
/**
|
|
1174
|
+
* 表格actionBar ref(div)
|
|
1175
|
+
*/
|
|
792
1176
|
nfTableActionContainerRef,
|
|
793
|
-
|
|
1177
|
+
/**
|
|
1178
|
+
* 表格actionBar ref(slot)
|
|
1179
|
+
*/
|
|
794
1180
|
nfTableActionBarRef,
|
|
795
|
-
|
|
1181
|
+
/**
|
|
1182
|
+
* 表格pagination ref
|
|
1183
|
+
*/
|
|
1184
|
+
nfTablePaginationRef,
|
|
1185
|
+
/**
|
|
1186
|
+
* 表单nf-search-form ref
|
|
1187
|
+
*/
|
|
796
1188
|
nfSearchFormRef,
|
|
797
|
-
|
|
1189
|
+
/**
|
|
1190
|
+
* loadingInstance
|
|
1191
|
+
*/
|
|
798
1192
|
loadingInstance,
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
onNfSearchFormExport,
|
|
1193
|
+
/**
|
|
1194
|
+
* 列编辑dialog/drawer显示/隐藏
|
|
1195
|
+
*/
|
|
803
1196
|
nfColumCheckDialogVisible,
|
|
1197
|
+
/**
|
|
1198
|
+
* 列编辑nf-drawer ref
|
|
1199
|
+
*/
|
|
1200
|
+
columnCheckNfDrawer,
|
|
1201
|
+
/**
|
|
1202
|
+
* 列编辑column-check-dialog ref
|
|
1203
|
+
*/
|
|
1204
|
+
columnCheckDialog,
|
|
1205
|
+
/**
|
|
1206
|
+
* 列编辑column-check-drawer ref
|
|
1207
|
+
*/
|
|
1208
|
+
columnCheckDrawer,
|
|
1209
|
+
/**
|
|
1210
|
+
* showItems同步props.formOptions[i].initHidden
|
|
1211
|
+
*/
|
|
1212
|
+
syncShowItemToInitHidden,
|
|
1213
|
+
/**
|
|
1214
|
+
* 分页数据(处理前端分页和后端分页)
|
|
1215
|
+
*/
|
|
1216
|
+
showData,
|
|
1217
|
+
/**
|
|
1218
|
+
* 列编辑显示的列prop
|
|
1219
|
+
*/
|
|
1220
|
+
localShowColumn,
|
|
1221
|
+
/**
|
|
1222
|
+
* 渲染表格项数据
|
|
1223
|
+
*/
|
|
1224
|
+
tableColumns,
|
|
1225
|
+
/**
|
|
1226
|
+
* 列编辑同步组件到cookies
|
|
1227
|
+
*/
|
|
1228
|
+
syncLocalShowColumnToCookies,
|
|
1229
|
+
/**
|
|
1230
|
+
* 列编辑同步cookies到组件localShowItems
|
|
1231
|
+
*/
|
|
1232
|
+
syncCookiesToLocalShowColumn,
|
|
1233
|
+
/**
|
|
1234
|
+
* 列编辑同步cookies到组件渲染数据
|
|
1235
|
+
*/
|
|
1236
|
+
syncCookiesToTableColumn
|
|
804
1237
|
})
|
|
805
1238
|
|
|
806
1239
|
</script>
|