qidian-vue-ui 1.0.70 → 1.0.72

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.
Files changed (42) hide show
  1. package/dist/components/config-provider/index.d.ts +3 -0
  2. package/dist/components/config-provider/types.d.ts +1 -0
  3. package/dist/components/config-provider/useConfig.d.ts +4 -0
  4. package/dist/components/config-renderer/types.d.ts +3 -1
  5. package/dist/components/crud/define.d.ts +2 -1
  6. package/dist/components/crud/index.d.ts +3 -2
  7. package/dist/components/crud/list.vue.d.ts +27 -0
  8. package/dist/components/crud/props.d.ts +5 -1
  9. package/dist/components/crud/types.d.ts +7 -3
  10. package/dist/components/dialog/form.vue.d.ts +20 -46
  11. package/dist/components/dialog/index.vue.d.ts +4 -1
  12. package/dist/components/dialog/props.d.ts +1 -1
  13. package/dist/components/dialog/types.d.ts +9 -1
  14. package/dist/components/dict/tag.vue.d.ts +26 -2
  15. package/dist/components/form/props.d.ts +1 -1
  16. package/dist/components/form/types.d.ts +1 -1
  17. package/dist/components/service/index.d.ts +2 -1
  18. package/dist/components/service/list.vue.d.ts +26 -0
  19. package/dist/components/service/props.d.ts +3 -0
  20. package/dist/components/service/types.d.ts +6 -1
  21. package/dist/{en-US-BR5-O75H.mjs → en-US-BD3_KJjx.mjs} +3 -2
  22. package/dist/{en-US-BR5-O75H.mjs.map → en-US-BD3_KJjx.mjs.map} +1 -1
  23. package/dist/{en-US-QRsMT0B0.js → en-US-CMpUZa8x.js} +3 -2
  24. package/dist/{en-US-QRsMT0B0.js.map → en-US-CMpUZa8x.js.map} +1 -1
  25. package/dist/{index-BhiVTQHR.js → index-B9OY1KvY.js} +477 -104
  26. package/dist/index-B9OY1KvY.js.map +1 -0
  27. package/dist/{index-DMFOdSjS.mjs → index-CeExET1J.mjs} +500 -127
  28. package/dist/index-CeExET1J.mjs.map +1 -0
  29. package/dist/locales/en-US.d.ts +1 -0
  30. package/dist/locales/zh-CN.d.ts +1 -0
  31. package/dist/locales/zh-TW.d.ts +1 -0
  32. package/dist/qidian-vue-ui.css +65 -13
  33. package/dist/qidian-vue-ui.js +7 -4
  34. package/dist/qidian-vue-ui.js.map +1 -1
  35. package/dist/qidian-vue-ui.mjs +31 -28
  36. package/dist/{zh-TW-H8f1Xj1a.mjs → zh-TW-BZkNQa_r.mjs} +3 -2
  37. package/dist/{zh-TW-H8f1Xj1a.mjs.map → zh-TW-BZkNQa_r.mjs.map} +1 -1
  38. package/dist/{zh-TW-B2ihPdJF.js → zh-TW-D5Z0fkAS.js} +3 -2
  39. package/dist/{zh-TW-B2ihPdJF.js.map → zh-TW-D5Z0fkAS.js.map} +1 -1
  40. package/package.json +2 -2
  41. package/dist/index-BhiVTQHR.js.map +0 -1
  42. package/dist/index-DMFOdSjS.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, useCssVars, useTemplateRef, ref, watch, nextTick, resolveDirective, createElementBlock, openBlock, createVNode, renderSlot, unref, withCtx, withDirectives, normalizeClass, createTextVNode, toDisplayString, Fragment, mergeDefaults, computed, createBlock, normalizeProps, guardReactiveProps, createSlots, renderList, onActivated, onDeactivated, onBeforeUnmount, inject, shallowRef, onUnmounted, watchEffect, isRef, provide, h, resolveComponent, createCommentVNode, resolveDynamicComponent, mergeProps, vShow, getCurrentInstance, onMounted, normalizeStyle, toRefs, reactive, createElementVNode, withModifiers, triggerRef, toRef } from "vue";
2
- import { Tooltip, Card, ConfigProvider, EnhancedTable, Select, Loading, Dialog, FormItem, DialogPlugin, NotifyPlugin, MessagePlugin, Form, LoadingDirective, Button, Space, Link, Divider, RadioGroup, CheckboxGroup, Tag, Upload, Popup, Badge } from "tdesign-vue-next";
2
+ import { Tooltip, Card, ConfigProvider, EnhancedTable, Empty, List, Select, Loading, Dialog, FormItem, DialogPlugin, NotifyPlugin, MessagePlugin, Form, LoadingDirective, Button, Space, Link, Divider, RadioGroup, CheckboxGroup, Tag, Upload, Popup, Badge } from "tdesign-vue-next";
3
3
  import { LoadingIcon, AddRectangleIcon, MinusRectangleIcon, SearchIcon, RefreshIcon, UnfoldLessIcon, UnfoldMoreIcon, SettingIcon, AddIcon, UploadIcon, BrowseIcon } from "tdesign-icons-vue-next";
4
- const _hoisted_1$2 = { class: "qd-auto-tooltip" };
5
- const _hoisted_2$1 = {
4
+ const _hoisted_1$3 = { class: "qd-auto-tooltip" };
5
+ const _hoisted_2$2 = {
6
6
  key: 0,
7
7
  class: "pre-wrap"
8
8
  };
9
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
9
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10
10
  ...{
11
11
  name: "QdAutoTooltip"
12
12
  },
@@ -38,7 +38,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
38
38
  );
39
39
  return (_ctx, _cache) => {
40
40
  const _directive_resize = resolveDirective("resize");
41
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
41
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
42
42
  createVNode(unref(Tooltip), {
43
43
  attach: __props.attach,
44
44
  placement: __props.placement,
@@ -47,7 +47,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
47
47
  }, {
48
48
  content: withCtx(() => [
49
49
  renderSlot(_ctx.$slots, "content", {}, () => [
50
- __props.preWrap ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(__props.content), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
50
+ __props.preWrap ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.content), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
51
51
  createTextVNode(toDisplayString(__props.content), 1)
52
52
  ], 64))
53
53
  ], true)
@@ -78,11 +78,11 @@ const _export_sfc = (sfc, props) => {
78
78
  }
79
79
  return target;
80
80
  };
81
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-75d8db87"]]);
81
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-75d8db87"]]);
82
82
  const qdCardProps = {
83
83
  bordered: false
84
84
  };
85
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
85
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
86
86
  __name: "index",
87
87
  props: /* @__PURE__ */ mergeDefaults({
88
88
  actions: {},
@@ -1390,6 +1390,14 @@ function extractSlotsWithoutPrefix(slots, prefix) {
1390
1390
  }
1391
1391
  return res;
1392
1392
  }
1393
+ function filterSlots(slots, filterName) {
1394
+ const res = [];
1395
+ for (const key in slots) {
1396
+ if (filterName.includes(key)) continue;
1397
+ res.push(key);
1398
+ }
1399
+ return res;
1400
+ }
1393
1401
  function easyCopy(data) {
1394
1402
  return JSON.parse(JSON.stringify(data));
1395
1403
  }
@@ -8518,14 +8526,14 @@ var Stream = (
8518
8526
  var ASN1 = (
8519
8527
  /** @class */
8520
8528
  (function() {
8521
- function ASN12(stream, header, length, tag, sub) {
8522
- if (!(tag instanceof ASN1Tag)) {
8529
+ function ASN12(stream, header, length, tag2, sub) {
8530
+ if (!(tag2 instanceof ASN1Tag)) {
8523
8531
  throw new Error("Invalid tag value.");
8524
8532
  }
8525
8533
  this.stream = stream;
8526
8534
  this.header = header;
8527
8535
  this.length = length;
8528
- this.tag = tag;
8536
+ this.tag = tag2;
8529
8537
  this.sub = sub;
8530
8538
  }
8531
8539
  ASN12.prototype.typeName = function() {
@@ -8735,7 +8743,7 @@ var ASN1 = (
8735
8743
  stream = str;
8736
8744
  }
8737
8745
  var streamStart = new Stream(stream);
8738
- var tag = new ASN1Tag(stream);
8746
+ var tag2 = new ASN1Tag(stream);
8739
8747
  var len = ASN12.decodeLength(stream);
8740
8748
  var start = stream.pos;
8741
8749
  var header = start - streamStart.pos;
@@ -8766,11 +8774,11 @@ var ASN1 = (
8766
8774
  }
8767
8775
  return ret;
8768
8776
  };
8769
- if (tag.tagConstructed) {
8777
+ if (tag2.tagConstructed) {
8770
8778
  sub = getSub();
8771
- } else if (tag.isUniversal() && (tag.tagNumber == 3 || tag.tagNumber == 4)) {
8779
+ } else if (tag2.isUniversal() && (tag2.tagNumber == 3 || tag2.tagNumber == 4)) {
8772
8780
  try {
8773
- if (tag.tagNumber == 3) {
8781
+ if (tag2.tagNumber == 3) {
8774
8782
  if (stream.get() != 0) {
8775
8783
  throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
8776
8784
  }
@@ -8791,7 +8799,7 @@ var ASN1 = (
8791
8799
  }
8792
8800
  stream.pos = start + Math.abs(len);
8793
8801
  }
8794
- return new ASN12(streamStart, header, len, tag, sub);
8802
+ return new ASN12(streamStart, header, len, tag2, sub);
8795
8803
  };
8796
8804
  return ASN12;
8797
8805
  })()
@@ -12013,8 +12021,8 @@ const QdConfigProvider = defineComponent({
12013
12021
  watchEffect(async () => {
12014
12022
  const localeMap = {
12015
12023
  "zh-CN": () => Promise.resolve().then(() => zhCN$1),
12016
- "zh-TW": () => import("./zh-TW-H8f1Xj1a.mjs"),
12017
- "en-US": () => import("./en-US-BR5-O75H.mjs")
12024
+ "zh-TW": () => import("./zh-TW-BZkNQa_r.mjs"),
12025
+ "en-US": () => import("./en-US-BD3_KJjx.mjs")
12018
12026
  };
12019
12027
  const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
12020
12028
  const [err, res] = await to(
@@ -12101,7 +12109,7 @@ var hasOwnProperty$a = objectProto$d.hasOwnProperty;
12101
12109
  var nativeObjectToString$1 = objectProto$d.toString;
12102
12110
  var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
12103
12111
  function getRawTag(value) {
12104
- var isOwn = hasOwnProperty$a.call(value, symToStringTag$1), tag = value[symToStringTag$1];
12112
+ var isOwn = hasOwnProperty$a.call(value, symToStringTag$1), tag2 = value[symToStringTag$1];
12105
12113
  try {
12106
12114
  value[symToStringTag$1] = void 0;
12107
12115
  var unmasked = true;
@@ -12110,7 +12118,7 @@ function getRawTag(value) {
12110
12118
  var result = nativeObjectToString$1.call(value);
12111
12119
  if (unmasked) {
12112
12120
  if (isOwn) {
12113
- value[symToStringTag$1] = tag;
12121
+ value[symToStringTag$1] = tag2;
12114
12122
  } else {
12115
12123
  delete value[symToStringTag$1];
12116
12124
  }
@@ -12171,8 +12179,8 @@ function isFunction(value) {
12171
12179
  if (!isObject(value)) {
12172
12180
  return false;
12173
12181
  }
12174
- var tag = baseGetTag(value);
12175
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
12182
+ var tag2 = baseGetTag(value);
12183
+ return tag2 == funcTag$2 || tag2 == genTag$1 || tag2 == asyncTag || tag2 == proxyTag;
12176
12184
  }
12177
12185
  var coreJsData = root["__core-js_shared__"];
12178
12186
  var maskSrcKey = (function() {
@@ -12939,9 +12947,9 @@ function cloneTypedArray(typedArray, isDeep) {
12939
12947
  }
12940
12948
  var boolTag$2 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
12941
12949
  var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
12942
- function initCloneByTag(object, tag, isDeep) {
12950
+ function initCloneByTag(object, tag2, isDeep) {
12943
12951
  var Ctor = object.constructor;
12944
- switch (tag) {
12952
+ switch (tag2) {
12945
12953
  case arrayBufferTag$1:
12946
12954
  return cloneArrayBuffer(object);
12947
12955
  case boolTag$2:
@@ -13005,17 +13013,17 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
13005
13013
  if (isArr) {
13006
13014
  result = initCloneArray(value);
13007
13015
  } else {
13008
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
13016
+ var tag2 = getTag(value), isFunc = tag2 == funcTag || tag2 == genTag;
13009
13017
  if (isBuffer(value)) {
13010
13018
  return cloneBuffer(value, isDeep);
13011
13019
  }
13012
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
13020
+ if (tag2 == objectTag || tag2 == argsTag || isFunc && !object) {
13013
13021
  result = isFunc ? {} : initCloneObject(value);
13014
13022
  } else {
13015
- if (!cloneableTags[tag]) {
13023
+ if (!cloneableTags[tag2]) {
13016
13024
  return object ? value : {};
13017
13025
  }
13018
- result = initCloneByTag(value, tag, isDeep);
13026
+ result = initCloneByTag(value, tag2, isDeep);
13019
13027
  }
13020
13028
  }
13021
13029
  stack || (stack = new Stack());
@@ -13217,7 +13225,7 @@ function resolveVModelBinding(context, vModel, defaultValue) {
13217
13225
  }
13218
13226
  return bindings;
13219
13227
  }
13220
- const _sfc_main$f = /* @__PURE__ */ defineComponent({
13228
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
13221
13229
  ...{
13222
13230
  name: "QdConfigRenderer"
13223
13231
  },
@@ -13262,7 +13270,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
13262
13270
  return value !== false && value !== null && value !== void 0;
13263
13271
  });
13264
13272
  const resolvedComponent = computed(() => {
13265
- const { is } = props.config;
13273
+ const { is, render } = props.config;
13274
+ if (render) {
13275
+ return () => render(h, currentContext.value);
13276
+ }
13266
13277
  if (!is) return "div";
13267
13278
  if (typeof is === "string") {
13268
13279
  if (is === is.toLowerCase()) {
@@ -13319,7 +13330,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
13319
13330
  return {
13320
13331
  name: slotName,
13321
13332
  fn: withCtx((slotProps) => [
13322
- slotConfig ? (openBlock(), createBlock(_sfc_main$f, mergeProps({
13333
+ slotConfig ? (openBlock(), createBlock(_sfc_main$h, mergeProps({
13323
13334
  key: 0,
13324
13335
  config: slotConfig,
13325
13336
  context: slotConfig.context || currentContext.value
@@ -13397,6 +13408,7 @@ const qdFormGrid = {
13397
13408
  const qdFormProps = {
13398
13409
  gutter: () => qdFormGutter,
13399
13410
  grid: () => qdFormGrid,
13411
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13400
13412
  data: () => ({}),
13401
13413
  disabled: void 0,
13402
13414
  readonly: void 0,
@@ -13467,6 +13479,9 @@ const qdServiceSelectProps = {
13467
13479
  const qdServiceSelectKeys = {
13468
13480
  value: "value"
13469
13481
  };
13482
+ const qdServiceListProps = {
13483
+ data: () => []
13484
+ };
13470
13485
  const qdCrudSearchProps = {
13471
13486
  ...qdFormProps,
13472
13487
  defaultClearable: true,
@@ -13492,6 +13507,10 @@ const qdCrudTableProps = {
13492
13507
  del: void 0,
13493
13508
  rowActions: void 0
13494
13509
  };
13510
+ const qdCrudListProps = {
13511
+ ...qdServiceListProps,
13512
+ searchData: () => ({})
13513
+ };
13495
13514
  function authPermission(permission) {
13496
13515
  const allPermission = "*:*:*";
13497
13516
  const user = window.__QIDIAN_USER__;
@@ -14259,6 +14278,7 @@ const zhCN = {
14259
14278
  text: "加载中"
14260
14279
  },
14261
14280
  crud: {
14281
+ emptyText: "暂无数据",
14262
14282
  searchText: "搜索",
14263
14283
  resetText: "重置",
14264
14284
  addText: "新增",
@@ -14313,7 +14333,7 @@ function useConfig(key, componentLocale) {
14313
14333
  global: globalConfig
14314
14334
  };
14315
14335
  }
14316
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
14336
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
14317
14337
  ...{
14318
14338
  name: "QdServiceTable"
14319
14339
  },
@@ -14617,6 +14637,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14617
14637
  } = /* @__PURE__ */ useVModels(props, emit, {
14618
14638
  passive: true
14619
14639
  });
14640
+ const {
14641
+ t
14642
+ } = useConfig("crud");
14620
14643
  const tableRef = useTemplateRef("table");
14621
14644
  const treeLoadIds = ref([]);
14622
14645
  const reProps = computed(() => {
@@ -14905,6 +14928,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14905
14928
  data: unref(data),
14906
14929
  pagination: rePagination.value
14907
14930
  }), createSlots({
14931
+ empty: withCtx(() => [createVNode(unref(Empty), {
14932
+ title: unref(t)("emptyText")
14933
+ }, null, 8, ["title"])]),
14908
14934
  _: 2
14909
14935
  }, [renderList(_ctx.$slots, (_, name) => {
14910
14936
  return {
@@ -14915,7 +14941,150 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14915
14941
  };
14916
14942
  }
14917
14943
  });
14918
- const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-3d02ee0a"]]);
14944
+ const QdServiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-adef2cbe"]]);
14945
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
14946
+ ...{
14947
+ name: "QdServiceList"
14948
+ },
14949
+ __name: "list",
14950
+ props: /* @__PURE__ */ mergeDefaults({
14951
+ data: {},
14952
+ asyncLoading: {},
14953
+ footer: {},
14954
+ header: {},
14955
+ layout: {},
14956
+ scroll: {},
14957
+ size: {},
14958
+ split: { type: Boolean },
14959
+ stripe: { type: Boolean },
14960
+ onBefore: { type: Function },
14961
+ onAfter: { type: Function },
14962
+ onSuccess: { type: Function },
14963
+ onError: { type: Function },
14964
+ service: { type: Function },
14965
+ manual: { type: Boolean },
14966
+ transformParams: { type: Function },
14967
+ transformRes: { type: Function },
14968
+ pagination: {}
14969
+ }, qdServiceListProps),
14970
+ emits: ["update:data"],
14971
+ setup(__props, { expose: __expose, emit: __emit }) {
14972
+ const props = __props;
14973
+ const emit = __emit;
14974
+ const { data } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
14975
+ const { t } = useConfig("crud");
14976
+ const listRef = useTemplateRef("list");
14977
+ const reProps = computed(() => {
14978
+ const {
14979
+ service,
14980
+ manual,
14981
+ transformParams,
14982
+ transformRes,
14983
+ pagination,
14984
+ onBefore,
14985
+ onAfter,
14986
+ onSuccess,
14987
+ onError,
14988
+ data: data2,
14989
+ asyncLoading: externalAsyncLoad,
14990
+ ...listOptions
14991
+ } = props;
14992
+ return {
14993
+ externalAsyncLoad,
14994
+ listOptions,
14995
+ serviceOptions: {
14996
+ service,
14997
+ manual,
14998
+ transformParams,
14999
+ transformRes,
15000
+ pagination,
15001
+ onBefore,
15002
+ onAfter,
15003
+ onSuccess,
15004
+ onError
15005
+ },
15006
+ models: {
15007
+ data: data2
15008
+ }
15009
+ };
15010
+ });
15011
+ const {
15012
+ data: serviceData,
15013
+ firstLoad,
15014
+ manualTriggerLoad,
15015
+ loading,
15016
+ loadingMore,
15017
+ noMore,
15018
+ error,
15019
+ refresh,
15020
+ refreshAsync,
15021
+ cancel,
15022
+ loadMore,
15023
+ loadMoreAsync,
15024
+ mutate
15025
+ } = useServiceLoadMore({
15026
+ ...reProps.value.serviceOptions,
15027
+ onSuccess: (res) => {
15028
+ reProps.value.serviceOptions.onSuccess?.(res);
15029
+ data.value = serviceData.value?.list || [];
15030
+ }
15031
+ });
15032
+ const empty = computed(() => noMore.value && !data.value.length);
15033
+ function onScroll({
15034
+ scrollBottom
15035
+ }) {
15036
+ if (loading.value || noMore.value || scrollBottom > (reProps.value.listOptions.scroll?.rowHeight ?? 100)) {
15037
+ return;
15038
+ }
15039
+ loadMore();
15040
+ }
15041
+ const expose = {
15042
+ data: serviceData,
15043
+ firstLoad,
15044
+ manualTriggerLoad,
15045
+ loading,
15046
+ loadingMore,
15047
+ noMore,
15048
+ error,
15049
+ refresh,
15050
+ refreshAsync,
15051
+ cancel,
15052
+ loadMore,
15053
+ loadMoreAsync,
15054
+ mutate
15055
+ };
15056
+ onMounted(() => {
15057
+ Object.assign(expose, listRef.value);
15058
+ });
15059
+ __expose(expose);
15060
+ return (_ctx, _cache) => {
15061
+ return openBlock(), createBlock(unref(List), mergeProps({
15062
+ ref: "list",
15063
+ class: "qd-service-list"
15064
+ }, reProps.value.listOptions, { onScroll }), createSlots({
15065
+ default: withCtx(() => [
15066
+ empty.value ? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
15067
+ createVNode(unref(Empty), {
15068
+ title: unref(t)("emptyText")
15069
+ }, null, 8, ["title"])
15070
+ ], true) : createCommentVNode("", true),
15071
+ renderSlot(_ctx.$slots, "default", { data: unref(data) }, void 0, true)
15072
+ ]),
15073
+ _: 2
15074
+ }, [
15075
+ renderList(unref(filterSlots)(_ctx.$slots, ["default", "empty"]), (name) => {
15076
+ return {
15077
+ name,
15078
+ fn: withCtx((slotProps) => [
15079
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps)), void 0, true)
15080
+ ])
15081
+ };
15082
+ })
15083
+ ]), 1040);
15084
+ };
15085
+ }
15086
+ });
15087
+ const QdServiceList = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-21c3df5d"]]);
14919
15088
  const qdDictConvStrSeparator = ",";
14920
15089
  const qdDictSelectProps = {
14921
15090
  showArrow: true,
@@ -14948,7 +15117,7 @@ const qdDictTagProps = {
14948
15117
  options: void 0,
14949
15118
  strict: false
14950
15119
  };
14951
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
15120
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
14952
15121
  ...{
14953
15122
  name: "QdServiceSelect"
14954
15123
  },
@@ -15188,16 +15357,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
15188
15357
  },
15189
15358
  onSuccess: (res) => {
15190
15359
  reProps.value.serviceOptions.onSuccess?.(res);
15191
- const list = data.value?.list || [];
15360
+ const list2 = data.value?.list || [];
15192
15361
  if (!triggerServiceMerged && reProps.value.fillOptions?.length) {
15193
15362
  const map = /* @__PURE__ */ new Map();
15194
- [...reProps.value.fillOptions, ...list].forEach((item) => {
15363
+ [...reProps.value.fillOptions, ...list2].forEach((item) => {
15195
15364
  const k = item[reProps.value.selectOptions.keys?.value || qdServiceSelectKeys.value];
15196
15365
  map.set(k, item);
15197
15366
  });
15198
15367
  options.value = Array.from(map.values());
15199
15368
  } else {
15200
- options.value = list;
15369
+ options.value = list2;
15201
15370
  }
15202
15371
  triggerServiceMerged = true;
15203
15372
  if (!hasAutoSelected && reProps.value.defaultSelectFirst && isEmpty(reModelValue.value) && res.list.length) {
@@ -15289,7 +15458,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
15289
15458
  };
15290
15459
  }
15291
15460
  });
15292
- const select = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-a9450c1a"]]);
15461
+ const select = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-a9450c1a"]]);
15293
15462
  const qdDialogProps = {
15294
15463
  width: "min(960px, 100%)",
15295
15464
  theme: "default",
@@ -15310,7 +15479,7 @@ const qdDialogFormProps = {
15310
15479
  ...qdFormProps,
15311
15480
  wrapper: () => qdDialogProps
15312
15481
  };
15313
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
15482
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
15314
15483
  ...{
15315
15484
  name: "QdDialog"
15316
15485
  },
@@ -15355,7 +15524,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
15355
15524
  onOverlayClick: { type: Function }
15356
15525
  }, qdDialogProps),
15357
15526
  emits: ["update:visible"],
15358
- setup(__props, { emit: __emit }) {
15527
+ setup(__props, { expose: __expose, emit: __emit }) {
15359
15528
  const props = __props;
15360
15529
  const emit = __emit;
15361
15530
  const { visible } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
@@ -15386,6 +15555,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
15386
15555
  models: { visible: inVisible }
15387
15556
  };
15388
15557
  });
15558
+ function show() {
15559
+ visible.value = true;
15560
+ }
15561
+ function hide() {
15562
+ visible.value = false;
15563
+ }
15564
+ const expose = { show, hide };
15565
+ __expose(expose);
15389
15566
  return (_ctx, _cache) => {
15390
15567
  return openBlock(), createBlock(unref(Dialog), mergeProps({
15391
15568
  visible: unref(visible),
@@ -15422,7 +15599,7 @@ const DEFAULT_BREAKPOINTS = {
15422
15599
  };
15423
15600
  const DEFAULT_COL = 1;
15424
15601
  const DEFAULT_ROW = 1;
15425
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
15602
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
15426
15603
  ...{
15427
15604
  name: "QdGrid"
15428
15605
  },
@@ -15473,8 +15650,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
15473
15650
  };
15474
15651
  }
15475
15652
  });
15476
- const QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-f53624a2"]]);
15477
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
15653
+ const QdGrid = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-f53624a2"]]);
15654
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
15478
15655
  ...{
15479
15656
  name: "QdGridItem"
15480
15657
  },
@@ -15540,8 +15717,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
15540
15717
  };
15541
15718
  }
15542
15719
  });
15543
- const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-274b234a"]]);
15544
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
15720
+ const QdGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-274b234a"]]);
15721
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
15545
15722
  ...{
15546
15723
  name: "QdFormItem"
15547
15724
  },
@@ -15605,7 +15782,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
15605
15782
  crudMode: reProps.value.formItemOptions.crudMode,
15606
15783
  context: __props.context
15607
15784
  }, () => [
15608
- reProps.value.configRendererOptions.config ? (openBlock(), createBlock(unref(_sfc_main$f), mergeProps({
15785
+ reProps.value.configRendererOptions.config ? (openBlock(), createBlock(unref(_sfc_main$h), mergeProps({
15609
15786
  key: 0,
15610
15787
  class: "qd-form-item__component"
15611
15788
  }, reProps.value.configRendererOptions), null, 16)) : createCommentVNode("", true)
@@ -15619,7 +15796,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
15619
15796
  };
15620
15797
  }
15621
15798
  });
15622
- const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-0a78416c"]]);
15799
+ const QdFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0a78416c"]]);
15623
15800
  const PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE = Symbol("QdFormAddBeforeSubmitQueue");
15624
15801
  function useModal() {
15625
15802
  const { t } = useConfig("modal");
@@ -15789,7 +15966,7 @@ function useModal() {
15789
15966
  confirm
15790
15967
  };
15791
15968
  }
15792
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15969
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
15793
15970
  ...{
15794
15971
  name: "QdForm"
15795
15972
  },
@@ -15841,10 +16018,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15841
16018
  });
15842
16019
  });
15843
16020
  const formRef = useTemplateRef("form");
16021
+ const submitShowErrorMessage = ref();
15844
16022
  const reProps = computed(() => {
15845
- const { grid, gutter, items, onSubmit, data: data2, ...formOptions } = props;
16023
+ const { grid, gutter, items, onSubmit, data: data2, scrollToFirstError, ...formOptions } = props;
15846
16024
  return {
15847
- formOptions,
16025
+ formOptions: {
16026
+ ...formOptions,
16027
+ scrollToFirstError: submitShowErrorMessage.value === false ? "" : scrollToFirstError
16028
+ },
15848
16029
  formItems: items,
15849
16030
  gridOptions: {
15850
16031
  grid,
@@ -15854,7 +16035,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15854
16035
  models: { data: data2 }
15855
16036
  };
15856
16037
  });
15857
- let submitShowErrorMessage;
15858
16038
  const submitLoad = ref(false);
15859
16039
  const formLoad = computed(() => {
15860
16040
  return {
@@ -15864,7 +16044,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15864
16044
  };
15865
16045
  });
15866
16046
  async function handleSubmit(context) {
15867
- const showErrorMessage = submitShowErrorMessage ?? props.showErrorMessage;
16047
+ const showErrorMessage = submitShowErrorMessage.value ?? props.showErrorMessage;
15868
16048
  if (showErrorMessage && context.firstError) {
15869
16049
  msgError(context.firstError);
15870
16050
  }
@@ -15892,7 +16072,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15892
16072
  }
15893
16073
  });
15894
16074
  if (reQueueRes.success === false) {
15895
- if (reQueueRes.message && showErrorMessage) {
16075
+ if (showErrorMessage && reQueueRes.message) {
15896
16076
  msgError(reQueueRes.message);
15897
16077
  }
15898
16078
  return;
@@ -15908,7 +16088,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15908
16088
  const expose = {};
15909
16089
  onMounted(() => {
15910
16090
  const submit = async (params) => {
15911
- submitShowErrorMessage = params?.showErrorMessage;
16091
+ submitShowErrorMessage.value = params?.showErrorMessage;
15912
16092
  formRef.value?.submit(params);
15913
16093
  };
15914
16094
  Object.assign(expose, formRef.value, { submit });
@@ -15948,7 +16128,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15948
16128
  };
15949
16129
  }
15950
16130
  });
15951
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
16131
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
15952
16132
  __name: "form",
15953
16133
  props: /* @__PURE__ */ mergeDefaults({
15954
16134
  onSubmit: { type: Function },
@@ -15985,7 +16165,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
15985
16165
  setup(__props, { expose: __expose, emit: __emit }) {
15986
16166
  const props = __props;
15987
16167
  const emit = __emit;
15988
- const { visible, data } = /* @__PURE__ */ useVModels(props, emit, { passive: true });
16168
+ const { visible, data } = /* @__PURE__ */ useVModels(props, emit, {
16169
+ passive: true
16170
+ });
15989
16171
  const { t } = useConfig("crud");
15990
16172
  const formSubmitLoad = ref(false);
15991
16173
  const reProps = computed(() => {
@@ -16035,21 +16217,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
16035
16217
  };
16036
16218
  });
16037
16219
  const formRef = useTemplateRef("form");
16038
- const expose = {};
16220
+ function show(newData) {
16221
+ if (newData != void 0) data.value = newData;
16222
+ visible.value = true;
16223
+ }
16224
+ function hide() {
16225
+ visible.value = false;
16226
+ }
16227
+ const expose = {
16228
+ show,
16229
+ hide
16230
+ };
16039
16231
  onMounted(() => {
16040
16232
  Object.assign(expose, formRef.value);
16041
16233
  });
16042
16234
  __expose(expose);
16043
16235
  return (_ctx, _cache) => {
16044
- return openBlock(), createBlock(_sfc_main$c, mergeProps({
16236
+ return openBlock(), createBlock(_sfc_main$d, mergeProps({
16045
16237
  visible: unref(visible),
16046
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => isRef(visible) ? visible.value = $event : null)
16238
+ "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => isRef(visible) ? visible.value = $event : null)
16047
16239
  }, reProps.value.qdDialogOptions), createSlots({
16048
16240
  default: withCtx(() => [
16049
- createVNode(unref(_sfc_main$8), mergeProps({
16241
+ createVNode(unref(_sfc_main$9), mergeProps({
16050
16242
  ref: "form",
16051
16243
  data: unref(data),
16052
- "onUpdate:data": _cache[1] || (_cache[1] = ($event) => isRef(data) ? data.value = $event : null)
16244
+ "onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(data) ? data.value = $event : null)
16053
16245
  }, reProps.value.qdFormOptions), createSlots({ _: 2 }, [
16054
16246
  renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "form"), (item) => {
16055
16247
  return {
@@ -16068,7 +16260,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
16068
16260
  fn: withCtx(() => [
16069
16261
  createVNode(unref(Button), {
16070
16262
  theme: "default",
16071
- onClick: _cache[0] || (_cache[0] = ($event) => visible.value = false)
16263
+ onClick: hide
16072
16264
  }, {
16073
16265
  default: withCtx(() => [
16074
16266
  createTextVNode(toDisplayString(unref(t)("closeText")), 1)
@@ -16090,7 +16282,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
16090
16282
  };
16091
16283
  }
16092
16284
  });
16093
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16285
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
16094
16286
  ...{
16095
16287
  name: "QdCrudSearch"
16096
16288
  },
@@ -16143,9 +16335,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16143
16335
  });
16144
16336
  __expose(expose);
16145
16337
  return (_ctx, _cache) => {
16146
- return openBlock(), createBlock(unref(_sfc_main$g), { class: "qd-crud-search" }, {
16338
+ return openBlock(), createBlock(unref(_sfc_main$i), { class: "qd-crud-search" }, {
16147
16339
  default: withCtx(() => [
16148
- createVNode(unref(_sfc_main$8), mergeProps({
16340
+ createVNode(unref(_sfc_main$9), mergeProps({
16149
16341
  ref: "form",
16150
16342
  data: unref(data),
16151
16343
  "onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(data) ? data.value = $event : null)
@@ -16165,7 +16357,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16165
16357
  };
16166
16358
  }
16167
16359
  });
16168
- const QdCrudSearch = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-13ddedb2"]]);
16360
+ const QdCrudSearch = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-13ddedb2"]]);
16169
16361
  const dictCache = /* @__PURE__ */ new Map();
16170
16362
  const dictPromiseCache = /* @__PURE__ */ new Map();
16171
16363
  function useDict(...args) {
@@ -16296,13 +16488,13 @@ function useDisabled(context) {
16296
16488
  return false;
16297
16489
  });
16298
16490
  }
16299
- const _hoisted_1$1 = {
16491
+ const _hoisted_1$2 = {
16300
16492
  class: "qd-crud-table"
16301
16493
  };
16302
- const _hoisted_2 = {
16494
+ const _hoisted_2$1 = {
16303
16495
  class: "qd-crud-table__toolbar"
16304
16496
  };
16305
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
16497
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
16306
16498
  ...{
16307
16499
  name: "QdCrudTable"
16308
16500
  },
@@ -16642,6 +16834,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
16642
16834
  const reProps = computed(() => {
16643
16835
  const {
16644
16836
  data: data2,
16837
+ searchData: inSearchData,
16645
16838
  selectedRowKeys: selectedRowKeys2,
16646
16839
  activeRowKeys: activeRowKeys2,
16647
16840
  columnControllerVisible: columnControllerVisible2,
@@ -16751,6 +16944,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
16751
16944
  rowActions: reRowActions,
16752
16945
  models: {
16753
16946
  data: data2,
16947
+ searchData: inSearchData,
16754
16948
  selectedRowKeys: selectedRowKeys2,
16755
16949
  activeRowKeys: activeRowKeys2,
16756
16950
  columnControllerVisible: columnControllerVisible2,
@@ -16768,12 +16962,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
16768
16962
  let searchMode = "refresh";
16769
16963
  function handleSearch() {
16770
16964
  searchMode = "changeCurrent";
16771
- searchRef.value?.submit();
16772
16965
  }
16773
16966
  function handleResetSearch() {
16774
16967
  searchMode = "changeCurrent";
16775
16968
  searchRef.value?.reset();
16776
- handleSearch();
16969
+ searchRef.value?.submit();
16777
16970
  }
16778
16971
  function triggerSearch({
16779
16972
  validateResult
@@ -17062,7 +17255,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17062
17255
  });
17063
17256
  __expose(expose);
17064
17257
  return (_ctx, _cache) => {
17065
- return openBlock(), createElementBlock("div", _hoisted_1$1, [reProps.value.searchOptions?.items?.length ? withDirectives((openBlock(), createBlock(QdCrudSearch, mergeProps({
17258
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [reProps.value.searchOptions?.items?.length ? withDirectives((openBlock(), createBlock(QdCrudSearch, mergeProps({
17066
17259
  key: 0,
17067
17260
  ref: "search",
17068
17261
  data: unref(searchData),
@@ -17091,15 +17284,15 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17091
17284
  _: 1
17092
17285
  })]),
17093
17286
  _: 1
17094
- }, 16, ["data", "class"])), [[vShow, searchVisible.value]]) : createCommentVNode("", true), createVNode(unref(_sfc_main$g), {
17287
+ }, 16, ["data", "class"])), [[vShow, searchVisible.value]]) : createCommentVNode("", true), createVNode(unref(_sfc_main$i), {
17095
17288
  class: "qd-crud-table__body"
17096
17289
  }, {
17097
- default: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(unref(Space), {
17290
+ default: withCtx(() => [createElementVNode("div", _hoisted_2$1, [createVNode(unref(Space), {
17098
17291
  align: "center",
17099
17292
  size: "small"
17100
17293
  }, {
17101
17294
  default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(reProps.value.actions, (item, index2) => {
17102
- return withDirectives((openBlock(), createBlock(unref(_sfc_main$f), {
17295
+ return withDirectives((openBlock(), createBlock(unref(_sfc_main$h), {
17103
17296
  key: item.uid || index2,
17104
17297
  context: getConfigRendererCtx(item),
17105
17298
  config: {
@@ -17205,7 +17398,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17205
17398
  layout: "vertical"
17206
17399
  })]),
17207
17400
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(reProps.value.rowActions, (item, index2) => {
17208
- return withDirectives((openBlock(), createBlock(unref(_sfc_main$f), {
17401
+ return withDirectives((openBlock(), createBlock(unref(_sfc_main$h), {
17209
17402
  key: item.uid || index2,
17210
17403
  context: getConfigRendererCtx(item, slotProps),
17211
17404
  config: {
@@ -17226,10 +17419,10 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17226
17419
  })]), 1040, ["data", "selected-row-keys", "active-row-keys", "column-controller-visible", "display-columns", "expanded-row-keys", "filter-value", "sort", "expanded-tree-nodes"])]),
17227
17420
  _: 3
17228
17421
  }), (openBlock(true), createElementBlock(Fragment, null, renderList(dialogFormMap, (dialogForm, uid) => {
17229
- return openBlock(), createBlock(unref(_sfc_main$f), {
17422
+ return openBlock(), createBlock(unref(_sfc_main$h), {
17230
17423
  key: uid,
17231
17424
  config: {
17232
- is: unref(_sfc_main$7),
17425
+ is: unref(_sfc_main$8),
17233
17426
  ...dialogForm.form,
17234
17427
  vModelVisible: "self.visible",
17235
17428
  vModelData: "self.data",
@@ -17241,10 +17434,185 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17241
17434
  };
17242
17435
  }
17243
17436
  });
17244
- const table = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-06f05d43"]]);
17437
+ const table = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-bdb9c97a"]]);
17438
+ const _hoisted_1$1 = {
17439
+ class: "qd-crud-list"
17440
+ };
17441
+ const _hoisted_2 = {
17442
+ class: "qd-crud-list__body"
17443
+ };
17444
+ const _hoisted_3 = {
17445
+ key: 0,
17446
+ class: "qd-crud-list__toolbar"
17447
+ };
17448
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
17449
+ __name: "list",
17450
+ props: /* @__PURE__ */ mergeDefaults({
17451
+ search: {},
17452
+ searchData: {},
17453
+ data: {},
17454
+ asyncLoading: {},
17455
+ footer: {},
17456
+ header: {},
17457
+ layout: {},
17458
+ scroll: {},
17459
+ size: {},
17460
+ split: {
17461
+ type: Boolean
17462
+ },
17463
+ stripe: {
17464
+ type: Boolean
17465
+ },
17466
+ onBefore: {
17467
+ type: Function
17468
+ },
17469
+ onAfter: {
17470
+ type: Function
17471
+ },
17472
+ onSuccess: {
17473
+ type: Function
17474
+ },
17475
+ onError: {
17476
+ type: Function
17477
+ },
17478
+ service: {
17479
+ type: Function
17480
+ },
17481
+ manual: {
17482
+ type: Boolean
17483
+ },
17484
+ transformParams: {
17485
+ type: Function
17486
+ },
17487
+ transformRes: {
17488
+ type: Function
17489
+ },
17490
+ pagination: {}
17491
+ }, qdCrudListProps),
17492
+ emits: ["update:searchData", "update:data"],
17493
+ setup(__props, {
17494
+ expose: __expose,
17495
+ emit: __emit
17496
+ }) {
17497
+ const props = __props;
17498
+ const emit = __emit;
17499
+ const {
17500
+ data,
17501
+ searchData
17502
+ } = /* @__PURE__ */ useVModels(props, emit, {
17503
+ passive: true
17504
+ });
17505
+ const {
17506
+ t
17507
+ } = useConfig("crud");
17508
+ const reProps = computed(() => {
17509
+ const {
17510
+ data: data2,
17511
+ searchData: inSearchData,
17512
+ search,
17513
+ transformParams,
17514
+ ...serviceListOptions
17515
+ } = props;
17516
+ const mergedTransformParams = (params) => {
17517
+ const merged = {
17518
+ ...params,
17519
+ ...searchData.value
17520
+ };
17521
+ if (transformParams) return transformParams(merged);
17522
+ return merged;
17523
+ };
17524
+ return {
17525
+ searchOptions: search,
17526
+ serviceListOptions: {
17527
+ ...serviceListOptions,
17528
+ transformParams: mergedTransformParams
17529
+ },
17530
+ models: {
17531
+ data: data2,
17532
+ searchData: inSearchData
17533
+ }
17534
+ };
17535
+ });
17536
+ const searchRef = useTemplateRef("search");
17537
+ const listRef = useTemplateRef("list");
17538
+ function handleSearch() {
17539
+ }
17540
+ function handleResetSearch() {
17541
+ searchRef.value?.reset();
17542
+ searchRef.value?.submit();
17543
+ }
17544
+ function triggerSearch({
17545
+ validateResult
17546
+ }) {
17547
+ if (validateResult !== true) return;
17548
+ listRef.value?.refresh();
17549
+ }
17550
+ const expose = {};
17551
+ onMounted(() => {
17552
+ Object.assign(expose, listRef.value);
17553
+ });
17554
+ __expose(expose);
17555
+ return (_ctx, _cache) => {
17556
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [reProps.value.searchOptions?.items?.length ? (openBlock(), createBlock(QdCrudSearch, mergeProps({
17557
+ key: 0,
17558
+ ref: "search",
17559
+ data: unref(searchData),
17560
+ "onUpdate:data": _cache[0] || (_cache[0] = ($event) => isRef(searchData) ? searchData.value = $event : null)
17561
+ }, reProps.value.searchOptions, {
17562
+ "on-submit": triggerSearch
17563
+ }), {
17564
+ footer: withCtx(() => [createVNode(unref(Space), {
17565
+ align: "center",
17566
+ size: "small"
17567
+ }, {
17568
+ default: withCtx(() => [createVNode(unref(Button), {
17569
+ type: "submit",
17570
+ onClick: handleSearch
17571
+ }, {
17572
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("searchText")), 1)]),
17573
+ _: 1
17574
+ }), createVNode(unref(Button), {
17575
+ variant: "outline",
17576
+ onClick: handleResetSearch
17577
+ }, {
17578
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("resetText")), 1)]),
17579
+ _: 1
17580
+ })]),
17581
+ _: 1
17582
+ })]),
17583
+ _: 1
17584
+ }, 16, ["data"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_2, [_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(Space), {
17585
+ align: "center",
17586
+ size: "small"
17587
+ }, {
17588
+ default: withCtx(() => [renderSlot(_ctx.$slots, "actions", {}, void 0, true)]),
17589
+ _: 3
17590
+ })])) : createCommentVNode("", true), createVNode(unref(QdServiceList), mergeProps({
17591
+ ref: "list",
17592
+ data: unref(data),
17593
+ "onUpdate:data": _cache[1] || (_cache[1] = ($event) => isRef(data) ? data.value = $event : null)
17594
+ }, reProps.value.serviceListOptions), createSlots({
17595
+ _: 2
17596
+ }, [_ctx.$slots.default ? {
17597
+ name: "default",
17598
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)), void 0, true)]),
17599
+ key: "0"
17600
+ } : void 0, renderList(unref(extractSlotsWithPrefix)(_ctx.$slots, "list"), (item) => {
17601
+ return {
17602
+ name: item.filterName,
17603
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, item.originalName, normalizeProps(guardReactiveProps(slotProps)), void 0, true)])
17604
+ };
17605
+ })]), 1040, ["data"])])]);
17606
+ };
17607
+ }
17608
+ });
17609
+ const list = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4b3f4055"]]);
17245
17610
  function defineQdCrudTable(config) {
17246
17611
  return config;
17247
17612
  }
17613
+ function defineQdCrudList(config) {
17614
+ return config;
17615
+ }
17248
17616
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
17249
17617
  ...{
17250
17618
  name: "QdDictSelect"
@@ -17566,7 +17934,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
17566
17934
  (!reProps.value.theme || reProps.value.theme === "text") && !__props.variant && (item.theme === "text" || !item.theme) ? (openBlock(), createElementBlock("span", {
17567
17935
  key: item.value,
17568
17936
  class: normalizeClass(item.class)
17569
- }, toDisplayString(item.label), 3)) : (openBlock(), createBlock(unref(Tag), {
17937
+ }, [
17938
+ renderSlot(_ctx.$slots, "prefix", { item }, void 0, true),
17939
+ renderSlot(_ctx.$slots, "default", { item }, () => [
17940
+ createTextVNode(toDisplayString(item.label), 1)
17941
+ ], true),
17942
+ renderSlot(_ctx.$slots, "suffix", { item }, void 0, true)
17943
+ ], 2)) : (openBlock(), createBlock(unref(Tag), {
17570
17944
  key: item.value + "",
17571
17945
  index: index2,
17572
17946
  size: reProps.value.size,
@@ -17576,15 +17950,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
17576
17950
  class: normalizeClass(item.class)
17577
17951
  }, {
17578
17952
  default: withCtx(() => [
17579
- createTextVNode(toDisplayString(item.label), 1)
17953
+ renderSlot(_ctx.$slots, "prefix", { item }, void 0, true),
17954
+ renderSlot(_ctx.$slots, "default", { item }, () => [
17955
+ createTextVNode(toDisplayString(item.label), 1)
17956
+ ], true),
17957
+ renderSlot(_ctx.$slots, "suffix", { item }, void 0, true)
17580
17958
  ]),
17581
17959
  _: 2
17582
17960
  }, 1032, ["index", "size", "shape", "theme", "variant", "class"])),
17583
- (_ctx.$slots.separator || __props.separator) && matchOptions.value.length - 1 !== index2 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
17584
- _ctx.$slots.separator ? renderSlot(_ctx.$slots, "separator", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
17585
- createTextVNode(toDisplayString(__props.separator), 1)
17586
- ], 64))
17587
- ], 64)) : createCommentVNode("", true)
17961
+ (_ctx.$slots.separator || __props.separator) && matchOptions.value.length - 1 !== index2 ? renderSlot(_ctx.$slots, "separator", { key: 2 }, () => [
17962
+ createTextVNode(toDisplayString(__props.separator), 1)
17963
+ ], true) : createCommentVNode("", true)
17588
17964
  ], 64);
17589
17965
  }), 256))
17590
17966
  ])), [
@@ -17593,6 +17969,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
17593
17969
  };
17594
17970
  }
17595
17971
  });
17972
+ const tag = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1c89a500"]]);
17596
17973
  const qdUploadProps = {
17597
17974
  modelValue: () => [],
17598
17975
  files: () => [],
@@ -18311,17 +18688,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18311
18688
  async (newVal, oldVal) => {
18312
18689
  if (!newVal.length || checkSameObject(newVal, oldVal) || fileList.value.length) return;
18313
18690
  const { valueMode } = reProps.value;
18314
- let ossList = [];
18315
- if (valueMode === "url") {
18316
- const [err, res] = await to(getOssByUrls(newVal));
18317
- if (err) return;
18318
- ossList = res;
18319
- } else {
18320
- const [err, res] = await to(getOssByIds(newVal));
18321
- if (err) return;
18322
- ossList = res;
18323
- }
18324
- fileList.value = ossList.map((item) => {
18691
+ const apiFn = valueMode === "url" ? getOssByUrls : getOssByIds;
18692
+ const [err, res] = await to(apiFn(newVal));
18693
+ if (err) return;
18694
+ fileList.value = res.map((item) => {
18325
18695
  const { url, ossId, originalName, size, createTime } = item;
18326
18696
  return {
18327
18697
  url,
@@ -18418,26 +18788,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18418
18788
  }
18419
18789
  });
18420
18790
  export {
18421
- PROVIDE_GRID_WIDTH_KEY as A,
18422
- PROVIDE_GRID_ITEM_PROPS_KEY as B,
18423
- QdServiceTable as C,
18424
- select as D,
18425
- _sfc_main as E,
18426
- hasPermiDirective as F,
18427
- hasPermi as G,
18428
- hasRoleDirective as H,
18429
- hasRole as I,
18430
- useModal as J,
18431
- useDict as K,
18432
- useDictDynamic as L,
18433
- useReadonly as M,
18434
- useDisabled as N,
18435
- auth as O,
18791
+ QdGrid as A,
18792
+ QdGridItem as B,
18793
+ PROVIDE_GRID_WIDTH_KEY as C,
18794
+ PROVIDE_GRID_ITEM_PROPS_KEY as D,
18795
+ QdServiceTable as E,
18796
+ QdServiceList as F,
18797
+ select as G,
18798
+ _sfc_main as H,
18799
+ hasPermiDirective as I,
18800
+ hasPermi as J,
18801
+ hasRoleDirective as K,
18802
+ hasRole as L,
18803
+ useModal as M,
18804
+ useDict as N,
18805
+ useDictDynamic as O,
18436
18806
  PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE as P,
18437
18807
  QdConfigProvider as Q,
18808
+ useReadonly as R,
18809
+ useDisabled as S,
18810
+ auth as T,
18438
18811
  _typeof as _,
18439
- _sfc_main$g as a,
18440
- _sfc_main$f as b,
18812
+ _sfc_main$i as a,
18813
+ _sfc_main$h as b,
18441
18814
  commonjsGlobal as c,
18442
18815
  dayjs_minExports$1 as d,
18443
18816
  qdAsyncCompute as e,
@@ -18445,22 +18818,22 @@ export {
18445
18818
  getValueByPath as g,
18446
18819
  defineQdCrudTable as h,
18447
18820
  index as i,
18448
- _sfc_main$c as j,
18449
- _sfc_main$7 as k,
18450
- _sfc_main$4 as l,
18451
- radioGroup as m,
18452
- checkboxGroup as n,
18453
- _sfc_main$1 as o,
18821
+ defineQdCrudList as j,
18822
+ _sfc_main$d as k,
18823
+ list as l,
18824
+ _sfc_main$8 as m,
18825
+ _sfc_main$4 as n,
18826
+ radioGroup as o,
18454
18827
  parseVModelPath as p,
18455
18828
  qdCompute as q,
18456
18829
  resolveVModelBinding as r,
18457
18830
  setValueByPath as s,
18458
18831
  table as t,
18459
- _sfc_main$8 as u,
18460
- QdFormItem as v,
18461
- qdFormGutter as w,
18462
- qdFormGrid as x,
18463
- QdGrid as y,
18464
- QdGridItem as z
18832
+ checkboxGroup as u,
18833
+ tag as v,
18834
+ _sfc_main$9 as w,
18835
+ QdFormItem as x,
18836
+ qdFormGutter as y,
18837
+ qdFormGrid as z
18465
18838
  };
18466
- //# sourceMappingURL=index-DMFOdSjS.mjs.map
18839
+ //# sourceMappingURL=index-CeExET1J.mjs.map