qidian-vue-ui 1.1.40 → 1.1.42

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.
@@ -1,7 +1,7 @@
1
- import { defineComponent, mergeDefaults, useTemplateRef, ref, reactive, computed, watch, onMounted, createElementBlock, openBlock, Fragment, createVNode, unref, mergeProps, isRef, withCtx, createSlots, renderList, createBlock, createTextVNode, toDisplayString, renderSlot, normalizeProps, guardReactiveProps } from "vue";
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 { SearchIcon, AddIcon } from "tdesign-icons-vue-next";
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: { type: Function },
39
+ onCreate: {
40
+ type: Function
41
+ },
40
42
  tableSize: {},
41
- visible: { type: Boolean },
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: { type: Boolean },
56
+ headerBg: {
57
+ type: Boolean
58
+ },
49
59
  tree: {},
50
- loadingWithData: { type: Boolean },
51
- beforeDragSort: { type: Function },
60
+ loadingWithData: {
61
+ type: Boolean
62
+ },
63
+ beforeDragSort: {
64
+ type: Function
65
+ },
52
66
  expandedTreeNodes: {},
53
67
  defaultExpandedTreeNodes: {},
54
68
  treeExpandAndFoldIcon: {},
55
- onAbnormalDragSort: { type: Function },
56
- onExpandedTreeNodesChange: { type: Function },
57
- onTreeExpandChange: { type: Function },
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: { type: Boolean },
61
- defaultColumnControllerVisible: { type: Boolean },
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: { type: Function },
91
+ editableCellState: {
92
+ type: Function
93
+ },
68
94
  editableRowKeys: {},
69
- expandIcon: { type: Boolean },
70
- expandOnRowClick: { type: Boolean },
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: { type: Boolean },
108
+ hideSortTips: {
109
+ type: Boolean
110
+ },
79
111
  indeterminateSelectedRowKeys: {},
80
- multipleSort: { type: Boolean },
81
- rowSelectionAllowUncheck: { type: Boolean },
112
+ multipleSort: {
113
+ type: Boolean
114
+ },
115
+ rowSelectionAllowUncheck: {
116
+ type: Boolean
117
+ },
82
118
  rowSelectionType: {},
83
- selectOnRowClick: { type: Boolean },
119
+ selectOnRowClick: {
120
+ type: Boolean
121
+ },
84
122
  defaultSelectedRowKeys: {},
85
- showSortColumnBgColor: { type: Boolean },
123
+ showSortColumnBgColor: {
124
+ type: Boolean
125
+ },
86
126
  sort: {},
87
127
  defaultSort: {},
88
128
  sortIcon: {},
89
- sortOnRowDraggable: { type: Boolean },
129
+ sortOnRowDraggable: {
130
+ type: Boolean
131
+ },
90
132
  defaultActiveRowKeys: {},
91
- allowResizeColumnWidth: { type: Boolean },
92
- attach: { type: [String, Function] },
93
- bordered: { type: Boolean },
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: { type: Boolean },
98
- disableSpaceInactiveRow: { type: Boolean },
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: { type: [Boolean, Object] },
156
+ footerAffixedBottom: {
157
+ type: [Boolean, Object]
158
+ },
105
159
  footerSummary: {},
106
160
  headerAffixProps: {},
107
- headerAffixedTop: { type: [Boolean, Object] },
161
+ headerAffixedTop: {
162
+ type: [Boolean, Object]
163
+ },
108
164
  height: {},
109
- horizontalScrollAffixedBottom: { type: [Boolean, Object] },
110
- hover: { type: Boolean },
111
- keyboardRowHover: { type: Boolean },
165
+ horizontalScrollAffixedBottom: {
166
+ type: [Boolean, Object]
167
+ },
168
+ hover: {
169
+ type: Boolean
170
+ },
171
+ keyboardRowHover: {
172
+ type: Boolean
173
+ },
112
174
  lastFullRow: {},
113
- lazyLoad: { type: Boolean },
114
- loading: { type: Boolean },
175
+ lazyLoad: {
176
+ type: Boolean
177
+ },
178
+ loading: {
179
+ type: Boolean
180
+ },
115
181
  loadingProps: {},
116
182
  locale: {},
117
183
  maxHeight: {},
118
- paginationAffixedBottom: { type: [Boolean, Object] },
119
- resizable: { type: Boolean },
120
- rowAttributes: { type: [Object, Function, Array] },
121
- rowClassName: { type: [Object, Array, String, Function] },
122
- rowspanAndColspan: { type: Function },
123
- rowspanAndColspanInFooter: { type: Function },
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: { type: Boolean },
126
- stripe: { type: Boolean },
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: { type: Function },
132
- onActiveRowAction: { type: Function },
133
- onColumnResizeChange: { type: Function },
134
- onPageChange: { type: Function },
135
- onRowClick: { type: Function },
136
- onRowDblclick: { type: Function },
137
- onRowMousedown: { type: Function },
138
- onRowMouseenter: { type: Function },
139
- onRowMouseleave: { type: Function },
140
- onRowMouseover: { type: Function },
141
- onRowMouseup: { type: Function },
142
- onScroll: { type: Function },
143
- onScrollX: { type: Function },
144
- onScrollY: { type: Function },
145
- cacheKey: { type: [String, Function] },
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: { type: Function },
149
- onAfter: { type: Function },
150
- onSuccess: { type: Function },
151
- onError: { type: Function },
152
- service: { type: Function },
153
- manual: { type: Boolean },
154
- transformParams: { type: Function },
155
- transformRes: { type: Function },
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: { type: Boolean },
159
- readonly: { type: Boolean },
160
- disabled: { type: Boolean },
286
+ multiple: {
287
+ type: Boolean
288
+ },
289
+ readonly: {
290
+ type: Boolean
291
+ },
292
+ disabled: {
293
+ type: Boolean
294
+ },
161
295
  placeholder: {},
162
- clearable: { type: Boolean },
163
- creatable: { type: Boolean },
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: { type: Function },
169
- onChange: { type: Function }
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, { emit: __emit }) {
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 { t } = useConfig("dialogTableSelect");
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 { selectOptions } = reProps.value;
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 { selectOptions } = reProps.value;
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") {
@@ -351,145 +543,102 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
351
543
  }
352
544
  }
353
545
  const expose = {};
354
- fillOptionsWatchStop = watch(
355
- () => reProps.value.fillOptions,
356
- (fillOpts) => {
357
- if (!fillOpts?.length) return;
358
- selectedRows.value = fillOpts;
359
- },
360
- { immediate: true, deep: true }
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
- createVNode(unref(Select), mergeProps({
368
- class: [
369
- "qd-dialog-table-select",
370
- reProps.value.selectOptions.readonly ? "qd-dialog-table-select--readonly" : "",
371
- reProps.value.selectOptions.disabled ? "qd-dialog-table-select--disabled" : ""
372
- ],
373
- modelValue: unref(modelValue),
374
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
375
- options: selectedRows.value,
376
- "popup-visible": false
377
- }, reProps.value.selectOptions, {
378
- onClick: openDialog,
379
- onClear: handleClear
380
- }), {
381
- suffixIcon: withCtx(() => [
382
- createVNode(unref(SearchIcon))
383
- ]),
384
- _: 1
385
- }, 16, ["class", "modelValue", "options"]),
386
- createVNode(unref(_sfc_main$1), mergeProps({
387
- ref: "dialog",
388
- visible: unref(visible),
389
- "onUpdate:visible": _cache[13] || (_cache[13] = ($event) => isRef(visible) ? visible.value = $event : null)
390
- }, reProps.value.dialogOptions, {
391
- onConfirm: handleConfirm,
392
- onBeforeOpen: handleBeforeOpen,
393
- onClosed: handleClosed
394
- }), {
395
- default: withCtx(() => [
396
- createVNode(unref(QdCrudTable), mergeProps({
397
- class: "qd-dialog-table-select__table",
398
- "search-data": unref(searchData),
399
- "onUpdate:searchData": _cache[3] || (_cache[3] = ($event) => isRef(searchData) ? searchData.value = $event : null),
400
- data: unref(data),
401
- "onUpdate:data": _cache[4] || (_cache[4] = ($event) => isRef(data) ? data.value = $event : null),
402
- "selected-row-keys": selectedRowKeys.value,
403
- "onUpdate:selectedRowKeys": _cache[5] || (_cache[5] = ($event) => selectedRowKeys.value = $event),
404
- "active-row-keys": selectedRowKeys.value,
405
- "onUpdate:activeRowKeys": _cache[6] || (_cache[6] = ($event) => selectedRowKeys.value = $event),
406
- "column-controller-visible": unref(columnControllerVisible),
407
- "onUpdate:columnControllerVisible": _cache[7] || (_cache[7] = ($event) => isRef(columnControllerVisible) ? columnControllerVisible.value = $event : null),
408
- "display-columns": unref(displayColumns),
409
- "onUpdate:displayColumns": _cache[8] || (_cache[8] = ($event) => isRef(displayColumns) ? displayColumns.value = $event : null),
410
- "expanded-rowKeys": unref(expandedRowKeys),
411
- "onUpdate:expandedRowKeys": _cache[9] || (_cache[9] = ($event) => isRef(expandedRowKeys) ? expandedRowKeys.value = $event : null),
412
- "filter-value": unref(filterValue),
413
- "onUpdate:filterValue": _cache[10] || (_cache[10] = ($event) => isRef(filterValue) ? filterValue.value = $event : null),
414
- sort: unref(sort),
415
- "onUpdate:sort": _cache[11] || (_cache[11] = ($event) => isRef(sort) ? sort.value = $event : null),
416
- "expanded-tree-nodes": unref(expandedTreeNodes),
417
- "onUpdate:expandedTreeNodes": _cache[12] || (_cache[12] = ($event) => isRef(expandedTreeNodes) ? expandedTreeNodes.value = $event : null),
418
- "reserve-selected-row-on-paginate": "",
419
- "active-row-type": "multiple"
420
- }, reProps.value.tableOptions, { onSelectChange: handleSelectChange }), createSlots({ _: 2 }, [
421
- reProps.value.creatable ? {
422
- name: "table-bottom-content",
423
- fn: withCtx(() => [
424
- addCustom.visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
425
- createVNode(unref(Input), {
426
- modelValue: addCustom.value,
427
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => addCustom.value = $event),
428
- clearable: ""
429
- }, null, 8, ["modelValue"]),
430
- createVNode(unref(Space), { size: "small" }, {
431
- default: withCtx(() => [
432
- createVNode(unref(Button), {
433
- disabled: addConfirmDisabled.value,
434
- onClick: confirmAddCustom
435
- }, {
436
- default: withCtx(() => [
437
- createTextVNode(toDisplayString(unref(t)("addConfirmText")), 1)
438
- ]),
439
- _: 1
440
- }, 8, ["disabled"]),
441
- createVNode(unref(Button), {
442
- variant: "outline",
443
- onClick: cancelAddCustom
444
- }, {
445
- default: withCtx(() => [
446
- createTextVNode(toDisplayString(unref(t)("addCancelText")), 1)
447
- ]),
448
- _: 1
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
  });