@dt-frames/ui 2.0.12 → 2.0.13

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.
@@ -16,7 +16,7 @@ export declare const BasicProps: {
16
16
  default: () => {};
17
17
  };
18
18
  layout: {
19
- type: PropType<"inline" | "horizontal" | "vertical">;
19
+ type: PropType<"vertical" | "inline" | "horizontal">;
20
20
  default: string;
21
21
  };
22
22
  labelWidth: {
@@ -41,8 +41,8 @@ export declare const BasicProps: {
41
41
  };
42
42
  rowProps: {
43
43
  type: PropType<Partial<import("vue").ExtractPropTypes<{
44
- align: PropType<"bottom" | "top" | "stretch" | "middle">;
45
- justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
44
+ align: PropType<"middle" | "top" | "bottom" | "stretch">;
45
+ justify: PropType<"center" | "space-around" | "space-between" | "end" | "start">;
46
46
  prefixCls: StringConstructor;
47
47
  gutter: {
48
48
  type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
@@ -62,7 +62,7 @@ export declare const BasicProps: {
62
62
  type: NumberConstructor;
63
63
  };
64
64
  size: {
65
- type: PropType<"large" | "small" | "middle">;
65
+ type: PropType<"small" | "large" | "middle">;
66
66
  };
67
67
  disabled: {
68
68
  type: BooleanConstructor;
@@ -1,5 +1,5 @@
1
1
  import { useAppStore, useSlots, error, http, useApp, getDynamicProps, isBoolean, isFunction, getPopupContainer, useI18n, isNumber, isArray, isObject, isString, useMessage, isNullAndUnDef, windowResizeFn, off, on, getDictValueByCode, formatNumber, isVnode } from "@dt-frames/core";
2
- import { useSlots as useSlots$1, unref, ref, watch, onUnmounted, defineComponent, useAttrs, resolveDirective, openBlock, createElementBlock, Fragment, renderList, withDirectives, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, createBlock, provide, inject, h as h$1, computed as computed$1, mergeProps, nextTick, toRaw as toRaw$1, reactive, watchEffect, normalizeProps, renderSlot, onMounted, createSlots, guardReactiveProps } from "vue";
2
+ import { useSlots as useSlots$1, unref, ref, watch, onUnmounted, defineComponent, useAttrs, resolveDirective, openBlock, createElementBlock, Fragment, renderList, withDirectives, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode, createBlock, provide, inject, h as h$1, computed, mergeProps, nextTick, toRaw as toRaw$1, reactive, watchEffect, normalizeProps, renderSlot, onMounted, createSlots, guardReactiveProps } from "vue";
3
3
  import { useHeader } from "../../theme";
4
4
  import { Tooltip, MenuItem, Menu, Dropdown, Checkbox as Checkbox$1, Divider, Col, Row, Button, CheckboxGroup, Popover as Popover$1, Table } from "ant-design-vue/es";
5
5
  import "ant-design-vue/es/table/style";
@@ -237,7 +237,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
237
237
  }, 1024)
238
238
  ])), [
239
239
  [_directive_auth, item.auth]
240
- ]) : createCommentVNode("v-if", true)
240
+ ]) : createCommentVNode("", true)
241
241
  ], 64);
242
242
  }), 256))
243
243
  ])) : (openBlock(), createBlock(_component_ADropdown, {
@@ -264,7 +264,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
264
264
  createElementVNode("span", _hoisted_5$1, toDisplayString(item.label()), 1)
265
265
  ]),
266
266
  _: 2
267
- }, 1032, ["onClick"])) : createCommentVNode("v-if", true)
267
+ }, 1032, ["onClick"])) : createCommentVNode("", true)
268
268
  ])), [
269
269
  [_directive_auth, item.auth]
270
270
  ]);
@@ -281,14 +281,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
281
281
  };
282
282
  }
283
283
  });
284
- const _export_sfc = (sfc, props2) => {
285
- const target = sfc.__vccOpts || sfc;
286
- for (const [key, val] of props2) {
287
- target[key] = val;
288
- }
289
- return target;
290
- };
291
- const TableAction = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/TableAction.vue"]]);
292
284
  const tableKey = Symbol("dt-page");
293
285
  function createTableInstance(instance) {
294
286
  provide(tableKey, instance);
@@ -357,14 +349,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
357
349
  const ruleVisible = ref(false);
358
350
  const optionsRef = ref([]);
359
351
  const currentValueRef = ref(props2.value);
360
- const getComponent = computed$1(() => props2.column?.editComponent || "Input");
361
- const getRuleVisible = computed$1(() => {
352
+ const getComponent = computed(() => props2.column?.editComponent || "Input");
353
+ const getRuleVisible = computed(() => {
362
354
  return unref(ruleMessage) && unref(ruleVisible);
363
355
  });
364
- const getWrapperClass = computed$1(() => {
356
+ const getWrapperClass = computed(() => {
365
357
  return `edit-cell-align-${align}`;
366
358
  });
367
- const getIsCheckComp = computed$1(() => {
359
+ const getIsCheckComp = computed(() => {
368
360
  const component = unref(getComponent);
369
361
  return ["Checkbox", "Switch"].includes(component);
370
362
  });
@@ -377,15 +369,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
377
369
  const setTableValue = () => {
378
370
  props2.record[props2.column.dataIndex] = unref(currentValueRef);
379
371
  };
380
- const getComponentProps = computed$1(() => {
372
+ const getComponentProps = computed(() => {
381
373
  const isCheckValue = unref(getIsCheckComp);
382
374
  const valueField = isCheckValue ? "checked" : "value";
383
375
  const val = unref(currentValueRef);
384
376
  const value = isCheckValue ? isNumber(val) && isBoolean(val) ? val : !!val : val;
385
377
  let compProps = props2.column?.editComponentProps ?? {};
386
- const { record, column, index: index2 } = props2;
378
+ const { record, column, index } = props2;
387
379
  if (isFunction(compProps)) {
388
- compProps = compProps({ text: val, record, column, index: index2 }) ?? {};
380
+ compProps = compProps({ text: val, record, column, index }) ?? {};
389
381
  }
390
382
  if (unref(getComponent) === "InputNumber") {
391
383
  compProps = {
@@ -465,9 +457,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
465
457
  };
466
458
  }
467
459
  });
468
- const EditableCell = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/editTable/EditTableCell.vue"]]);
469
460
  function renderEditCell(column) {
470
- return ({ text: value, record, index: index2 }) => {
461
+ return ({ text: value, record, index }) => {
471
462
  record.onValid = async () => {
472
463
  if (isArray(record?.validCbs)) {
473
464
  const validFns = (record?.validCbs || []).map((fn) => fn());
@@ -495,11 +486,11 @@ function renderEditCell(column) {
495
486
  }
496
487
  return true;
497
488
  };
498
- return h(EditableCell, {
489
+ return h(_sfc_main$8, {
499
490
  value,
500
491
  record,
501
492
  column,
502
- index: index2
493
+ index
503
494
  });
504
495
  };
505
496
  }
@@ -556,17 +547,17 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
556
547
  width: unref(getIsZH) ? 50 : 70,
557
548
  title: t("NUMBER"),
558
549
  align: "center",
559
- customRender: ({ index: index2, renderIndex, record }) => {
550
+ customRender: ({ index, renderIndex, record }) => {
560
551
  if (virtual && record?.index)
561
552
  return record?.index;
562
553
  const getPagination = unref(getPaginationRef);
563
554
  const { appConf } = useAppStore();
564
555
  const { defaultPageSize } = appConf.ui.table;
565
556
  if (isBoolean(getPagination)) {
566
- return `${index2 + 1}`;
557
+ return `${index + 1}`;
567
558
  }
568
559
  const { current = 1, pageSize = defaultPageSize } = getPagination;
569
- return ((current < 1 ? 1 : current) - 1) * pageSize + index2 + 1;
560
+ return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1;
570
561
  },
571
562
  ...isFixedLeft ? {
572
563
  fixed: "left"
@@ -604,13 +595,13 @@ function handleActionColumn(propsRef, columns) {
604
595
  };
605
596
  columns.push({
606
597
  ...columnObj,
607
- customRender: ({ record, index: index2 }) => {
598
+ customRender: ({ record, index }) => {
608
599
  return h$1(
609
- TableAction,
600
+ _sfc_main$9,
610
601
  omit({
611
602
  ...columnObj,
612
603
  record,
613
- index: index2
604
+ index
614
605
  }, "align")
615
606
  );
616
607
  }
@@ -644,10 +635,10 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
644
635
  const columnsRef = ref(unref(propsRef).columns);
645
636
  let cacheColumns = unref(propsRef).columns;
646
637
  const { appConf } = useAppStore();
647
- const getColumnsRef = computed$1(() => {
638
+ const getColumnsRef = computed(() => {
648
639
  const columns = cloneDeep(unref(columnsRef));
649
640
  const { ellipsis } = unref(propsRef);
650
- columns.forEach((it, index2) => {
641
+ columns.forEach((it, index) => {
651
642
  it.class = it.class ?? "";
652
643
  if (!it.class.split(" ").includes("__column")) {
653
644
  it.class = `${it.class} __column`;
@@ -667,7 +658,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
667
658
  handleActionColumn(propsRef, columns);
668
659
  return columns;
669
660
  });
670
- const getViewColumns = computed$1(() => {
661
+ const getViewColumns = computed(() => {
671
662
  const viewColumns = sortFixedColumn(unref(getColumnsRef));
672
663
  const columns = cloneDeep(viewColumns);
673
664
  return columns.filter((column) => isIfShow(column)).map((column) => {
@@ -781,7 +772,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
781
772
  };
782
773
  }
783
774
  function useCustomRow(propsRef, { setSelectedRowKeys, getSelectedRowKeys, clearSelectedRowKeys, emits }) {
784
- const customRow = (record, index2) => {
775
+ const customRow = (record, index) => {
785
776
  return {
786
777
  onClick: (e) => {
787
778
  e?.stopPropagation();
@@ -835,19 +826,19 @@ function useCustomRow(propsRef, { setSelectedRowKeys, getSelectedRowKeys, clearS
835
826
  }
836
827
  }
837
828
  handleClick();
838
- emits("row-click", record, index2, e);
829
+ emits("row-click", record, index, e);
839
830
  },
840
831
  onDblclick: (event) => {
841
- emits("row-dbClick", record, index2, event);
832
+ emits("row-dbClick", record, index, event);
842
833
  },
843
834
  onContextmenu: (event) => {
844
- emits("row-contextmenu", record, index2, event);
835
+ emits("row-contextmenu", record, index, event);
845
836
  },
846
837
  onMouseenter: (event) => {
847
- emits("row-mouseenter", record, index2, event);
838
+ emits("row-mouseenter", record, index, event);
848
839
  },
849
840
  onMouseleave: (event) => {
850
- emits("row-mouseleave", record, index2, event);
841
+ emits("row-mouseleave", record, index, event);
851
842
  }
852
843
  };
853
844
  };
@@ -870,7 +861,7 @@ function useDataSource(propsRef, {
870
861
  immediate: true
871
862
  }
872
863
  );
873
- const getDataSourceRef = computed$1(() => {
864
+ const getDataSourceRef = computed(() => {
874
865
  return unref(dataSourceRef);
875
866
  });
876
867
  function handleTableChange(pagination, filters, sorter) {
@@ -969,7 +960,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
969
960
  const _component_ATooltip = Tooltip;
970
961
  return openBlock(), createBlock(_component_ATooltip, { placement: "top" }, {
971
962
  title: withCtx(() => [
972
- !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(unref(t)("FULLSCREEN")), 1)) : createCommentVNode("v-if", true)
963
+ !unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(unref(t)("FULLSCREEN")), 1)) : createCommentVNode("", true)
973
964
  ]),
974
965
  default: withCtx(() => [
975
966
  createElementVNode("span", {
@@ -986,7 +977,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
986
977
  };
987
978
  }
988
979
  });
989
- const FullscreenSetting = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/tableSetting/Fullscreen.vue"]]);
990
980
  const _hoisted_1$5 = { class: "column-select" };
991
981
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
992
982
  __name: "DownloadCtrl",
@@ -1058,7 +1048,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1058
1048
  createVNode(_component_ADivider, { dashed: "" }),
1059
1049
  createVNode(_component_ARow, null, {
1060
1050
  default: withCtx(() => [
1061
- (openBlock(true), createElementBlock(Fragment, null, renderList(modalData.value, (it, index2) => {
1051
+ (openBlock(true), createElementBlock(Fragment, null, renderList(modalData.value, (it, index) => {
1062
1052
  return openBlock(), createBlock(_component_ACol, { span: 8 }, {
1063
1053
  default: withCtx(() => [
1064
1054
  createVNode(_component_ACheckbox, {
@@ -1084,7 +1074,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1084
1074
  };
1085
1075
  }
1086
1076
  });
1087
- const DownloadCtrl = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/tableSetting/DownloadCtrl.vue"]]);
1088
1077
  const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", { class: "flex" }, [
1089
1078
  /* @__PURE__ */ createElementVNode("i", { class: "i ic:baseline-download w-7 leading-7 text-center cursor-pointer" })
1090
1079
  ], -1);
@@ -1105,9 +1094,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1105
1094
  const isInclude = (type) => {
1106
1095
  return isBoolean(props2.download) && props2.download && appConf?.ui?.table?.exportTable.includes(type) || isArray(props2.download) && props2.download.includes(type);
1107
1096
  };
1108
- const showCurrentDownload = computed$1(() => isInclude("current"));
1109
- const showSelectedDownload = computed$1(() => isInclude("select"));
1110
- const showBackDownload = computed$1(() => isInclude("all"));
1097
+ const showCurrentDownload = computed(() => isInclude("current"));
1098
+ const showSelectedDownload = computed(() => isInclude("select"));
1099
+ const showBackDownload = computed(() => isInclude("all"));
1111
1100
  function handleTitleClick({ key }) {
1112
1101
  const { onDownload, columns: allColumns, dataSource } = unref(table.getBind);
1113
1102
  const excludesFlag = ["ACTION", "CHECKBOX", "RADIO"];
@@ -1143,19 +1132,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1143
1132
  createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_CURRENT_PAGE")), 1)
1144
1133
  ]),
1145
1134
  _: 1
1146
- })) : createCommentVNode("v-if", true),
1135
+ })) : createCommentVNode("", true),
1147
1136
  unref(showSelectedDownload) ? (openBlock(), createBlock(_component_AMenuItem, { key: "select" }, {
1148
1137
  default: withCtx(() => [
1149
1138
  createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_SELECT_COLUMN")), 1)
1150
1139
  ]),
1151
1140
  _: 1
1152
- })) : createCommentVNode("v-if", true),
1141
+ })) : createCommentVNode("", true),
1153
1142
  unref(showBackDownload) ? (openBlock(), createBlock(_component_AMenuItem, { key: "all" }, {
1154
1143
  default: withCtx(() => [
1155
1144
  createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_ALL")), 1)
1156
1145
  ]),
1157
1146
  _: 1
1158
- })) : createCommentVNode("v-if", true)
1147
+ })) : createCommentVNode("", true)
1159
1148
  ]),
1160
1149
  _: 1
1161
1150
  })
@@ -1165,14 +1154,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1165
1154
  ]),
1166
1155
  _: 1
1167
1156
  }),
1168
- createVNode(DownloadCtrl, { onRegister: unref(registerDialog) }, null, 8, ["onRegister"])
1157
+ createVNode(_sfc_main$6, { onRegister: unref(registerDialog) }, null, 8, ["onRegister"])
1169
1158
  ]),
1170
1159
  _: 1
1171
1160
  });
1172
1161
  };
1173
1162
  }
1174
1163
  });
1175
- const Download = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/tableSetting/Download.vue"]]);
1176
1164
  const _hoisted_1$3 = /* @__PURE__ */ createElementVNode("i", { class: "i ant-design:drag-outlined drag-icon cursor-pointer" }, null, -1);
1177
1165
  const _hoisted_2$1 = ["onClick"];
1178
1166
  const _hoisted_3$1 = ["onClick"];
@@ -1195,7 +1183,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1195
1183
  const columnListRef = ref(null);
1196
1184
  const checkIndex = ref(false);
1197
1185
  const checkSelect = ref(false);
1198
- const getValues = computed$1(() => {
1186
+ const getValues = computed(() => {
1199
1187
  return unref(table?.getBind);
1200
1188
  });
1201
1189
  let sortable;
@@ -1205,7 +1193,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1205
1193
  checkedList: [],
1206
1194
  defaultCheckList: []
1207
1195
  });
1208
- const indeterminate = computed$1(() => {
1196
+ const indeterminate = computed(() => {
1209
1197
  let len = plainOptions.value.length;
1210
1198
  let checkedLen = state.checkedList.length;
1211
1199
  unref(checkIndex) && checkedLen--;
@@ -1315,9 +1303,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1315
1303
  return;
1316
1304
  const columns = getColumns();
1317
1305
  const isFixed = item.fixed === fixed ? false : fixed;
1318
- const index2 = columns.findIndex((col) => col.dataIndex === item.dataIndex);
1319
- if (index2 !== -1) {
1320
- columns[index2].fixed = isFixed;
1306
+ const index = columns.findIndex((col) => col.dataIndex === item.dataIndex);
1307
+ if (index !== -1) {
1308
+ columns[index].fixed = isFixed;
1321
1309
  }
1322
1310
  item.fixed = isFixed;
1323
1311
  if (isFixed && !item.width) {
@@ -1508,7 +1496,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1508
1496
  };
1509
1497
  }
1510
1498
  });
1511
- const ColumnSetting = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/tableSetting/Column.vue"]]);
1512
1499
  const _hoisted_1$2 = { class: "flex dt-table-setting" };
1513
1500
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1514
1501
  __name: "index",
@@ -1521,7 +1508,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1521
1508
  emits: ["columns-change"],
1522
1509
  setup(__props, { emit: emits }) {
1523
1510
  const props2 = __props;
1524
- const getSetting = computed$1(() => {
1511
+ const getSetting = computed(() => {
1525
1512
  return {
1526
1513
  download: true,
1527
1514
  setting: true,
@@ -1534,17 +1521,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1534
1521
  }
1535
1522
  return (_ctx, _cache) => {
1536
1523
  return openBlock(), createElementBlock("div", _hoisted_1$2, [
1537
- unref(getSetting).download ? (openBlock(), createBlock(Download, normalizeProps(mergeProps({ key: 0 }, unref(getSetting))), null, 16)) : createCommentVNode("v-if", true),
1538
- unref(getSetting).setting ? (openBlock(), createBlock(ColumnSetting, {
1524
+ unref(getSetting).download ? (openBlock(), createBlock(_sfc_main$5, normalizeProps(mergeProps({ key: 0 }, unref(getSetting))), null, 16)) : createCommentVNode("", true),
1525
+ unref(getSetting).setting ? (openBlock(), createBlock(_sfc_main$4, {
1539
1526
  key: 1,
1540
1527
  onColumnsChange: handleColumnChange
1541
- })) : createCommentVNode("v-if", true),
1542
- unref(getSetting).fullscreen ? (openBlock(), createBlock(FullscreenSetting, { key: 2 })) : createCommentVNode("v-if", true)
1528
+ })) : createCommentVNode("", true),
1529
+ unref(getSetting).fullscreen ? (openBlock(), createBlock(_sfc_main$7, { key: 2 })) : createCommentVNode("", true)
1543
1530
  ]);
1544
1531
  };
1545
1532
  }
1546
1533
  });
1547
- const DtTableSetting = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/tableSetting/index.vue"]]);
1548
1534
  const _hoisted_1$1 = { class: "dt-table-header" };
1549
1535
  const _hoisted_2 = { class: "flex flex-row justify-between" };
1550
1536
  const _hoisted_3 = { class: "flex flex-row flex-1" };
@@ -1576,24 +1562,23 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1576
1562
  return openBlock(), createElementBlock("div", _hoisted_1$1, [
1577
1563
  createElementVNode("div", _hoisted_2, [
1578
1564
  createElementVNode("div", _hoisted_3, [
1579
- unref(getActionsProps)?.buttonList.length ? (openBlock(), createBlock(unref(DtFormButtons), normalizeProps(mergeProps({ key: 0 }, unref(getActionsProps))), null, 16)) : createCommentVNode("v-if", true),
1565
+ unref(getActionsProps)?.buttonList.length ? (openBlock(), createBlock(unref(DtFormButtons), normalizeProps(mergeProps({ key: 0 }, unref(getActionsProps))), null, 16)) : createCommentVNode("", true),
1580
1566
  renderSlot(_ctx.$slots, "toolbar")
1581
1567
  ]),
1582
1568
  __props.tableSetting ? (openBlock(), createElementBlock("div", _hoisted_4, [
1583
- createVNode(DtTableSetting, { setting: __props.tableSetting }, null, 8, ["setting"])
1584
- ])) : createCommentVNode("v-if", true)
1569
+ createVNode(_sfc_main$3, { setting: __props.tableSetting }, null, 8, ["setting"])
1570
+ ])) : createCommentVNode("", true)
1585
1571
  ]),
1586
1572
  _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5, [
1587
1573
  renderSlot(_ctx.$slots, "headerTop")
1588
- ])) : createCommentVNode("v-if", true)
1574
+ ])) : createCommentVNode("", true)
1589
1575
  ]);
1590
1576
  };
1591
1577
  }
1592
1578
  });
1593
- const TableHeader = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/TableHeader.vue"]]);
1594
1579
  function useTableHeader(propsRef, slots, handlers) {
1595
1580
  const { t } = useI18n("UI");
1596
- const getHeaderProps = computed$1(() => {
1581
+ const getHeaderProps = computed(() => {
1597
1582
  const TABLE_TOOLS = [
1598
1583
  { t: "\u65B0\u589E", label: t("ADD"), preIcon: "mdi:plus", type: "primary", onClick: unref(propsRef).onOPenAddDialog },
1599
1584
  { t: "\u5220\u9664", label: t("DELETE"), preIcon: "mdi:delete-outline", onClick: unref(propsRef).onDeletes }
@@ -1603,7 +1588,7 @@ function useTableHeader(propsRef, slots, handlers) {
1603
1588
  const hideTitle = (!toolbar || !toolbar.filter((it) => it.show ?? true).length) && !slots.toolbar && !slots.headerTop && !tableSetting;
1604
1589
  return {
1605
1590
  title: hideTitle ? null : () => h$1(
1606
- TableHeader,
1591
+ _sfc_main$2,
1607
1592
  {
1608
1593
  tableSetting,
1609
1594
  toolbar,
@@ -1653,7 +1638,7 @@ function usePagination(props2) {
1653
1638
  }
1654
1639
  }
1655
1640
  );
1656
- const getPaginationInfo = computed$1(() => {
1641
+ const getPaginationInfo = computed(() => {
1657
1642
  const { appConf } = useAppStore();
1658
1643
  let { pagination } = unref(props2);
1659
1644
  if (isBoolean(pagination) && !pagination) {
@@ -1706,7 +1691,7 @@ const DEFAULT_CONFIG = {
1706
1691
  function useRowSelection(propsRef, emit) {
1707
1692
  const selectedRowKeysRef = ref([]);
1708
1693
  const selectedRowRef = ref([]);
1709
- const getRowSelectionRef = computed$1(() => {
1694
+ const getRowSelectionRef = computed(() => {
1710
1695
  const { rowSelection, showCheckboxColumn, checkStrictly } = unref(propsRef);
1711
1696
  if (!rowSelection && !showCheckboxColumn)
1712
1697
  return null;
@@ -1806,7 +1791,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
1806
1791
  let oldPageNum = -1;
1807
1792
  const debounceRedoHeight = useDebounceFn(redoHeight, 100);
1808
1793
  windowResizeFn(calcTableHeight, 280);
1809
- const getCanResize = computed$1(() => {
1794
+ const getCanResize = computed(() => {
1810
1795
  const { canResize, scroll } = unref(propsRef);
1811
1796
  return canResize && !(scroll || {}).y;
1812
1797
  });
@@ -1894,7 +1879,7 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
1894
1879
  return;
1895
1880
  virtual ? calcTableScroll() : filterSource.value = unref(propsRef)?.dataSource;
1896
1881
  }
1897
- const getScrollX = computed$1(() => {
1882
+ const getScrollX = computed(() => {
1898
1883
  let width = 0;
1899
1884
  if (unref(rowSelectionRef)) {
1900
1885
  width += 32;
@@ -1908,11 +1893,11 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
1908
1893
  const tableWidth = table?.$el?.offsetWidth ?? 0;
1909
1894
  return tableWidth > width ? "100%" : width;
1910
1895
  });
1911
- const hideScrollX = computed$1(() => {
1896
+ const hideScrollX = computed(() => {
1912
1897
  let operations = unref(propsRef).operations;
1913
1898
  return !operations || isObject(operations) && operations?.btns && !operations?.btns?.length || isArray(operations) && !operations.length;
1914
1899
  });
1915
- const getScrollRef = computed$1(() => {
1900
+ const getScrollRef = computed(() => {
1916
1901
  const tableHeight = unref(tableHeightRef);
1917
1902
  const { canResize, scroll } = unref(propsRef);
1918
1903
  return {
@@ -1982,14 +1967,14 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
1982
1967
  };
1983
1968
  }
1984
1969
  function useRows(propsRef) {
1985
- function getRowClassName(record, index2) {
1970
+ function getRowClassName(record, index) {
1986
1971
  const { striped, rowClassName } = unref(propsRef);
1987
1972
  const classNames = [];
1988
1973
  if (striped) {
1989
- classNames.push(index2 % 2 === 1 ? "table-striped" : "");
1974
+ classNames.push(index % 2 === 1 ? "table-striped" : "");
1990
1975
  }
1991
1976
  if (rowClassName && isFunction(rowClassName)) {
1992
- classNames.push(rowClassName(record, index2));
1977
+ classNames.push(rowClassName(record, index));
1993
1978
  }
1994
1979
  return classNames.join(" ");
1995
1980
  }
@@ -2019,7 +2004,7 @@ const _sfc_main$1 = {
2019
2004
  const {
2020
2005
  column,
2021
2006
  record,
2022
- index: index2
2007
+ index
2023
2008
  } = props2;
2024
2009
  const {
2025
2010
  render,
@@ -2061,7 +2046,7 @@ const _sfc_main$1 = {
2061
2046
  });
2062
2047
  }
2063
2048
  } else if (isFunction(render)) {
2064
- let afterRenderData = render(record, index2, text);
2049
+ let afterRenderData = render(record, index, text);
2065
2050
  if (afterRenderData.__v_isRef) {
2066
2051
  renderText = afterRenderData;
2067
2052
  } else if (afterRenderData["setup"]) {
@@ -2079,7 +2064,6 @@ const _sfc_main$1 = {
2079
2064
  return () => createVNode("span", null, [unref(renderText)]);
2080
2065
  }
2081
2066
  };
2082
- const TableRender = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/components/TableRender.vue"]]);
2083
2067
  const DEFAULT_SORT_FN = (sortInfo) => {
2084
2068
  const { field, order } = sortInfo;
2085
2069
  return field && order ? { field, order } : {};
@@ -2181,11 +2165,11 @@ const TableProps = {
2181
2165
  },
2182
2166
  onOpenUpdateDialog: {
2183
2167
  type: Function,
2184
- default: (row, index2) => ({})
2168
+ default: (row, index) => ({})
2185
2169
  },
2186
2170
  onDelete: {
2187
2171
  type: Function,
2188
- default: (row, index2) => ({})
2172
+ default: (row, index) => ({})
2189
2173
  },
2190
2174
  onDeletes: {
2191
2175
  type: Function,
@@ -2216,11 +2200,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2216
2200
  const attrs = useAttrs();
2217
2201
  const slots = useSlots$1();
2218
2202
  const innerPropsRef = ref();
2219
- const getProps = computed$1(() => {
2203
+ const getProps = computed(() => {
2220
2204
  return { ...props2, ...unref(innerPropsRef) };
2221
2205
  });
2222
2206
  const { getRowClassName } = useRows(getProps);
2223
- const tableCls = computed$1(() => {
2207
+ const tableCls = computed(() => {
2224
2208
  return [
2225
2209
  "dt-table",
2226
2210
  "box-border",
@@ -2262,7 +2246,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2262
2246
  clearSelectedRowKeys
2263
2247
  }
2264
2248
  );
2265
- const getBind = computed$1(() => {
2249
+ const getBind = computed(() => {
2266
2250
  return {
2267
2251
  ...attrs,
2268
2252
  ...unref(getProps),
@@ -2333,16 +2317,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2333
2317
  rowClassName: unref(getRowClassName),
2334
2318
  onChange: unref(handleTableChange)
2335
2319
  }), createSlots({
2336
- bodyCell: withCtx(({ column, record, index: index2 }) => [
2337
- _ctx.$slots.bodyCell ? renderSlot(_ctx.$slots, "bodyCell", normalizeProps(mergeProps({ key: 0 }, { column, record, index: index2 }))) : createCommentVNode("v-if", true),
2338
- column.slot ? renderSlot(_ctx.$slots, column.slot, normalizeProps(mergeProps({ key: 1 }, { column, record, index: index2 }))) : createCommentVNode("v-if", true),
2339
- createCommentVNode(" \u9759\u6001\u7684\u6570\u636E\u53EF\u4EE5\u901A\u8FC7customRender, \u4F46\u662F\u54CD\u5E94\u5F0F\u6570\u636E, \u5F02\u6B65\u51FD\u6570,\u7EC4\u4EF6\u7B49\u9700\u8981\u4F7F\u7528bodyCell\u6E32\u67D3 "),
2340
- column?.render && !column.slot && !_ctx.$slots.bodyCell ? (openBlock(), createBlock(TableRender, {
2320
+ bodyCell: withCtx(({ column, record, index }) => [
2321
+ _ctx.$slots.bodyCell ? renderSlot(_ctx.$slots, "bodyCell", normalizeProps(mergeProps({ key: 0 }, { column, record, index }))) : createCommentVNode("", true),
2322
+ column.slot ? renderSlot(_ctx.$slots, column.slot, normalizeProps(mergeProps({ key: 1 }, { column, record, index }))) : createCommentVNode("", true),
2323
+ column?.render && !column.slot && !_ctx.$slots.bodyCell ? (openBlock(), createBlock(_sfc_main$1, {
2341
2324
  key: 2,
2342
2325
  column,
2343
2326
  record,
2344
- index: index2
2345
- }, null, 8, ["column", "record", "index"])) : createCommentVNode("v-if", true)
2327
+ index
2328
+ }, null, 8, ["column", "record", "index"])) : createCommentVNode("", true)
2346
2329
  ]),
2347
2330
  emptyText: withCtx(() => [
2348
2331
  _hoisted_1
@@ -2361,8 +2344,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
2361
2344
  };
2362
2345
  }
2363
2346
  });
2364
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/index.vue"]]);
2365
2347
  export {
2366
- index as DtTable,
2348
+ _sfc_main as DtTable,
2367
2349
  useTable
2368
2350
  };
@@ -0,0 +1,5 @@
1
+ export declare enum TABLE_SIZE_HEIGHT {
2
+ large = 56,
3
+ middle = 47,
4
+ small = 32
5
+ }
@@ -45,11 +45,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
45
45
  default: any;
46
46
  };
47
47
  filterFn: {
48
- type: import("vue").PropType<(data: Partial<import("@dt-frames/core").Recordable<string[]>>) => any>;
49
- default: (data: Partial<import("@dt-frames/core").Recordable<string[]>>) => Partial<import("@dt-frames/core").Recordable<string[]>>;
48
+ type: import("vue").PropType<(data: import("@dt-frames/core").Recordable<string[]>) => any>;
49
+ default: (data: import("@dt-frames/core").Recordable<string[]>) => import("@dt-frames/core").Recordable<string[]>;
50
50
  };
51
51
  rowKey: {
52
- type: StringConstructor;
52
+ type: import("vue").PropType<string | number>;
53
53
  default: string;
54
54
  };
55
55
  columnCode: {
@@ -192,7 +192,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
192
192
  locale?: import("ant-design-vue/es/table/interface").TableLocale;
193
193
  prefixCls?: string;
194
194
  onChange?: (pagination: import("ant-design-vue/es/table").TablePaginationConfig, filters: Record<string, import("ant-design-vue/es/table/interface").FilterValue>, sorter: import("ant-design-vue/es/table/interface").SorterResult<any> | import("ant-design-vue/es/table/interface").SorterResult<any>[], extra: import("ant-design-vue/es/table/interface").TableCurrentDataSource<any>) => void;
195
- rowKey: string | (import("ant-design-vue/es/vc-table/interface").GetRowKey<any> & string);
195
+ rowKey: (string | import("ant-design-vue/es/vc-table/interface").GetRowKey<any>) & (string | number);
196
196
  dataSource: import("@dt-frames/core").Recordable<any>[];
197
197
  bordered: boolean;
198
198
  loading: (boolean | Partial<import("vue").ExtractPropTypes<{
@@ -302,7 +302,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
302
302
  resizable: boolean;
303
303
  virtual: boolean;
304
304
  sortFn: Function;
305
- filterFn: (data: Partial<import("@dt-frames/core").Recordable<string[]>>) => any;
305
+ filterFn: (data: import("@dt-frames/core").Recordable<string[]>) => any;
306
306
  columnCode: string;
307
307
  columns: import("./types/table.type").BasicColumn[];
308
308
  slotsTemplate: {};
@@ -444,11 +444,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
444
444
  default: any;
445
445
  };
446
446
  filterFn: {
447
- type: import("vue").PropType<(data: Partial<import("@dt-frames/core").Recordable<string[]>>) => any>;
448
- default: (data: Partial<import("@dt-frames/core").Recordable<string[]>>) => Partial<import("@dt-frames/core").Recordable<string[]>>;
447
+ type: import("vue").PropType<(data: import("@dt-frames/core").Recordable<string[]>) => any>;
448
+ default: (data: import("@dt-frames/core").Recordable<string[]>) => import("@dt-frames/core").Recordable<string[]>;
449
449
  };
450
450
  rowKey: {
451
- type: StringConstructor;
451
+ type: import("vue").PropType<string | number>;
452
452
  default: string;
453
453
  };
454
454
  columnCode: {
@@ -593,8 +593,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
593
593
  virtual: boolean;
594
594
  sortFn: Function;
595
595
  defSort: any;
596
- filterFn: (data: Partial<import("@dt-frames/core").Recordable<string[]>>) => any;
597
- rowKey: string;
596
+ filterFn: (data: import("@dt-frames/core").Recordable<string[]>) => any;
597
+ rowKey: string | number;
598
598
  columnCode: string;
599
599
  columns: import("./types/table.type").BasicColumn[];
600
600
  slotsTemplate: {};
@@ -49,11 +49,11 @@ export declare const TableProps: {
49
49
  default: any;
50
50
  };
51
51
  filterFn: {
52
- type: PropType<(data: Partial<Recordable<string[]>>) => any>;
53
- default: (data: Partial<Recordable<string[]>>) => Partial<Recordable<string[]>>;
52
+ type: PropType<(data: Recordable<string[]>) => any>;
53
+ default: (data: Recordable<string[]>) => Recordable<string[]>;
54
54
  };
55
55
  rowKey: {
56
- type: StringConstructor;
56
+ type: PropType<string | number>;
57
57
  default: string;
58
58
  };
59
59
  columnCode: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-frames/ui",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.ts",