qidian-vue-ui 1.1.41 → 1.1.43
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/dist/components/crud/search/index.vue.mjs +1 -1
- package/dist/components/crud/search/index.vue2.mjs +4 -4
- package/dist/components/crud/search/index.vue2.mjs.map +1 -1
- package/dist/components/dialog/index.vue.mjs +1 -1
- package/dist/components/dialog/index.vue.mjs.map +1 -1
- package/dist/components/service-dialog-table-select/index.vue.d.ts +28 -0
- package/dist/components/service-dialog-table-select/index.vue.mjs +1 -1
- package/dist/components/service-dialog-table-select/index.vue2.mjs +360 -211
- package/dist/components/service-dialog-table-select/index.vue2.mjs.map +1 -1
- package/dist/components/service-dialog-table-select/types.d.ts +5 -1
- package/dist/components/service-popup-table-select/index.vue.d.ts +28 -0
- package/dist/components/service-popup-table-select/index.vue.mjs +1 -1
- package/dist/components/service-popup-table-select/index.vue2.mjs +350 -192
- package/dist/components/service-popup-table-select/index.vue2.mjs.map +1 -1
- package/dist/components/service-popup-table-select/types.d.ts +5 -1
- package/dist/qidian-vue-ui.css +20 -20
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults, useTemplateRef, ref, reactive, computed, watch, onMounted, createElementBlock, openBlock, Fragment,
|
|
1
|
+
import { defineComponent, mergeDefaults, useTemplateRef, ref, reactive, computed, createVNode, watch, onMounted, createElementBlock, openBlock, Fragment, unref, mergeProps, isRef, withCtx, createSlots, renderList, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { isEmpty, extractSlotsWithPrefix, identifyType } from "qidian-shared";
|
|
3
3
|
import { Select, Input, Space, Button } from "tdesign-vue-next";
|
|
4
|
-
import {
|
|
4
|
+
import { AddIcon, SearchIcon } from "tdesign-icons-vue-next";
|
|
5
5
|
import { qdDialogTableSelectSearchGrid, qdServiceDialogTableSelectProps } from "./props.mjs";
|
|
6
6
|
import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.0.0_vue@3.5.22_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
|
|
7
7
|
import _sfc_main$1 from "../dialog/index.vue.mjs";
|
|
@@ -36,38 +36,68 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
},
|
|
37
37
|
__name: "index",
|
|
38
38
|
props: /* @__PURE__ */ mergeDefaults({
|
|
39
|
-
onCreate: {
|
|
39
|
+
onCreate: {
|
|
40
|
+
type: Function
|
|
41
|
+
},
|
|
40
42
|
tableSize: {},
|
|
41
|
-
visible: {
|
|
43
|
+
visible: {
|
|
44
|
+
type: Boolean
|
|
45
|
+
},
|
|
42
46
|
wrapper: {},
|
|
47
|
+
addBtn: {},
|
|
48
|
+
addConfirmBtn: {},
|
|
49
|
+
addCancelBtn: {},
|
|
50
|
+
addInput: {},
|
|
43
51
|
title: {},
|
|
44
52
|
permiPrefix: {},
|
|
45
53
|
search: {},
|
|
46
54
|
searchData: {},
|
|
47
55
|
detail: {},
|
|
48
|
-
headerBg: {
|
|
56
|
+
headerBg: {
|
|
57
|
+
type: Boolean
|
|
58
|
+
},
|
|
49
59
|
tree: {},
|
|
50
|
-
loadingWithData: {
|
|
51
|
-
|
|
60
|
+
loadingWithData: {
|
|
61
|
+
type: Boolean
|
|
62
|
+
},
|
|
63
|
+
beforeDragSort: {
|
|
64
|
+
type: Function
|
|
65
|
+
},
|
|
52
66
|
expandedTreeNodes: {},
|
|
53
67
|
defaultExpandedTreeNodes: {},
|
|
54
68
|
treeExpandAndFoldIcon: {},
|
|
55
|
-
onAbnormalDragSort: {
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
onAbnormalDragSort: {
|
|
70
|
+
type: Function
|
|
71
|
+
},
|
|
72
|
+
onExpandedTreeNodesChange: {
|
|
73
|
+
type: Function
|
|
74
|
+
},
|
|
75
|
+
onTreeExpandChange: {
|
|
76
|
+
type: Function
|
|
77
|
+
},
|
|
58
78
|
asyncLoading: {},
|
|
59
79
|
columnController: {},
|
|
60
|
-
columnControllerVisible: {
|
|
61
|
-
|
|
80
|
+
columnControllerVisible: {
|
|
81
|
+
type: Boolean
|
|
82
|
+
},
|
|
83
|
+
defaultColumnControllerVisible: {
|
|
84
|
+
type: Boolean
|
|
85
|
+
},
|
|
62
86
|
columns: {},
|
|
63
87
|
displayColumns: {},
|
|
64
88
|
defaultDisplayColumns: {},
|
|
65
89
|
dragSort: {},
|
|
66
90
|
dragSortOptions: {},
|
|
67
|
-
editableCellState: {
|
|
91
|
+
editableCellState: {
|
|
92
|
+
type: Function
|
|
93
|
+
},
|
|
68
94
|
editableRowKeys: {},
|
|
69
|
-
expandIcon: {
|
|
70
|
-
|
|
95
|
+
expandIcon: {
|
|
96
|
+
type: Boolean
|
|
97
|
+
},
|
|
98
|
+
expandOnRowClick: {
|
|
99
|
+
type: Boolean
|
|
100
|
+
},
|
|
71
101
|
expandedRow: {},
|
|
72
102
|
expandedRowKeys: {},
|
|
73
103
|
defaultExpandedRowKeys: {},
|
|
@@ -75,101 +105,215 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
105
|
filterRow: {},
|
|
76
106
|
filterValue: {},
|
|
77
107
|
defaultFilterValue: {},
|
|
78
|
-
hideSortTips: {
|
|
108
|
+
hideSortTips: {
|
|
109
|
+
type: Boolean
|
|
110
|
+
},
|
|
79
111
|
indeterminateSelectedRowKeys: {},
|
|
80
|
-
multipleSort: {
|
|
81
|
-
|
|
112
|
+
multipleSort: {
|
|
113
|
+
type: Boolean
|
|
114
|
+
},
|
|
115
|
+
rowSelectionAllowUncheck: {
|
|
116
|
+
type: Boolean
|
|
117
|
+
},
|
|
82
118
|
rowSelectionType: {},
|
|
83
|
-
selectOnRowClick: {
|
|
119
|
+
selectOnRowClick: {
|
|
120
|
+
type: Boolean
|
|
121
|
+
},
|
|
84
122
|
defaultSelectedRowKeys: {},
|
|
85
|
-
showSortColumnBgColor: {
|
|
123
|
+
showSortColumnBgColor: {
|
|
124
|
+
type: Boolean
|
|
125
|
+
},
|
|
86
126
|
sort: {},
|
|
87
127
|
defaultSort: {},
|
|
88
128
|
sortIcon: {},
|
|
89
|
-
sortOnRowDraggable: {
|
|
129
|
+
sortOnRowDraggable: {
|
|
130
|
+
type: Boolean
|
|
131
|
+
},
|
|
90
132
|
defaultActiveRowKeys: {},
|
|
91
|
-
allowResizeColumnWidth: {
|
|
92
|
-
|
|
93
|
-
|
|
133
|
+
allowResizeColumnWidth: {
|
|
134
|
+
type: Boolean
|
|
135
|
+
},
|
|
136
|
+
attach: {
|
|
137
|
+
type: [String, Function]
|
|
138
|
+
},
|
|
139
|
+
bordered: {
|
|
140
|
+
type: Boolean
|
|
141
|
+
},
|
|
94
142
|
bottomContent: {},
|
|
95
143
|
cellEmptyContent: {},
|
|
96
144
|
data: {},
|
|
97
|
-
disableDataPage: {
|
|
98
|
-
|
|
145
|
+
disableDataPage: {
|
|
146
|
+
type: Boolean
|
|
147
|
+
},
|
|
148
|
+
disableSpaceInactiveRow: {
|
|
149
|
+
type: Boolean
|
|
150
|
+
},
|
|
99
151
|
empty: {},
|
|
100
152
|
firstFullRow: {},
|
|
101
153
|
fixedRows: {},
|
|
102
154
|
footData: {},
|
|
103
155
|
footerAffixProps: {},
|
|
104
|
-
footerAffixedBottom: {
|
|
156
|
+
footerAffixedBottom: {
|
|
157
|
+
type: [Boolean, Object]
|
|
158
|
+
},
|
|
105
159
|
footerSummary: {},
|
|
106
160
|
headerAffixProps: {},
|
|
107
|
-
headerAffixedTop: {
|
|
161
|
+
headerAffixedTop: {
|
|
162
|
+
type: [Boolean, Object]
|
|
163
|
+
},
|
|
108
164
|
height: {},
|
|
109
|
-
horizontalScrollAffixedBottom: {
|
|
110
|
-
|
|
111
|
-
|
|
165
|
+
horizontalScrollAffixedBottom: {
|
|
166
|
+
type: [Boolean, Object]
|
|
167
|
+
},
|
|
168
|
+
hover: {
|
|
169
|
+
type: Boolean
|
|
170
|
+
},
|
|
171
|
+
keyboardRowHover: {
|
|
172
|
+
type: Boolean
|
|
173
|
+
},
|
|
112
174
|
lastFullRow: {},
|
|
113
|
-
lazyLoad: {
|
|
114
|
-
|
|
175
|
+
lazyLoad: {
|
|
176
|
+
type: Boolean
|
|
177
|
+
},
|
|
178
|
+
loading: {
|
|
179
|
+
type: Boolean
|
|
180
|
+
},
|
|
115
181
|
loadingProps: {},
|
|
116
182
|
locale: {},
|
|
117
183
|
maxHeight: {},
|
|
118
|
-
paginationAffixedBottom: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
184
|
+
paginationAffixedBottom: {
|
|
185
|
+
type: [Boolean, Object]
|
|
186
|
+
},
|
|
187
|
+
resizable: {
|
|
188
|
+
type: Boolean
|
|
189
|
+
},
|
|
190
|
+
rowAttributes: {
|
|
191
|
+
type: [Object, Function, Array]
|
|
192
|
+
},
|
|
193
|
+
rowClassName: {
|
|
194
|
+
type: [Object, Array, String, Function]
|
|
195
|
+
},
|
|
196
|
+
rowspanAndColspan: {
|
|
197
|
+
type: Function
|
|
198
|
+
},
|
|
199
|
+
rowspanAndColspanInFooter: {
|
|
200
|
+
type: Function
|
|
201
|
+
},
|
|
124
202
|
scroll: {},
|
|
125
|
-
showHeader: {
|
|
126
|
-
|
|
203
|
+
showHeader: {
|
|
204
|
+
type: Boolean
|
|
205
|
+
},
|
|
206
|
+
stripe: {
|
|
207
|
+
type: Boolean
|
|
208
|
+
},
|
|
127
209
|
tableContentWidth: {},
|
|
128
210
|
tableLayout: {},
|
|
129
211
|
topContent: {},
|
|
130
212
|
verticalAlign: {},
|
|
131
|
-
onActiveChange: {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
213
|
+
onActiveChange: {
|
|
214
|
+
type: Function
|
|
215
|
+
},
|
|
216
|
+
onActiveRowAction: {
|
|
217
|
+
type: Function
|
|
218
|
+
},
|
|
219
|
+
onColumnResizeChange: {
|
|
220
|
+
type: Function
|
|
221
|
+
},
|
|
222
|
+
onPageChange: {
|
|
223
|
+
type: Function
|
|
224
|
+
},
|
|
225
|
+
onRowClick: {
|
|
226
|
+
type: Function
|
|
227
|
+
},
|
|
228
|
+
onRowDblclick: {
|
|
229
|
+
type: Function
|
|
230
|
+
},
|
|
231
|
+
onRowMousedown: {
|
|
232
|
+
type: Function
|
|
233
|
+
},
|
|
234
|
+
onRowMouseenter: {
|
|
235
|
+
type: Function
|
|
236
|
+
},
|
|
237
|
+
onRowMouseleave: {
|
|
238
|
+
type: Function
|
|
239
|
+
},
|
|
240
|
+
onRowMouseover: {
|
|
241
|
+
type: Function
|
|
242
|
+
},
|
|
243
|
+
onRowMouseup: {
|
|
244
|
+
type: Function
|
|
245
|
+
},
|
|
246
|
+
onScroll: {
|
|
247
|
+
type: Function
|
|
248
|
+
},
|
|
249
|
+
onScrollX: {
|
|
250
|
+
type: Function
|
|
251
|
+
},
|
|
252
|
+
onScrollY: {
|
|
253
|
+
type: Function
|
|
254
|
+
},
|
|
255
|
+
cacheKey: {
|
|
256
|
+
type: [String, Function]
|
|
257
|
+
},
|
|
146
258
|
cacheTime: {},
|
|
147
259
|
pollingInterval: {},
|
|
148
|
-
onBefore: {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
260
|
+
onBefore: {
|
|
261
|
+
type: Function
|
|
262
|
+
},
|
|
263
|
+
onAfter: {
|
|
264
|
+
type: Function
|
|
265
|
+
},
|
|
266
|
+
onSuccess: {
|
|
267
|
+
type: Function
|
|
268
|
+
},
|
|
269
|
+
onError: {
|
|
270
|
+
type: Function
|
|
271
|
+
},
|
|
272
|
+
service: {
|
|
273
|
+
type: Function
|
|
274
|
+
},
|
|
275
|
+
manual: {
|
|
276
|
+
type: Boolean
|
|
277
|
+
},
|
|
278
|
+
transformParams: {
|
|
279
|
+
type: Function
|
|
280
|
+
},
|
|
281
|
+
transformRes: {
|
|
282
|
+
type: Function
|
|
283
|
+
},
|
|
156
284
|
pagination: {},
|
|
157
285
|
modelValue: {},
|
|
158
|
-
multiple: {
|
|
159
|
-
|
|
160
|
-
|
|
286
|
+
multiple: {
|
|
287
|
+
type: Boolean
|
|
288
|
+
},
|
|
289
|
+
readonly: {
|
|
290
|
+
type: Boolean
|
|
291
|
+
},
|
|
292
|
+
disabled: {
|
|
293
|
+
type: Boolean
|
|
294
|
+
},
|
|
161
295
|
placeholder: {},
|
|
162
|
-
clearable: {
|
|
163
|
-
|
|
296
|
+
clearable: {
|
|
297
|
+
type: Boolean
|
|
298
|
+
},
|
|
299
|
+
creatable: {
|
|
300
|
+
type: Boolean
|
|
301
|
+
},
|
|
164
302
|
keys: {},
|
|
165
303
|
size: {},
|
|
166
304
|
valueType: {},
|
|
167
305
|
fillOptions: {},
|
|
168
|
-
onClear: {
|
|
169
|
-
|
|
306
|
+
onClear: {
|
|
307
|
+
type: Function
|
|
308
|
+
},
|
|
309
|
+
onChange: {
|
|
310
|
+
type: Function
|
|
311
|
+
}
|
|
170
312
|
}, qdServiceDialogTableSelectProps),
|
|
171
313
|
emits: ["update:modelValue", "update:visible", "update:searchData", "update:data", "update:columnControllerVisible", "update:displayColumns", "update:expandedRowKeys", "update:filterValue", "update:sort", "update:expandedTreeNodes"],
|
|
172
|
-
setup(__props, {
|
|
314
|
+
setup(__props, {
|
|
315
|
+
emit: __emit
|
|
316
|
+
}) {
|
|
173
317
|
const props = __props;
|
|
174
318
|
const emit = __emit;
|
|
175
319
|
const {
|
|
@@ -186,7 +330,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
186
330
|
} = useVModels(props, emit, {
|
|
187
331
|
passive: true
|
|
188
332
|
});
|
|
189
|
-
const {
|
|
333
|
+
const {
|
|
334
|
+
t
|
|
335
|
+
} = useConfig("dialogTableSelect");
|
|
190
336
|
const tdReadonly = useReadonly();
|
|
191
337
|
const tdDisabled = useDisabled();
|
|
192
338
|
const dialogRef = useTemplateRef("dialog");
|
|
@@ -226,8 +372,46 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
226
372
|
onChange,
|
|
227
373
|
search,
|
|
228
374
|
tableSize,
|
|
375
|
+
addBtn,
|
|
376
|
+
addConfirmBtn,
|
|
377
|
+
addCancelBtn,
|
|
378
|
+
addInput,
|
|
229
379
|
...tableOptions
|
|
230
380
|
} = props;
|
|
381
|
+
const addBtnOptions = merge({}, {
|
|
382
|
+
block: true,
|
|
383
|
+
theme: "primary",
|
|
384
|
+
variant: "dashed",
|
|
385
|
+
icon: () => createVNode(AddIcon, null, null),
|
|
386
|
+
content: t("addText"),
|
|
387
|
+
onClick: () => {
|
|
388
|
+
addCustom.visible = true;
|
|
389
|
+
}
|
|
390
|
+
}, typeof addBtn === "string" ? {
|
|
391
|
+
content: addBtn
|
|
392
|
+
} : addBtn);
|
|
393
|
+
const addConfirmBtnOptions = merge({}, {
|
|
394
|
+
content: t("addConfirmText"),
|
|
395
|
+
onClick: confirmAddCustom
|
|
396
|
+
}, typeof addConfirmBtn === "string" ? {
|
|
397
|
+
content: addConfirmBtn,
|
|
398
|
+
disabled: addConfirmDisabled.value
|
|
399
|
+
} : {
|
|
400
|
+
...addConfirmBtn,
|
|
401
|
+
disabled: addConfirmDisabled.value || addConfirmBtn?.disabled
|
|
402
|
+
});
|
|
403
|
+
const addCancelBtnOptions = merge({}, {
|
|
404
|
+
variant: "outline",
|
|
405
|
+
content: t("addCancelText"),
|
|
406
|
+
onClick: cancelAddCustom
|
|
407
|
+
}, typeof addCancelBtn === "string" ? {
|
|
408
|
+
content: addCancelBtn
|
|
409
|
+
} : addCancelBtn);
|
|
410
|
+
const addInputOptions = merge({}, {
|
|
411
|
+
clearable: true
|
|
412
|
+
}, typeof addInput === "string" ? {
|
|
413
|
+
placeholder: addInput
|
|
414
|
+
} : addInput);
|
|
231
415
|
return {
|
|
232
416
|
creatable,
|
|
233
417
|
fillOptions,
|
|
@@ -255,6 +439,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
255
439
|
onClear,
|
|
256
440
|
onCreate,
|
|
257
441
|
onChange,
|
|
442
|
+
addBtnOptions,
|
|
443
|
+
addConfirmBtnOptions,
|
|
444
|
+
addCancelBtnOptions,
|
|
445
|
+
addInputOptions,
|
|
258
446
|
models: {
|
|
259
447
|
modelValue: modelValue2,
|
|
260
448
|
visible: visible2,
|
|
@@ -276,7 +464,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
276
464
|
function handleConfirm() {
|
|
277
465
|
selectedRows.value = latestSelectedRows;
|
|
278
466
|
visible.value = false;
|
|
279
|
-
const {
|
|
467
|
+
const {
|
|
468
|
+
selectOptions
|
|
469
|
+
} = reProps.value;
|
|
280
470
|
const valueKey = selectOptions.keys?.value || qdServiceSelectKeys.value;
|
|
281
471
|
const labelKey = selectOptions.keys?.label || qdServiceSelectKeys.label;
|
|
282
472
|
if (selectOptions.valueType === "value") {
|
|
@@ -295,7 +485,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
295
485
|
});
|
|
296
486
|
}
|
|
297
487
|
function openDialog() {
|
|
298
|
-
const {
|
|
488
|
+
const {
|
|
489
|
+
selectOptions
|
|
490
|
+
} = reProps.value;
|
|
299
491
|
if (selectOptions.readonly || selectOptions.disabled) return;
|
|
300
492
|
const valueKey = selectOptions.keys?.value || qdServiceSelectKeys.value;
|
|
301
493
|
if (identifyType(modelValue.value) === "array") {
|
|
@@ -324,7 +516,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
516
|
}
|
|
325
517
|
function confirmAddCustom(e) {
|
|
326
518
|
reProps.value.onCreate?.(addCustom.value, (closed) => {
|
|
327
|
-
visible.value = closed
|
|
519
|
+
visible.value = !closed;
|
|
328
520
|
});
|
|
329
521
|
reProps.value.onChange?.(void 0, {
|
|
330
522
|
e,
|
|
@@ -351,145 +543,102 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
351
543
|
}
|
|
352
544
|
}
|
|
353
545
|
const expose = {};
|
|
354
|
-
fillOptionsWatchStop = watch(
|
|
355
|
-
()
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
);
|
|
546
|
+
fillOptionsWatchStop = watch(() => reProps.value.fillOptions, (fillOpts) => {
|
|
547
|
+
if (!fillOpts?.length) return;
|
|
548
|
+
selectedRows.value = fillOpts;
|
|
549
|
+
}, {
|
|
550
|
+
immediate: true,
|
|
551
|
+
deep: true
|
|
552
|
+
});
|
|
362
553
|
onMounted(() => {
|
|
363
554
|
Object.assign(expose, dialogRef.value);
|
|
364
555
|
});
|
|
365
556
|
return (_ctx, _cache) => {
|
|
366
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
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
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
_: 1
|
|
452
|
-
})
|
|
453
|
-
])) : (openBlock(), createBlock(unref(Button), {
|
|
454
|
-
key: 1,
|
|
455
|
-
class: "qd-dialog-table-select__table-add",
|
|
456
|
-
block: "",
|
|
457
|
-
theme: "primary",
|
|
458
|
-
variant: "dashed",
|
|
459
|
-
onClick: _cache[2] || (_cache[2] = ($event) => addCustom.visible = true)
|
|
460
|
-
}, {
|
|
461
|
-
icon: withCtx(() => [
|
|
462
|
-
createVNode(unref(AddIcon))
|
|
463
|
-
]),
|
|
464
|
-
default: withCtx(() => [
|
|
465
|
-
createTextVNode(" " + toDisplayString(unref(t)("addText")), 1)
|
|
466
|
-
]),
|
|
467
|
-
_: 1
|
|
468
|
-
}))
|
|
469
|
-
]),
|
|
470
|
-
key: "0"
|
|
471
|
-
} : void 0,
|
|
472
|
-
renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "search"), (item) => {
|
|
473
|
-
return {
|
|
474
|
-
name: item.filterName,
|
|
475
|
-
fn: withCtx((slotProps) => [
|
|
476
|
-
renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
477
|
-
])
|
|
478
|
-
};
|
|
479
|
-
}),
|
|
480
|
-
renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "table"), (item) => {
|
|
481
|
-
return {
|
|
482
|
-
name: item.filterName,
|
|
483
|
-
fn: withCtx((slotProps) => [
|
|
484
|
-
renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)
|
|
485
|
-
])
|
|
486
|
-
};
|
|
487
|
-
})
|
|
488
|
-
]), 1040, ["search-data", "data", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-rowKeys", "filter-value", "sort", "expanded-tree-nodes"])
|
|
489
|
-
]),
|
|
490
|
-
_: 3
|
|
491
|
-
}, 16, ["visible"])
|
|
492
|
-
], 64);
|
|
557
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(Select), mergeProps({
|
|
558
|
+
class: ["qd-dialog-table-select", reProps.value.selectOptions.readonly ? "qd-dialog-table-select--readonly" : "", reProps.value.selectOptions.disabled ? "qd-dialog-table-select--disabled" : ""],
|
|
559
|
+
modelValue: unref(modelValue),
|
|
560
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
561
|
+
options: selectedRows.value,
|
|
562
|
+
"popup-visible": false
|
|
563
|
+
}, reProps.value.selectOptions, {
|
|
564
|
+
onClick: openDialog,
|
|
565
|
+
onClear: handleClear
|
|
566
|
+
}), {
|
|
567
|
+
suffixIcon: withCtx(() => [createVNode(unref(SearchIcon))]),
|
|
568
|
+
_: 1
|
|
569
|
+
}, 16, ["class", "modelValue", "options"]), createVNode(unref(_sfc_main$1), mergeProps({
|
|
570
|
+
ref: "dialog",
|
|
571
|
+
visible: unref(visible),
|
|
572
|
+
"onUpdate:visible": _cache[12] || (_cache[12] = ($event) => isRef(visible) ? visible.value = $event : null)
|
|
573
|
+
}, reProps.value.dialogOptions, {
|
|
574
|
+
onConfirm: handleConfirm,
|
|
575
|
+
onBeforeOpen: handleBeforeOpen,
|
|
576
|
+
onClosed: handleClosed
|
|
577
|
+
}), {
|
|
578
|
+
default: withCtx(() => [createVNode(unref(QdCrudTable), mergeProps({
|
|
579
|
+
class: "qd-dialog-table-select__table",
|
|
580
|
+
"search-data": unref(searchData),
|
|
581
|
+
"onUpdate:searchData": _cache[2] || (_cache[2] = ($event) => isRef(searchData) ? searchData.value = $event : null),
|
|
582
|
+
data: unref(data),
|
|
583
|
+
"onUpdate:data": _cache[3] || (_cache[3] = ($event) => isRef(data) ? data.value = $event : null),
|
|
584
|
+
"selected-row-keys": selectedRowKeys.value,
|
|
585
|
+
"onUpdate:selectedRowKeys": _cache[4] || (_cache[4] = ($event) => selectedRowKeys.value = $event),
|
|
586
|
+
"active-row-keys": selectedRowKeys.value,
|
|
587
|
+
"onUpdate:activeRowKeys": _cache[5] || (_cache[5] = ($event) => selectedRowKeys.value = $event),
|
|
588
|
+
"column-controller-visible": unref(columnControllerVisible),
|
|
589
|
+
"onUpdate:columnControllerVisible": _cache[6] || (_cache[6] = ($event) => isRef(columnControllerVisible) ? columnControllerVisible.value = $event : null),
|
|
590
|
+
"display-columns": unref(displayColumns),
|
|
591
|
+
"onUpdate:displayColumns": _cache[7] || (_cache[7] = ($event) => isRef(displayColumns) ? displayColumns.value = $event : null),
|
|
592
|
+
"expanded-rowKeys": unref(expandedRowKeys),
|
|
593
|
+
"onUpdate:expandedRowKeys": _cache[8] || (_cache[8] = ($event) => isRef(expandedRowKeys) ? expandedRowKeys.value = $event : null),
|
|
594
|
+
"filter-value": unref(filterValue),
|
|
595
|
+
"onUpdate:filterValue": _cache[9] || (_cache[9] = ($event) => isRef(filterValue) ? filterValue.value = $event : null),
|
|
596
|
+
sort: unref(sort),
|
|
597
|
+
"onUpdate:sort": _cache[10] || (_cache[10] = ($event) => isRef(sort) ? sort.value = $event : null),
|
|
598
|
+
"expanded-tree-nodes": unref(expandedTreeNodes),
|
|
599
|
+
"onUpdate:expandedTreeNodes": _cache[11] || (_cache[11] = ($event) => isRef(expandedTreeNodes) ? expandedTreeNodes.value = $event : null),
|
|
600
|
+
"reserve-selected-row-on-paginate": "",
|
|
601
|
+
"active-row-type": "multiple"
|
|
602
|
+
}, reProps.value.tableOptions, {
|
|
603
|
+
onSelectChange: handleSelectChange
|
|
604
|
+
}), createSlots({
|
|
605
|
+
_: 2
|
|
606
|
+
}, [reProps.value.creatable ? {
|
|
607
|
+
name: "table-bottom-content",
|
|
608
|
+
fn: withCtx(() => [addCustom.visible ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "add-input", {
|
|
609
|
+
addCustom
|
|
610
|
+
}, () => [createVNode(unref(Input), mergeProps({
|
|
611
|
+
modelValue: addCustom.value,
|
|
612
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => addCustom.value = $event)
|
|
613
|
+
}, reProps.value.addInputOptions), null, 16, ["modelValue"])], true), createVNode(unref(Space), {
|
|
614
|
+
size: "small"
|
|
615
|
+
}, {
|
|
616
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "add-confirm-btn", {
|
|
617
|
+
addCustom
|
|
618
|
+
}, () => [createVNode(unref(Button), normalizeProps(guardReactiveProps(reProps.value.addConfirmBtnOptions)), null, 16)], true), renderSlot(_ctx.$slots, "add-cancel-btn", {
|
|
619
|
+
addCustom
|
|
620
|
+
}, () => [createVNode(unref(Button), normalizeProps(guardReactiveProps(reProps.value.addCancelBtnOptions)), null, 16)], true)]),
|
|
621
|
+
_: 3
|
|
622
|
+
})])) : renderSlot(_ctx.$slots, "add-btn", {
|
|
623
|
+
key: 1,
|
|
624
|
+
addCustom
|
|
625
|
+
}, () => [createVNode(unref(Button), mergeProps({
|
|
626
|
+
class: "qd-dialog-table-select__table-add"
|
|
627
|
+
}, reProps.value.addBtnOptions), null, 16)], true)]),
|
|
628
|
+
key: "0"
|
|
629
|
+
} : void 0, renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "search"), (item) => {
|
|
630
|
+
return {
|
|
631
|
+
name: item.filterName,
|
|
632
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)])
|
|
633
|
+
};
|
|
634
|
+
}), renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "table"), (item) => {
|
|
635
|
+
return {
|
|
636
|
+
name: item.filterName,
|
|
637
|
+
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)])
|
|
638
|
+
};
|
|
639
|
+
})]), 1040, ["search-data", "data", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-rowKeys", "filter-value", "sort", "expanded-tree-nodes"])]),
|
|
640
|
+
_: 3
|
|
641
|
+
}, 16, ["visible"])], 64);
|
|
493
642
|
};
|
|
494
643
|
}
|
|
495
644
|
});
|