qidian-vue-ui 2.0.15 → 2.0.17

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,4 +1,4 @@
1
- import { defineComponent, mergeDefaults, computed, toRef, createBlock, openBlock, unref, mergeProps, isRef, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, watch } from "vue";
1
+ import { defineComponent, mergeDefaults, computed, toRef, ref, onMounted, onActivated, onDeactivated, createBlock, openBlock, unref, mergeProps, isRef, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps, watch } from "vue";
2
2
  import { useVModels } from "../../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
3
3
  import { isEmpty } from "qidian-shared";
4
4
  import { Select } from "tdesign-vue-next";
@@ -153,13 +153,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
153
  const dictType = toRef(props, "dictType");
154
154
  let hasAutoSelected = false;
155
155
  let unWatchAutoSelected;
156
+ const autofocus = ref(false);
157
+ let autoOpenedOnce = false;
156
158
  const reProps = computed(() => {
157
159
  const {
158
160
  convStr,
159
161
  strict,
160
162
  modelValue: modelValue2,
161
163
  inputValue: inputValue2,
162
- popupVisible: popupVisible2,
164
+ popupVisible: inPopupVisible,
163
165
  valueLabel: valueLabel2,
164
166
  dictType: dictType2,
165
167
  loading,
@@ -167,6 +169,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
169
  onDefaultSelectFirst,
168
170
  dedupe,
169
171
  options,
172
+ autofocus: autofocus2,
173
+ onFocus,
170
174
  onChange,
171
175
  ...selectOptions
172
176
  } = props;
@@ -181,7 +185,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
185
  reValueLabel.value = context.option?.[labelKey] || "";
182
186
  }
183
187
  };
188
+ const reOnFocus = (context) => {
189
+ onFocus?.(context);
190
+ if (autofocus2 && !autoOpenedOnce && !popupVisible.value) {
191
+ autoOpenedOnce = true;
192
+ popupVisible.value = true;
193
+ }
194
+ };
184
195
  return {
196
+ autofocus: autofocus2,
185
197
  convStr,
186
198
  strict,
187
199
  dictType: dictType2,
@@ -192,12 +204,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
192
204
  options,
193
205
  selectOptions: {
194
206
  ...selectOptions,
207
+ onFocus: reOnFocus,
195
208
  onChange: reOnChange
196
209
  },
197
210
  models: {
198
211
  modelValue: modelValue2,
199
212
  inputValue: inputValue2,
200
- popupVisible: popupVisible2
213
+ popupVisible: inPopupVisible
201
214
  }
202
215
  };
203
216
  });
@@ -239,6 +252,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
239
252
  }
240
253
  }
241
254
  setAutoSelectedWatch();
255
+ onMounted(() => {
256
+ autofocus.value = reProps.value.autofocus;
257
+ });
258
+ onActivated(() => {
259
+ autofocus.value = reProps.value.autofocus;
260
+ });
261
+ onDeactivated(() => {
262
+ autofocus.value = false;
263
+ });
242
264
  return (_ctx, _cache) => {
243
265
  return openBlock(), createBlock(unref(Select), mergeProps({
244
266
  modelValue: reModelValue.value,
@@ -246,7 +268,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
246
268
  "input-value": unref(inputValue),
247
269
  "onUpdate:inputValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null),
248
270
  "popup-visible": unref(popupVisible),
249
- "onUpdate:popupVisible": _cache[2] || (_cache[2] = ($event) => isRef(popupVisible) ? popupVisible.value = $event : null)
271
+ "onUpdate:popupVisible": _cache[2] || (_cache[2] = ($event) => isRef(popupVisible) ? popupVisible.value = $event : null),
272
+ autofocus: autofocus.value
250
273
  }, reProps.value.selectOptions, {
251
274
  options: reDictOptions.value,
252
275
  loading: unref(dictLoading) || reProps.value.loading
@@ -259,7 +282,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
259
282
  ])
260
283
  };
261
284
  })
262
- ]), 1040, ["modelValue", "input-value", "popup-visible", "options", "loading"]);
285
+ ]), 1040, ["modelValue", "input-value", "popup-visible", "autofocus", "options", "loading"]);
263
286
  };
264
287
  }
265
288
  });
@@ -22,5 +22,6 @@ export * from './service-dialog-table-select';
22
22
  export * from './service-dialog-tabs-table-select';
23
23
  export * from './service-popup-table-select';
24
24
  export * from './service-select';
25
+ export * from './service-tree-select';
25
26
  export * from './steps';
26
27
  export * from './upload';
@@ -1,31 +1,31 @@
1
- .qd-dialog-table-select[data-v-0fe40893] {
1
+ .qd-dialog-table-select[data-v-3992bc28] {
2
2
  width: 100%;
3
3
  }
4
- .qd-dialog-table-select__trigger[data-v-0fe40893] {
4
+ .qd-dialog-table-select__trigger[data-v-3992bc28] {
5
5
  width: 100%;
6
6
  }
7
- .qd-dialog-table-select__trigger[data-v-0fe40893]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
7
+ .qd-dialog-table-select__trigger[data-v-3992bc28]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
8
8
  cursor: pointer;
9
9
  }
10
- .qd-dialog-table-select__input-trigger[data-v-0fe40893] {
10
+ .qd-dialog-table-select__input-trigger[data-v-3992bc28] {
11
11
  border-top-left-radius: 0;
12
12
  border-bottom-left-radius: 0;
13
13
  }
14
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-search > .t-loading__parent > .t-card__body,
15
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-table__body > .t-loading__parent > .t-card__body {
14
+ .qd-dialog-table-select__table[data-v-3992bc28] .qd-crud-search > .t-loading__parent > .t-card__body,
15
+ .qd-dialog-table-select__table[data-v-3992bc28] .qd-crud-table__body > .t-loading__parent > .t-card__body {
16
16
  padding: 0 !important;
17
17
  }
18
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-table__toolbar {
18
+ .qd-dialog-table-select__table[data-v-3992bc28] .qd-crud-table__toolbar {
19
19
  display: none;
20
20
  }
21
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-service-table {
21
+ .qd-dialog-table-select__table[data-v-3992bc28] .qd-service-table {
22
22
  margin-top: 0;
23
23
  }
24
- .qd-dialog-table-select__table-add[data-v-0fe40893] {
24
+ .qd-dialog-table-select__table-add[data-v-3992bc28] {
25
25
  margin-top: var(--td-comp-margin-m);
26
26
  display: flex;
27
27
  }
28
- .qd-dialog-table-select__table-add .t-input__wrap[data-v-0fe40893] {
28
+ .qd-dialog-table-select__table-add .t-input__wrap[data-v-3992bc28] {
29
29
  flex: 1 1 0;
30
30
  overflow: hidden;
31
31
  margin-right: var(--td-comp-margin-m);
@@ -23,6 +23,13 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
23
23
  default?: (props: {
24
24
  selectedRows: import("@vue/reactivity").UnwrapRefSimple<D>[];
25
25
  }) => any;
26
+ } & {
27
+ 'dialog-footer'?: (props: {
28
+ cancel: (event: MouseEvent) => void;
29
+ confirm: () => Promise<boolean | void>;
30
+ confirmLoading: boolean;
31
+ selectedOptions: import("@vue/reactivity").UnwrapRefSimple<D>[];
32
+ }) => any;
26
33
  } & {
27
34
  'dialog-footer-extend'?: (props: {}) => any;
28
35
  } & {
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fe40893"]]);
5
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3992bc28"]]);
6
6
  export {
7
7
  index as default
8
8
  };
@@ -357,7 +357,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
357
357
  const confirmLoad = ref(false);
358
358
  const selectedRowKeys = ref([]);
359
359
  const selectedRows = ref([]);
360
- let latestSelectedRows = [];
360
+ const latestSelectedRows = ref([]);
361
361
  let lastRowKey;
362
362
  const addCustom = reactive({
363
363
  visible: false,
@@ -562,15 +562,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
562
562
  return change;
563
563
  },
564
564
  onSingleClick: (rowKeys, options) => {
565
- latestSelectedRows = cleanEmptyChildren(options.selectedRowData, reProps.value.tableOptions.tree?.childrenKey);
565
+ latestSelectedRows.value = cleanEmptyChildren(options.selectedRowData, reProps.value.tableOptions.tree?.childrenKey);
566
566
  },
567
567
  onDoubleClick: (rowKeys, options) => {
568
- latestSelectedRows = cleanEmptyChildren(options.selectedRowData, reProps.value.tableOptions.tree?.childrenKey);
568
+ latestSelectedRows.value = cleanEmptyChildren(options.selectedRowData, reProps.value.tableOptions.tree?.childrenKey);
569
569
  handleConfirm();
570
570
  }
571
571
  });
572
572
  async function handleConfirm(done) {
573
- selectedRows.value = latestSelectedRows;
573
+ const latestRows = latestSelectedRows.value;
574
+ selectedRows.value = latestRows;
574
575
  const {
575
576
  selectOptions,
576
577
  keys
@@ -578,17 +579,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
578
579
  const valueKey = keys.value;
579
580
  const labelKey = keys.label;
580
581
  if (selectOptions.valueType === "value") {
581
- modelValue.value = selectOptions.multiple ? latestSelectedRows.map((item) => get(item, valueKey)) : get(latestSelectedRows[0], valueKey);
582
+ modelValue.value = selectOptions.multiple ? latestRows.map((item) => get(item, valueKey)) : get(latestRows[0], valueKey);
582
583
  } else {
583
- const rows = latestSelectedRows.map((item) => ({
584
+ const rows = latestRows.map((item) => ({
584
585
  [valueKey]: get(item, valueKey),
585
586
  [labelKey]: get(item, labelKey)
586
587
  }));
587
588
  modelValue.value = selectOptions.multiple ? rows : rows[0];
588
589
  }
589
590
  const eventParams = [modelValue.value, {
590
- option: latestSelectedRows[latestSelectedRows.length - 1],
591
- selectedOptions: latestSelectedRows,
591
+ option: latestRows[latestRows.length - 1],
592
+ selectedOptions: latestRows,
592
593
  trigger: "check"
593
594
  }];
594
595
  reProps.value.onChange?.(...eventParams);
@@ -609,6 +610,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
609
610
  }
610
611
  return onConfirm(...eventParams, done);
611
612
  }
613
+ function handleFooterCancel(event) {
614
+ visible.value = false;
615
+ reProps.value.dialogOptions.onCancel?.({
616
+ e: event
617
+ });
618
+ }
612
619
  function openDialog() {
613
620
  const {
614
621
  selectOptions
@@ -664,22 +671,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
664
671
  });
665
672
  }
666
673
  function handleBeforeOpen() {
667
- const {
668
- keys
669
- } = reProps.value;
670
- const valueKey = keys.value;
671
- if (identifyType(modelValue.value) === "array") {
672
- selectedRowKeys.value = modelValue.value.map((item) => {
673
- if (identifyType(item) === "object") {
674
- return get(item, valueKey);
675
- }
676
- return item;
677
- });
678
- } else if (identifyType(modelValue.value) === "object") {
679
- selectedRowKeys.value = [get(modelValue.value, valueKey)];
680
- } else {
681
- selectedRowKeys.value = isEmpty(modelValue.value) ? [] : [modelValue.value];
682
- }
674
+ syncSelectionFromModel();
675
+ }
676
+ function getModelValueKeys() {
677
+ if (isEmpty(modelValue.value)) return [];
678
+ const valueKey = reProps.value.keys.value;
679
+ const values = identifyType(modelValue.value) === "array" ? modelValue.value : [modelValue.value];
680
+ return values.map((item) => identifyType(item) === "object" ? get(item, valueKey) : item).filter((value) => ["string", "number"].includes(typeof value));
681
+ }
682
+ function syncSelectionFromModel() {
683
+ const keys = getModelValueKeys();
684
+ const valueKey = reProps.value.keys.value;
685
+ const rowMap = /* @__PURE__ */ new Map();
686
+ const rows = [...reProps.value.fillOptions ?? [], ...selectedRows.value, ...data.value ?? []];
687
+ rows.forEach((row) => {
688
+ const key = get(row, valueKey);
689
+ if (typeof key === "string" || typeof key === "number") rowMap.set(key, row);
690
+ });
691
+ selectedRowKeys.value = keys;
692
+ latestSelectedRows.value = keys.map((key) => rowMap.get(key)).filter((row) => !!row);
683
693
  }
684
694
  function handleClosed() {
685
695
  if (addCustom.visible) cancelAddCustom();
@@ -689,6 +699,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
689
699
  selectedRowKeys.value = [];
690
700
  }
691
701
  }
702
+ watch(modelValue, syncSelectionFromModel, {
703
+ deep: true
704
+ });
692
705
  watch(markedFillOptions, (fillOpts) => {
693
706
  const currentSelected = (selectedRows.value || []).filter((opt) => !opt[QD_FILL_OPTION_MARK]);
694
707
  if (!fillOpts?.length) {
@@ -825,10 +838,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
825
838
  };
826
839
  })]), 1040, ["search-data", "data", "selected-row-keys", "active-row-keys", "column-controller-visible", "expanded-rowKeys", "filter-value", "sort", "expanded-tree-nodes", "onSelectChange"])]),
827
840
  _: 2
828
- }, [_ctx.$slots["dialog-footer-extend"] ? {
841
+ }, [_ctx.$slots["dialog-footer"] ? {
842
+ name: "footer",
843
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
844
+ cancel: handleFooterCancel,
845
+ confirm: () => handleConfirm(),
846
+ confirmLoading: confirmLoad.value,
847
+ selectedOptions: latestSelectedRows.value
848
+ }, void 0, true)]),
849
+ key: "0"
850
+ } : void 0, _ctx.$slots["dialog-footer-extend"] ? {
829
851
  name: "footer-extend",
830
852
  fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer-extend", {}, void 0, true)]),
831
- key: "0"
853
+ key: "1"
832
854
  } : void 0]), 1040, ["visible", "confirm-loading"])], 64);
833
855
  };
834
856
  }
@@ -1,37 +1,37 @@
1
- .qd-dialog-tabs-table-select[data-v-f8e4cc1d] {
1
+ .qd-dialog-tabs-table-select[data-v-1461ff61] {
2
2
  width: 100%;
3
3
  }
4
- .qd-dialog-tabs-table-select__trigger[data-v-f8e4cc1d] {
4
+ .qd-dialog-tabs-table-select__trigger[data-v-1461ff61] {
5
5
  width: 100%;
6
6
  }
7
- .qd-dialog-tabs-table-select__trigger[data-v-f8e4cc1d]:not(.qd-dialog-tabs-table-select__trigger--readonly):not(.qd-dialog-tabs-table-select__trigger--disabled) {
7
+ .qd-dialog-tabs-table-select__trigger[data-v-1461ff61]:not(.qd-dialog-tabs-table-select__trigger--readonly):not(.qd-dialog-tabs-table-select__trigger--disabled) {
8
8
  cursor: pointer;
9
9
  }
10
- .qd-dialog-tabs-table-select__input-trigger[data-v-f8e4cc1d] {
10
+ .qd-dialog-tabs-table-select__input-trigger[data-v-1461ff61] {
11
11
  border-top-left-radius: 0;
12
12
  border-bottom-left-radius: 0;
13
13
  }
14
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-search > .t-loading__parent > .t-card__body {
14
+ .qd-dialog-tabs-table-select__table[data-v-1461ff61] .qd-crud-search > .t-loading__parent > .t-card__body {
15
15
  padding-left: 0 !important;
16
16
  padding-right: 0 !important;
17
17
  padding-bottom: 0 !important;
18
18
  }
19
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-table__body > .t-loading__parent > .t-card__body {
19
+ .qd-dialog-tabs-table-select__table[data-v-1461ff61] .qd-crud-table__body > .t-loading__parent > .t-card__body {
20
20
  padding-left: 0 !important;
21
21
  padding-right: 0 !important;
22
22
  padding-bottom: 0 !important;
23
23
  }
24
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-table__toolbar {
24
+ .qd-dialog-tabs-table-select__table[data-v-1461ff61] .qd-crud-table__toolbar {
25
25
  display: none;
26
26
  }
27
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-service-table {
27
+ .qd-dialog-tabs-table-select__table[data-v-1461ff61] .qd-service-table {
28
28
  margin-top: 0;
29
29
  }
30
- .qd-dialog-tabs-table-select__table-add[data-v-f8e4cc1d] {
30
+ .qd-dialog-tabs-table-select__table-add[data-v-1461ff61] {
31
31
  margin-top: var(--td-comp-margin-m);
32
32
  display: flex;
33
33
  }
34
- .qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-f8e4cc1d] {
34
+ .qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-1461ff61] {
35
35
  flex: 1 1 0;
36
36
  overflow: hidden;
37
37
  margin-right: var(--td-comp-margin-m);
@@ -18,6 +18,14 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
18
18
  default?: (props: {
19
19
  selectedRows: import("@vue/reactivity").UnwrapRefSimple<D>[];
20
20
  }) => any;
21
+ } & {
22
+ 'dialog-footer'?: (props: {
23
+ cancel: (event: MouseEvent) => void;
24
+ confirm: () => Promise<boolean | void>;
25
+ confirmLoading: boolean;
26
+ selectedOptions: import("@vue/reactivity").UnwrapRefSimple<D>[];
27
+ activeTab: import("tdesign-vue-next").TabValue | undefined;
28
+ }) => any;
21
29
  } & {
22
30
  'dialog-footer-extend'?: (props: {
23
31
  activeTab: import("tdesign-vue-next").TabValue | undefined;
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f8e4cc1d"]]);
5
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1461ff61"]]);
6
6
  export {
7
7
  index as default
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import './index.css'
2
- import { defineComponent, mergeDefaults, ref, useTemplateRef, computed, shallowRef, reactive, h, watch, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, mergeProps, unref, renderSlot, createBlock, withCtx, renderList, createTextVNode, toDisplayString, isRef, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
+ import { defineComponent, mergeDefaults, ref, useTemplateRef, computed, reactive, h, watch, createElementBlock, openBlock, Fragment, createElementVNode, createVNode, mergeProps, unref, renderSlot, createBlock, withCtx, renderList, createTextVNode, toDisplayString, isRef, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
3
3
  import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
4
4
  import { useDoubleClick, isEmpty, identifyType, suspectedWrapperPromise, createExposeProxy, extractSlotsWithPrefix, hasOwn } from "qidian-shared";
5
5
  import { AddIcon, SearchIcon } from "tdesign-icons-vue-next";
@@ -468,6 +468,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
468
468
  await nextTick();
469
469
  return handleCommonConfirm(done);
470
470
  }
471
+ function handleFooterCancel(event) {
472
+ visible.value = false;
473
+ reProps.value.dialogOptions.onCancel?.({
474
+ e: event
475
+ });
476
+ }
471
477
  const handleTabsSelectChange = useDoubleClick({
472
478
  shouldReset: (tab, rowKeys, options) => {
473
479
  const change = lastRowKey.value !== options.currentRowKey;
@@ -511,7 +517,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
511
517
  const confirmLoad2 = ref(false);
512
518
  const selectedRowKeys2 = ref([]);
513
519
  const selectedRows2 = ref([]);
514
- const latestSelectedRows2 = shallowRef([]);
520
+ const latestSelectedRows2 = ref([]);
515
521
  const lastRowKey2 = ref(void 0);
516
522
  const addCustom2 = reactive({
517
523
  visible: false,
@@ -734,7 +740,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
734
740
  }
735
741
  });
736
742
  async function handleConfirm2(done) {
737
- selectedRows2.value = latestSelectedRows2.value;
743
+ const latestRows = latestSelectedRows2.value;
744
+ selectedRows2.value = latestRows;
738
745
  const {
739
746
  selectOptions,
740
747
  keys
@@ -742,17 +749,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
742
749
  const valueKey = keys.value;
743
750
  const labelKey = keys.label;
744
751
  if (selectOptions.valueType === "value") {
745
- modelValue2.value = selectOptions.multiple ? latestSelectedRows2.value.map((item) => get(item, valueKey)) : get(latestSelectedRows2.value[0], valueKey);
752
+ modelValue2.value = selectOptions.multiple ? latestRows.map((item) => get(item, valueKey)) : get(latestRows[0], valueKey);
746
753
  } else {
747
- const rows = latestSelectedRows2.value.map((item) => ({
754
+ const rows = latestRows.map((item) => ({
748
755
  [valueKey]: get(item, valueKey),
749
756
  [labelKey]: get(item, labelKey)
750
757
  }));
751
758
  modelValue2.value = selectOptions.multiple ? rows : rows[0];
752
759
  }
753
760
  const eventParams = [modelValue2.value, {
754
- option: latestSelectedRows2.value[latestSelectedRows2.value.length - 1],
755
- selectedOptions: latestSelectedRows2.value,
761
+ option: latestRows[latestRows.length - 1],
762
+ selectedOptions: latestRows,
756
763
  trigger: "check"
757
764
  }];
758
765
  reProps2.value.onChange?.(...eventParams);
@@ -1007,12 +1014,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1007
1014
  };
1008
1015
  })]), 1040, ["active-tab", "search-data", "tabs", "shared-search", "sync-service-key"])]),
1009
1016
  _: 2
1010
- }, [_ctx.$slots["dialog-footer-extend"] ? {
1017
+ }, [_ctx.$slots["dialog-footer"] ? {
1018
+ name: "footer",
1019
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
1020
+ cancel: handleFooterCancel,
1021
+ confirm: () => handleConfirm(),
1022
+ confirmLoading: unref(confirmLoad),
1023
+ selectedOptions: unref(latestSelectedRows),
1024
+ activeTab: currentActiveTab.value
1025
+ }, void 0, true)]),
1026
+ key: "0"
1027
+ } : void 0, _ctx.$slots["dialog-footer-extend"] ? {
1011
1028
  name: "footer-extend",
1012
1029
  fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer-extend", {
1013
1030
  activeTab: currentActiveTab.value
1014
1031
  }, void 0, true)]),
1015
- key: "0"
1032
+ key: "1"
1016
1033
  } : void 0]), 1040, ["visible", "confirm-loading"])], 64);
1017
1034
  };
1018
1035
  }
@@ -0,0 +1,5 @@
1
+
2
+ .qd-service-tree-select__label--disabled {
3
+ color: var(--td-text-color-disabled);
4
+ cursor: not-allowed;
5
+ }
@@ -0,0 +1,2 @@
1
+ export { default as QdServiceTreeSelect } from './index.vue';
2
+ export type { QdServiceTreeSelectInstanceFunctions, QdServiceTreeSelectProps, QdServiceTreeSelectTreeOptions } from './types';
@@ -0,0 +1,25 @@
1
+ import type { ServicePageParams } from 'qidian-shared';
2
+ import type { TreeOptionData, TreeSelectValue } from 'tdesign-vue-next';
3
+ import type { QdServiceTreeSelectInstanceFunctions, QdServiceTreeSelectProps } from './types';
4
+ declare const _default: <D extends TreeOptionData = TreeOptionData, R = unknown, P = ServicePageParams, TP = P>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly "onUpdate:modelValue"?: ((args_0: TreeSelectValue | undefined) => any) | undefined;
7
+ readonly "onUpdate:data"?: ((args_0: D[] | undefined) => any) | undefined;
8
+ readonly "onUpdate:valueLabel"?: ((args_0: string | string[] | undefined) => any) | undefined;
9
+ readonly "onUpdate:inputValue"?: ((args_0: string | undefined) => any) | undefined;
10
+ readonly "onUpdate:popupVisible"?: ((args_0: boolean | undefined) => any) | undefined;
11
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:data" | "onUpdate:valueLabel" | "onUpdate:inputValue" | "onUpdate:popupVisible"> & QdServiceTreeSelectProps<D, R, P, TP> & Partial<{}>> & import("vue").PublicProps;
12
+ expose(exposed: import("vue").ShallowUnwrapRef<QdServiceTreeSelectInstanceFunctions<D_1, R_1, P_1, TP_1>>): void;
13
+ attrs: any;
14
+ slots: {
15
+ [x: string]: ((props: any) => any) | undefined;
16
+ [x: number]: ((props: any) => any) | undefined;
17
+ };
18
+ emit: ((evt: "update:modelValue", args_0: TreeSelectValue | undefined) => void) & ((evt: "update:data", args_0: D[] | undefined) => void) & ((evt: "update:valueLabel", args_0: string | string[] | undefined) => void) & ((evt: "update:inputValue", args_0: string | undefined) => void) & ((evt: "update:popupVisible", args_0: boolean | undefined) => void);
19
+ }>) => import("vue").VNode & {
20
+ __ctx?: Awaited<typeof __VLS_setup>;
21
+ };
22
+ export default _default;
23
+ type __VLS_PrettifyLocal<T> = {
24
+ [K in keyof T]: T[K];
25
+ } & {};
@@ -0,0 +1,351 @@
1
+ import './index.css'
2
+ import { defineComponent, mergeDefaults, ref, computed, watch, onMounted, onActivated, onDeactivated, createBlock, openBlock, unref, mergeProps, isRef, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
3
+ import { useVModels } from "../../node_modules/.pnpm/@vueuse_core@14.2.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.mjs";
4
+ import { useServiceLoadMore } from "qidian-shared";
5
+ import { TreeSelect } from "tdesign-vue-next";
6
+ import { qdServiceTreeSelectProps } from "./props.mjs";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{
9
+ name: "QdServiceTreeSelect"
10
+ },
11
+ __name: "index",
12
+ props: /* @__PURE__ */ mergeDefaults({
13
+ data: {},
14
+ autofocus: { type: Boolean },
15
+ onlyLeaf: { type: Boolean },
16
+ valueLabel: {},
17
+ tree: {},
18
+ transformParams: { type: Function },
19
+ transformRes: { type: Function },
20
+ autoWidth: { type: Boolean },
21
+ borderless: { type: Boolean },
22
+ clearable: { type: Boolean },
23
+ collapsedItems: {},
24
+ disabled: { type: Boolean },
25
+ empty: {},
26
+ filter: { type: Function },
27
+ filterable: { type: Boolean },
28
+ inputProps: {},
29
+ inputValue: {},
30
+ defaultInputValue: {},
31
+ keys: {},
32
+ loading: { type: Boolean },
33
+ loadingText: {},
34
+ max: {},
35
+ minCollapsedNum: {},
36
+ multiple: { type: Boolean },
37
+ panelBottomContent: {},
38
+ panelTopContent: {},
39
+ placeholder: {},
40
+ popupProps: {},
41
+ popupVisible: { type: Boolean },
42
+ prefixIcon: {},
43
+ readonly: { type: Boolean },
44
+ selectInputProps: {},
45
+ size: {},
46
+ suffix: {},
47
+ suffixIcon: {},
48
+ tagProps: {},
49
+ treeProps: {},
50
+ value: {},
51
+ defaultValue: {},
52
+ modelValue: {},
53
+ valueDisplay: {},
54
+ valueType: {},
55
+ onBlur: { type: Function },
56
+ onChange: { type: Function },
57
+ onClear: { type: Function },
58
+ onFocus: { type: Function },
59
+ onInputChange: { type: Function },
60
+ onPopupVisibleChange: { type: Function },
61
+ onRemove: { type: Function },
62
+ onSearch: { type: Function },
63
+ onBefore: { type: Function },
64
+ onAfter: { type: Function },
65
+ onSuccess: { type: Function },
66
+ onError: { type: Function },
67
+ service: { type: Function },
68
+ manual: { type: Boolean }
69
+ }, qdServiceTreeSelectProps),
70
+ emits: ["update:modelValue", "update:valueLabel", "update:inputValue", "update:popupVisible", "update:data"],
71
+ setup(__props, { expose: __expose, emit: __emit }) {
72
+ const props = __props;
73
+ const emit = __emit;
74
+ const { modelValue, valueLabel, inputValue, popupVisible, data } = useVModels(props, emit, {
75
+ passive: true
76
+ });
77
+ const nodeLabelMap = /* @__PURE__ */ new Map();
78
+ const loadingNodes = /* @__PURE__ */ new Map();
79
+ const autofocus = ref(false);
80
+ let autoOpenedOnce = false;
81
+ const reProps = computed(() => {
82
+ const {
83
+ service,
84
+ manual,
85
+ transformParams,
86
+ transformRes,
87
+ onBefore,
88
+ onAfter,
89
+ onSuccess,
90
+ onError,
91
+ tree,
92
+ onlyLeaf,
93
+ valueLabel: valueLabel2,
94
+ modelValue: modelValue2,
95
+ inputValue: inputValue2,
96
+ popupVisible: inPopupVisible,
97
+ data: data2,
98
+ loading: loading2,
99
+ filterable,
100
+ filter,
101
+ autofocus: inAutofocus,
102
+ inputProps,
103
+ treeProps,
104
+ onFocus,
105
+ onChange,
106
+ ...treeSelectOptions
107
+ } = props;
108
+ const reOnFocus = (context) => {
109
+ onFocus?.(context);
110
+ if (inAutofocus && !autoOpenedOnce && !popupVisible.value) {
111
+ autoOpenedOnce = true;
112
+ popupVisible.value = true;
113
+ }
114
+ };
115
+ const reOnChange = (value, context) => {
116
+ onChange?.(value, context);
117
+ syncValueLabel(value, context);
118
+ };
119
+ return {
120
+ externalLoading: loading2,
121
+ tree,
122
+ onlyLeaf,
123
+ treeSelectOptions: {
124
+ ...treeSelectOptions,
125
+ filterable,
126
+ filter: filter || (filterable && onlyLeaf ? filterOnlyLeafTree : void 0),
127
+ inputProps: {
128
+ ...inputProps,
129
+ autofocus: autofocus.value
130
+ },
131
+ treeProps: tree?.lazyLoad ? {
132
+ ...treeProps,
133
+ label: onlyLeaf ? renderTreeLabel : treeProps?.label,
134
+ lazy: true,
135
+ load: (node) => loadTreeChildren(node)
136
+ } : onlyLeaf ? { ...treeProps, label: renderTreeLabel } : treeProps,
137
+ onFocus: reOnFocus,
138
+ onChange: reOnChange
139
+ },
140
+ serviceOptions: {
141
+ service,
142
+ manual,
143
+ transformParams,
144
+ transformRes,
145
+ onBefore,
146
+ onAfter,
147
+ onSuccess,
148
+ onError
149
+ }
150
+ };
151
+ });
152
+ const lazyLoad = computed(() => props.tree?.lazyLoad);
153
+ const maxLevel = computed(() => props.tree?.maxLevel);
154
+ const normalizedData = computed(() => normalizeTree(data.value || []));
155
+ const {
156
+ firstLoad,
157
+ loading,
158
+ error,
159
+ refresh: requestRefresh,
160
+ refreshAsync: requestRefreshAsync,
161
+ cancel
162
+ } = useServiceLoadMore({
163
+ ...reProps.value.serviceOptions,
164
+ pagination: false,
165
+ onSuccess: (res) => {
166
+ reProps.value.serviceOptions.onSuccess?.(res);
167
+ data.value = res.list;
168
+ }
169
+ });
170
+ const treeSelectLoading = computed(() => reProps.value.externalLoading || loading.value);
171
+ function getTreeKeys() {
172
+ const keys = props.keys;
173
+ return {
174
+ value: keys?.value || "value",
175
+ label: keys?.label || "label",
176
+ children: keys?.children || "children"
177
+ };
178
+ }
179
+ function canLazyLoad(level) {
180
+ return lazyLoad.value && (maxLevel.value === void 0 || level < maxLevel.value);
181
+ }
182
+ function renderTreeLabel(createElement, node) {
183
+ const label = props.treeProps?.label;
184
+ const content = typeof label === "function" ? label(createElement, node) : typeof label === "string" ? label : label === false ? null : node.label;
185
+ const children = node.getChildren(false);
186
+ const leaf = children !== true && (!Array.isArray(children) || children.length === 0);
187
+ return createElement(
188
+ "span",
189
+ { class: { "qd-service-tree-select__label--disabled": !leaf } },
190
+ content
191
+ );
192
+ }
193
+ function isTreeNodeMatched(filterWords, node) {
194
+ const label = node.data[getTreeKeys().label];
195
+ return String(label ?? "").toLowerCase().includes(filterWords);
196
+ }
197
+ function hasMatchedTreeNodeChildren(filterWords, node) {
198
+ const children = node.getChildren(true);
199
+ return Array.isArray(children) && children.some((child) => isTreeNodeMatched(filterWords, child));
200
+ }
201
+ function filterOnlyLeafTree(filterWords, node) {
202
+ const keyword = filterWords.trim().toLowerCase();
203
+ const matched = isTreeNodeMatched(keyword, node);
204
+ const hasMatchedChildren = hasMatchedTreeNodeChildren(keyword, node);
205
+ if (matched || hasMatchedChildren) return true;
206
+ return node.getParents().some(
207
+ (parent) => isTreeNodeMatched(keyword, parent) && !hasMatchedTreeNodeChildren(keyword, parent)
208
+ );
209
+ }
210
+ function normalizeTree(items, level = 0) {
211
+ const { children: childrenKey } = getTreeKeys();
212
+ return items.map((item) => {
213
+ const children = item[childrenKey];
214
+ const normalizedChildren = Array.isArray(children) ? normalizeTree(children, level + 1) : children === true ? canLazyLoad(level) ? true : [] : children === void 0 && canLazyLoad(level) ? true : children;
215
+ const leaf = normalizedChildren !== true && (!Array.isArray(normalizedChildren) || normalizedChildren.length === 0);
216
+ const normalizedItem = {
217
+ ...item,
218
+ [childrenKey]: normalizedChildren
219
+ };
220
+ if (!props.onlyLeaf) return normalizedItem;
221
+ if (props.multiple) return { ...normalizedItem, checkable: leaf };
222
+ return { ...normalizedItem, activable: leaf };
223
+ });
224
+ }
225
+ function registerNodeLabels(items) {
226
+ const { value: valueKey, label: labelKey, children: childrenKey } = getTreeKeys();
227
+ items.forEach((item) => {
228
+ const label = item[labelKey];
229
+ if (typeof label === "string" || typeof label === "number") {
230
+ nodeLabelMap.set(item[valueKey], String(label));
231
+ }
232
+ const children = item[childrenKey];
233
+ if (Array.isArray(children)) registerNodeLabels(children);
234
+ });
235
+ }
236
+ function getValueLabel(value) {
237
+ if (value && typeof value === "object" && !Array.isArray(value)) {
238
+ const label = value[getTreeKeys().label];
239
+ return typeof label === "string" || typeof label === "number" ? String(label) : "";
240
+ }
241
+ return nodeLabelMap.get(value) || "";
242
+ }
243
+ function syncValueLabel(value, context) {
244
+ if (props.multiple) {
245
+ valueLabel.value = Array.isArray(value) ? value.map(getValueLabel).filter(Boolean) : [];
246
+ return;
247
+ }
248
+ const label = context.data?.[getTreeKeys().label];
249
+ valueLabel.value = typeof label === "string" || typeof label === "number" ? String(label) : getValueLabel(value);
250
+ }
251
+ function setTreeNodeState(node, state) {
252
+ const loadNode = node;
253
+ if (loadNode.set) {
254
+ loadNode.set(state);
255
+ return;
256
+ }
257
+ node.setData({ ...node.data, ...state });
258
+ }
259
+ async function requestTreeChildren(node) {
260
+ const { service, treeProps } = props;
261
+ const tree = reProps.value.tree;
262
+ let records;
263
+ if (!service) {
264
+ records = await treeProps?.load?.(node) || [];
265
+ } else {
266
+ const params = tree?.transformParams ? await tree.transformParams(node) : node;
267
+ const res = await service(params);
268
+ const transformed = tree?.transformRes ? await tree.transformRes(res, node) : res;
269
+ records = transformed?.records || [];
270
+ }
271
+ const children = normalizeTree(records, node.getLevel() + 1);
272
+ registerNodeLabels(children);
273
+ if (!children.length && props.onlyLeaf) {
274
+ setTreeNodeState(node, props.multiple ? { checkable: true } : { activable: true });
275
+ }
276
+ return children;
277
+ }
278
+ function loadTreeChildren(node) {
279
+ const nodeKey = node.value;
280
+ const pending = loadingNodes.get(nodeKey);
281
+ if (pending) return pending;
282
+ const request = requestTreeChildren(node);
283
+ loadingNodes.set(nodeKey, request);
284
+ return request.catch((err) => {
285
+ setTreeNodeState(node, { loading: false });
286
+ throw err;
287
+ }).finally(() => {
288
+ loadingNodes.delete(nodeKey);
289
+ });
290
+ }
291
+ function refresh() {
292
+ if (!props.service) return;
293
+ requestRefresh();
294
+ }
295
+ function refreshAsync() {
296
+ if (!props.service) return;
297
+ return requestRefreshAsync();
298
+ }
299
+ const expose = {
300
+ firstLoad,
301
+ loading,
302
+ error,
303
+ refresh,
304
+ refreshAsync,
305
+ cancel
306
+ };
307
+ watch(
308
+ () => [data.value, props.keys],
309
+ ([items]) => {
310
+ nodeLabelMap.clear();
311
+ registerNodeLabels(items || []);
312
+ },
313
+ { immediate: true, deep: true }
314
+ );
315
+ onMounted(() => {
316
+ autofocus.value = props.autofocus;
317
+ });
318
+ onActivated(() => {
319
+ autofocus.value = props.autofocus;
320
+ });
321
+ onDeactivated(() => {
322
+ autofocus.value = false;
323
+ });
324
+ __expose(expose);
325
+ return (_ctx, _cache) => {
326
+ return openBlock(), createBlock(unref(TreeSelect), mergeProps({
327
+ class: "qd-service-tree-select",
328
+ modelValue: unref(modelValue),
329
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
330
+ "input-value": unref(inputValue),
331
+ "onUpdate:inputValue": _cache[1] || (_cache[1] = ($event) => isRef(inputValue) ? inputValue.value = $event : null),
332
+ "popup-visible": unref(popupVisible),
333
+ "onUpdate:popupVisible": _cache[2] || (_cache[2] = ($event) => isRef(popupVisible) ? popupVisible.value = $event : null),
334
+ data: normalizedData.value,
335
+ loading: treeSelectLoading.value
336
+ }, reProps.value.treeSelectOptions), createSlots({ _: 2 }, [
337
+ renderList(_ctx.$slots, (_, name) => {
338
+ return {
339
+ name,
340
+ fn: withCtx((slotProps) => [
341
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)))
342
+ ])
343
+ };
344
+ })
345
+ ]), 1040, ["modelValue", "input-value", "popup-visible", "data", "loading"]);
346
+ };
347
+ }
348
+ });
349
+ export {
350
+ _sfc_main as default
351
+ };
@@ -0,0 +1,6 @@
1
+ import './index.css'
2
+ import _sfc_main from "./index.vue.mjs";
3
+ /* empty css */
4
+ export {
5
+ _sfc_main as default
6
+ };
@@ -0,0 +1,6 @@
1
+ export declare const qdServiceTreeSelectProps: {
2
+ readonly data: () => never[];
3
+ readonly manual: undefined;
4
+ readonly loading: undefined;
5
+ readonly onlyLeaf: false;
6
+ };
@@ -0,0 +1,9 @@
1
+ const qdServiceTreeSelectProps = {
2
+ data: () => [],
3
+ manual: void 0,
4
+ loading: void 0,
5
+ onlyLeaf: false
6
+ };
7
+ export {
8
+ qdServiceTreeSelectProps
9
+ };
@@ -0,0 +1,18 @@
1
+ import type { ServicePageLoadMoreOptions, ServicePageParams, ServicePageRes, useServiceLoadMore } from 'qidian-shared';
2
+ import type { TdTreeSelectProps, TreeNodeModel, TreeOptionData } from 'tdesign-vue-next';
3
+ export interface QdServiceTreeSelectTreeOptions<D extends TreeOptionData = TreeOptionData, R = unknown, TP = TreeNodeModel<D>> {
4
+ lazyLoad?: boolean;
5
+ maxLevel?: number;
6
+ transformParams?: (node: TreeNodeModel<D>) => TP | Promise<TP>;
7
+ transformRes?: (res: R, node: TreeNodeModel<D>) => ServicePageRes<D> | Promise<ServicePageRes<D>>;
8
+ }
9
+ export interface QdServiceTreeSelectProps<D extends TreeOptionData = TreeOptionData, R = unknown, P = ServicePageParams, TP = P> extends TdTreeSelectProps<D>, Omit<ServicePageLoadMoreOptions<D, R, P, TP, false>, 'pagination' | 'transformParams' | 'transformRes'> {
10
+ data?: D[];
11
+ autofocus?: boolean;
12
+ onlyLeaf?: boolean;
13
+ valueLabel?: string | string[];
14
+ tree?: QdServiceTreeSelectTreeOptions<D, R, TP>;
15
+ transformParams?: (params: undefined) => TP | Promise<TP>;
16
+ transformRes?: (res: R) => ServicePageRes<D> | Promise<ServicePageRes<D>>;
17
+ }
18
+ export type QdServiceTreeSelectInstanceFunctions<D extends TreeOptionData = TreeOptionData, R = unknown, P = ServicePageParams, TP = P> = Pick<ReturnType<typeof useServiceLoadMore<D, R, P, TP, false>>, 'firstLoad' | 'loading' | 'error' | 'refresh' | 'refreshAsync' | 'cancel'>;
package/dist/index.mjs CHANGED
@@ -11,45 +11,47 @@ import { default as default8 } from "./components/import-dialog/index.vue.mjs";
11
11
  import { default as default9 } from "./components/input-number/index.vue.mjs";
12
12
  import { default as default10 } from "./components/org/select/index.vue.mjs";
13
13
  /* empty css */
14
- import { default as default11 } from "./components/auto-tooltip/index.vue.mjs";
15
- import { default as default12 } from "./components/avatar/index.vue.mjs";
16
- import { default as default13 } from "./components/card/index.vue.mjs";
17
- import { default as default14 } from "./components/columns-controller/index.vue.mjs";
14
+ import { default as default11 } from "./components/service-tree-select/index.vue.mjs";
15
+ /* empty css */
16
+ import { default as default12 } from "./components/auto-tooltip/index.vue.mjs";
17
+ import { default as default13 } from "./components/avatar/index.vue.mjs";
18
+ import { default as default14 } from "./components/card/index.vue.mjs";
19
+ import { default as default15 } from "./components/columns-controller/index.vue.mjs";
18
20
  import { useConfig } from "./components/config-provider/useConfig.mjs";
19
21
  import { QdConfigProvider } from "./components/config-provider/index.mjs";
20
22
  import { qdAsyncCompute, qdCompute, qdUseComputeValue } from "./components/config-renderer/compute.mjs";
21
23
  import { getValueByPath, parseVModelPath, resolveVModelBinding, setValueByPath } from "./components/config-renderer/utils.mjs";
22
24
  import { defineQdCrudList, defineQdCrudTable, defineQdCrudTabsTable } from "./components/crud/define.mjs";
23
- import { default as default15 } from "./components/crud/list/index.vue.mjs";
24
- import { default as default16 } from "./components/crud/search/index.vue.mjs";
25
- import { default as default17 } from "./components/crud/table/index.vue.mjs";
26
- import { default as default18 } from "./components/crud/tabs-table/index.vue.mjs";
27
- import { default as default19 } from "./components/dict/checkbox-group/index.vue.mjs";
28
- import { default as default20 } from "./components/dict/radio-group/index.vue.mjs";
29
- import { default as default21 } from "./components/dict/tag/index.vue.mjs";
30
- import { default as default22 } from "./components/file-icon/index.vue.mjs";
25
+ import { default as default16 } from "./components/crud/list/index.vue.mjs";
26
+ import { default as default17 } from "./components/crud/search/index.vue.mjs";
27
+ import { default as default18 } from "./components/crud/table/index.vue.mjs";
28
+ import { default as default19 } from "./components/crud/tabs-table/index.vue.mjs";
29
+ import { default as default20 } from "./components/dict/checkbox-group/index.vue.mjs";
30
+ import { default as default21 } from "./components/dict/radio-group/index.vue.mjs";
31
+ import { default as default22 } from "./components/dict/tag/index.vue.mjs";
32
+ import { default as default23 } from "./components/file-icon/index.vue.mjs";
31
33
  import { PROVIDE_FORM_ADD_AFTER_SUBMIT_QUEUE, PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE, PROVIDE_FORM_RESET_QUEUE } from "./components/form/config.mjs";
32
- import { default as default23 } from "./components/form/index.vue.mjs";
33
- import { default as default24 } from "./components/form/item.vue.mjs";
34
+ import { default as default24 } from "./components/form/index.vue.mjs";
35
+ import { default as default25 } from "./components/form/item.vue.mjs";
34
36
  import { qdFormGrid, qdFormGutter } from "./components/form/props.mjs";
35
37
  import { PROVIDE_GRID_ITEM_PROPS_KEY, PROVIDE_GRID_WIDTH_KEY } from "./components/grid/config.mjs";
36
- import { default as default25 } from "./components/grid/index.vue.mjs";
37
- import { default as default26 } from "./components/grid/item.vue.mjs";
38
- import { default as default27 } from "./components/left-ribbon-tag/index.vue.mjs";
39
- import { default as default28 } from "./components/org/tag/index.vue.mjs";
40
- import { default as default29 } from "./components/read-write/index.vue.mjs";
41
- import { default as default30 } from "./components/service/list/index.vue.mjs";
42
- import { default as default31 } from "./components/service/table/index.vue.mjs";
43
- import { default as default32 } from "./components/service-dialog-table-select/index.vue.mjs";
38
+ import { default as default26 } from "./components/grid/index.vue.mjs";
39
+ import { default as default27 } from "./components/grid/item.vue.mjs";
40
+ import { default as default28 } from "./components/left-ribbon-tag/index.vue.mjs";
41
+ import { default as default29 } from "./components/org/tag/index.vue.mjs";
42
+ import { default as default30 } from "./components/read-write/index.vue.mjs";
43
+ import { default as default31 } from "./components/service/list/index.vue.mjs";
44
+ import { default as default32 } from "./components/service/table/index.vue.mjs";
45
+ import { default as default33 } from "./components/service-dialog-table-select/index.vue.mjs";
44
46
  import { defineQdServiceDialogTableSelect } from "./components/service-dialog-table-select/define.mjs";
45
- import { default as default33 } from "./components/service-dialog-tabs-table-select/index.vue.mjs";
47
+ import { default as default34 } from "./components/service-dialog-tabs-table-select/index.vue.mjs";
46
48
  import { defineQdServiceDialogTabsTableSelect } from "./components/service-dialog-tabs-table-select/define.mjs";
47
- import { default as default34 } from "./components/service-popup-table-select/index.vue.mjs";
49
+ import { default as default35 } from "./components/service-popup-table-select/index.vue.mjs";
48
50
  import { defineQdServicePopupTableSelect } from "./components/service-popup-table-select/define.mjs";
49
- import { default as default35 } from "./components/service-select/index.vue.mjs";
50
- import { default as default36 } from "./components/steps/index.vue.mjs";
51
+ import { default as default36 } from "./components/service-select/index.vue.mjs";
52
+ import { default as default37 } from "./components/steps/index.vue.mjs";
51
53
  import { qdUploadAcceptMap } from "./components/upload/config.mjs";
52
- import { default as default37 } from "./components/upload/index.vue.mjs";
54
+ import { default as default38 } from "./components/upload/index.vue.mjs";
53
55
  import { hasPermi, hasPermiDirective } from "./directive/hasPermi.mjs";
54
56
  import { hasRole, hasRoleDirective } from "./directive/hasRole.mjs";
55
57
  import { useAgentChat } from "./hooks/useAgentChat/index.mjs";
@@ -70,43 +72,44 @@ export {
70
72
  PROVIDE_FORM_RESET_QUEUE,
71
73
  PROVIDE_GRID_ITEM_PROPS_KEY,
72
74
  PROVIDE_GRID_WIDTH_KEY,
73
- default11 as QdAutoTooltip,
74
- default12 as QdAvatar,
75
- default13 as QdCard,
76
- default14 as QdColumnsController,
75
+ default12 as QdAutoTooltip,
76
+ default13 as QdAvatar,
77
+ default14 as QdCard,
78
+ default15 as QdColumnsController,
77
79
  QdConfigProvider,
78
80
  default2 as QdConfigRenderer,
79
- default15 as QdCrudList,
80
- default16 as QdCrudSearch,
81
- default17 as QdCrudTable,
82
- default18 as QdCrudTabsTable,
81
+ default16 as QdCrudList,
82
+ default17 as QdCrudSearch,
83
+ default18 as QdCrudTable,
84
+ default19 as QdCrudTabsTable,
83
85
  default4 as QdDialog,
84
86
  default3 as QdDialogForm,
85
- default19 as QdDictCheckboxGroup,
86
- default20 as QdDictRadioGroup,
87
+ default20 as QdDictCheckboxGroup,
88
+ default21 as QdDictRadioGroup,
87
89
  default5 as QdDictSelect,
88
- default21 as QdDictTag,
90
+ default22 as QdDictTag,
89
91
  default6 as QdDrawer,
90
- default22 as QdFileIcon,
91
- default23 as QdForm,
92
- default24 as QdFormItem,
93
- default25 as QdGrid,
94
- default26 as QdGridItem,
92
+ default23 as QdFileIcon,
93
+ default24 as QdForm,
94
+ default25 as QdFormItem,
95
+ default26 as QdGrid,
96
+ default27 as QdGridItem,
95
97
  default7 as QdImage,
96
98
  default8 as QdImportDialog,
97
99
  default9 as QdInputNumber,
98
- default27 as QdLeftRibbonTag,
100
+ default28 as QdLeftRibbonTag,
99
101
  default10 as QdOrgSelect,
100
- default28 as QdOrgTag,
101
- default29 as QdReadWrite,
102
- default32 as QdServiceDialogTableSelect,
103
- default33 as QdServiceDialogTabsTableSelect,
104
- default30 as QdServiceList,
105
- default34 as QdServicePopupTableSelect,
106
- default35 as QdServiceSelect,
107
- default31 as QdServiceTable,
108
- default36 as QdSteps,
109
- default37 as QdUpload,
102
+ default29 as QdOrgTag,
103
+ default30 as QdReadWrite,
104
+ default33 as QdServiceDialogTableSelect,
105
+ default34 as QdServiceDialogTabsTableSelect,
106
+ default31 as QdServiceList,
107
+ default35 as QdServicePopupTableSelect,
108
+ default36 as QdServiceSelect,
109
+ default32 as QdServiceTable,
110
+ default11 as QdServiceTreeSelect,
111
+ default37 as QdSteps,
112
+ default38 as QdUpload,
110
113
  auth,
111
114
  defineQdCrudList,
112
115
  defineQdCrudTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",