gi-component 0.0.53 → 0.0.55

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 (37) hide show
  1. package/dist/components/button/src/button.d.ts +2 -2
  2. package/dist/components/button/src/button.d.ts.map +1 -1
  3. package/dist/components/button/src/type.d.ts +2 -1
  4. package/dist/components/button/src/type.d.ts.map +1 -1
  5. package/dist/components/comment/index.d.ts +5 -0
  6. package/dist/components/comment/index.d.ts.map +1 -0
  7. package/dist/components/comment/src/comment.d.ts +37 -0
  8. package/dist/components/comment/src/comment.d.ts.map +1 -0
  9. package/dist/components/comment/src/type.d.ts +7 -0
  10. package/dist/components/comment/src/type.d.ts.map +1 -0
  11. package/dist/components/dialog/src/create-dialog.d.ts +29 -13
  12. package/dist/components/dialog/src/create-dialog.d.ts.map +1 -1
  13. package/dist/components/drawer/src/create-drawer.d.ts +9 -5
  14. package/dist/components/drawer/src/create-drawer.d.ts.map +1 -1
  15. package/dist/components/edit-table/index.d.ts +25 -3
  16. package/dist/components/edit-table/index.d.ts.map +1 -1
  17. package/dist/components/edit-table/src/type.d.ts +225 -3
  18. package/dist/components/edit-table/src/type.d.ts.map +1 -1
  19. package/dist/components/form/index.d.ts +2 -2
  20. package/dist/components/form/index.d.ts.map +1 -1
  21. package/dist/components/grid/src/grid.d.ts.map +1 -1
  22. package/dist/components/input-search/src/input-search.d.ts +2 -2
  23. package/dist/components/table/index.d.ts +2 -2
  24. package/dist/components/table/index.d.ts.map +1 -1
  25. package/dist/components/table/src/table-column.d.ts +1 -14
  26. package/dist/components/table/src/table-column.d.ts.map +1 -1
  27. package/dist/components/table/src/type.d.ts +2 -1
  28. package/dist/components/table/src/type.d.ts.map +1 -1
  29. package/dist/gi.css +1 -1
  30. package/dist/global.d.ts +1 -0
  31. package/dist/index.d.ts +13 -2
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.es.js +291 -105
  34. package/dist/index.es.js.map +1 -1
  35. package/dist/index.umd.js +1 -1
  36. package/dist/index.umd.js.map +1 -1
  37. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, ref, onMounted, watch, toValue, toRef, nextTick, onUnmounted, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, resolveDynamicComponent, resolveComponent, h, createApp, onUpdated, inject, toRefs, watchEffect, reactive, provide, onBeforeUnmount, resolveDirective, normalizeProps, guardReactiveProps, withDirectives, useTemplateRef } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, ref, onMounted, watch, toValue, toRef, nextTick, onUnmounted, useAttrs, computed, createBlock, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, createVNode, createSlots, Fragment, renderList, mergeModels, useModel, resolveDynamicComponent, resolveComponent, createApp, h, onUpdated, inject, toRefs, watchEffect, reactive, provide, onBeforeUnmount, normalizeProps, guardReactiveProps, useTemplateRef } from "vue";
2
2
  import * as El from "element-plus";
3
- import El__default, { ElButton, ElSpace, ElDescriptions, ElDescriptionsItem, ElDialog, ElIcon, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElSplitter, ElSplitterPanel, ElRow, ElPagination, ElTabs, ElTabPane, ElCheckbox, ElScrollbar, ElTree, ElCheckboxGroup, ElEmpty } from "element-plus";
3
+ import El__default, { ElButton, ElSpace, ElAvatar, ElDescriptions, ElDescriptionsItem, ElDialog, ElIcon, ElDrawer, ElInput, ElForm, ElTable, ElTableColumn, ElFormItem, ElText, ElMessage, ElSplitter, ElSplitterPanel, ElRow, ElPagination, ElTabs, ElTabPane, ElCheckbox, ElScrollbar, ElTree, ElCheckboxGroup, ElEmpty } from "element-plus";
4
4
  /*! Element Plus Icons Vue v2.3.2 */
5
5
  var _sfc_main6 = /* @__PURE__ */ defineComponent({
6
6
  name: "ArrowDown",
@@ -660,7 +660,7 @@ function useNavTabs(options) {
660
660
  canScrollRight
661
661
  };
662
662
  }
663
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
663
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
664
664
  __name: "button",
665
665
  props: {
666
666
  type: { default: "" },
@@ -702,13 +702,17 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
702
702
  print: { btnProps: { icon: printer_default }, btnText: "打印" }
703
703
  };
704
704
  const bindProps = computed(() => {
705
- var _a;
706
- const btnProps = ((_a = obj == null ? void 0 : obj[props.type]) == null ? void 0 : _a.btnProps) || { type: props.type };
707
- return { ...attrs, ...props, ...btnProps };
705
+ if (props.type in obj) {
706
+ const { type: _, ...restProps2 } = props;
707
+ return { ...attrs, ...restProps2, ...obj[props.type].btnProps };
708
+ }
709
+ const { type, ...restProps } = props;
710
+ return { ...attrs, ...restProps, type };
708
711
  });
709
712
  const btnText = computed(() => {
710
- var _a;
711
- return ((_a = obj == null ? void 0 : obj[props.type]) == null ? void 0 : _a.btnText) || "";
713
+ if (props.type in obj)
714
+ return obj[props.type].btnText;
715
+ return "";
712
716
  });
713
717
  return (_ctx, _cache) => {
714
718
  return openBlock(), createBlock(unref(ElButton), mergeProps({
@@ -726,7 +730,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
726
730
  };
727
731
  }
728
732
  });
729
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
733
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
730
734
  __name: "card",
731
735
  props: {
732
736
  title: { default: "" },
@@ -811,7 +815,91 @@ const _export_sfc = (sfc, props) => {
811
815
  }
812
816
  return target;
813
817
  };
814
- const Card = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-4f2bae7b"]]);
818
+ const Card = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4f2bae7b"]]);
819
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
820
+ __name: "comment",
821
+ props: {
822
+ author: { default: "" },
823
+ avatar: { default: "" },
824
+ content: { default: "" },
825
+ datetime: { default: "" }
826
+ },
827
+ setup(__props) {
828
+ const props = __props;
829
+ const slots = useSlots();
830
+ const { b } = useBemClass();
831
+ const hasAuthor = computed(() => !!slots.author || !!props.author);
832
+ const hasDatetime = computed(() => !!slots.datetime || !!props.datetime);
833
+ const hasContent = computed(() => !!slots.content || !!props.content);
834
+ return (_ctx, _cache) => {
835
+ return openBlock(), createElementBlock("div", {
836
+ class: normalizeClass(unref(b)("comment"))
837
+ }, [
838
+ createElementVNode("div", {
839
+ class: normalizeClass(unref(b)("comment__inner"))
840
+ }, [
841
+ createElementVNode("div", {
842
+ class: normalizeClass(unref(b)("comment__avatar"))
843
+ }, [
844
+ renderSlot(_ctx.$slots, "avatar", {}, () => [
845
+ props.avatar ? (openBlock(), createBlock(unref(ElAvatar), {
846
+ key: 0,
847
+ size: 40,
848
+ src: props.avatar
849
+ }, null, 8, ["src"])) : createCommentVNode("", true)
850
+ ], true)
851
+ ], 2),
852
+ createElementVNode("div", {
853
+ class: normalizeClass(unref(b)("comment__content"))
854
+ }, [
855
+ hasAuthor.value || hasDatetime.value ? (openBlock(), createElementBlock("div", {
856
+ key: 0,
857
+ class: normalizeClass(unref(b)("comment__content-author"))
858
+ }, [
859
+ hasAuthor.value ? (openBlock(), createElementBlock("span", {
860
+ key: 0,
861
+ class: normalizeClass(unref(b)("comment__author"))
862
+ }, [
863
+ renderSlot(_ctx.$slots, "author", {}, () => [
864
+ createTextVNode(toDisplayString(props.author), 1)
865
+ ], true)
866
+ ], 2)) : createCommentVNode("", true),
867
+ hasDatetime.value ? (openBlock(), createElementBlock("span", {
868
+ key: 1,
869
+ class: normalizeClass(unref(b)("comment__datetime"))
870
+ }, [
871
+ renderSlot(_ctx.$slots, "datetime", {}, () => [
872
+ createTextVNode(toDisplayString(props.datetime), 1)
873
+ ], true)
874
+ ], 2)) : createCommentVNode("", true)
875
+ ], 2)) : createCommentVNode("", true),
876
+ hasContent.value ? (openBlock(), createElementBlock("div", {
877
+ key: 1,
878
+ class: normalizeClass(unref(b)("comment__content-detail"))
879
+ }, [
880
+ renderSlot(_ctx.$slots, "content", {}, () => [
881
+ createTextVNode(toDisplayString(props.content), 1)
882
+ ], true)
883
+ ], 2)) : createCommentVNode("", true),
884
+ unref(slots).actions ? (openBlock(), createElementBlock("div", {
885
+ key: 2,
886
+ class: normalizeClass(unref(b)("comment__actions"))
887
+ }, [
888
+ renderSlot(_ctx.$slots, "actions", {}, void 0, true)
889
+ ], 2)) : createCommentVNode("", true)
890
+ ], 2)
891
+ ], 2),
892
+ unref(slots).default ? (openBlock(), createElementBlock("div", {
893
+ key: 0,
894
+ class: normalizeClass(unref(b)("comment__nested"))
895
+ }, [
896
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
897
+ ], 2)) : createCommentVNode("", true)
898
+ ], 2);
899
+ };
900
+ }
901
+ });
902
+ const Comment = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-fd6e787e"]]);
815
903
  const _hoisted_1$6 = { key: 2 };
816
904
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
817
905
  __name: "descriptions",
@@ -1190,27 +1278,42 @@ const DEF_OPTIONS$1 = {
1190
1278
  // footer: true,
1191
1279
  // closeOnClickModal: true
1192
1280
  };
1281
+ function buildMessageOptions(type, options) {
1282
+ return {
1283
+ ...options,
1284
+ content: () => h(DialogContent, { type, content: options.content ?? "" }),
1285
+ simple: true,
1286
+ style: { maxWidth: "420px", ...options.style },
1287
+ lockScroll: false
1288
+ };
1289
+ }
1193
1290
  function createDialog() {
1194
1291
  const Dialog2 = {
1292
+ /** 主应用上下文,需在 app.use 后赋值:Dialog._context = app._context */
1195
1293
  _context: {},
1196
- // 核心创建方法
1294
+ /** 核心创建方法 */
1197
1295
  create(options) {
1198
1296
  const mergedOptions = { ...DEF_OPTIONS$1, ...options };
1199
1297
  const container = document.createElement("div");
1200
1298
  document.body.appendChild(container);
1201
1299
  const visible = ref(true);
1202
- const dialogOptions = ref(mergedOptions || {});
1203
- const dialogApp = createApp({
1300
+ const dialogOptions = ref({ ...mergedOptions });
1301
+ let destroyed = false;
1302
+ let dialogApp;
1303
+ const destroy = () => {
1304
+ if (destroyed)
1305
+ return;
1306
+ destroyed = true;
1307
+ dialogApp.unmount();
1308
+ container.remove();
1309
+ };
1310
+ dialogApp = createApp({
1204
1311
  setup() {
1205
- const closed = () => {
1206
- dialogApp.unmount();
1207
- container.remove();
1208
- };
1209
1312
  return () => h(DialogComponent, {
1210
1313
  ...dialogOptions.value,
1211
1314
  "modelValue": visible.value,
1212
1315
  "onUpdate:modelValue": (val) => visible.value = val,
1213
- "onClosed": () => closed()
1316
+ "onClosed": destroy
1214
1317
  });
1215
1318
  }
1216
1319
  });
@@ -1218,59 +1321,36 @@ function createDialog() {
1218
1321
  Object.assign(dialogApp._context, Dialog2._context);
1219
1322
  dialogApp.mount(container);
1220
1323
  return {
1221
- /** 关闭对话框 */
1324
+ /** 关闭对话框,等待关闭动画结束后由 onClosed 触发销毁 */
1222
1325
  close: () => {
1223
1326
  visible.value = false;
1224
- setTimeout(() => {
1225
- dialogApp.unmount();
1226
- container.remove();
1227
- }, 300);
1228
1327
  },
1229
- /** 更新对话框 */
1328
+ /** 动态更新对话框 props */
1230
1329
  update: (newProps) => {
1231
- dialogOptions.value = { ...dialogOptions.value, ...newProps };
1330
+ if (newProps)
1331
+ dialogOptions.value = { ...dialogOptions.value, ...newProps };
1232
1332
  }
1233
1333
  };
1234
1334
  },
1235
- /** 对话框-打开 */
1335
+ /** 打开对话框 */
1236
1336
  open(options) {
1237
1337
  return this.create(options);
1238
1338
  },
1339
+ /** 信息提示框 */
1239
1340
  info(options) {
1240
- return this.create({
1241
- ...options,
1242
- content: () => h(DialogContent, { type: "info", content: options.content }),
1243
- simple: true,
1244
- style: { maxWidth: "420px", ...options.style },
1245
- lockScroll: false
1246
- });
1341
+ return this.create(buildMessageOptions("info", options));
1247
1342
  },
1343
+ /** 成功提示框 */
1248
1344
  success(options) {
1249
- return this.create({
1250
- ...options,
1251
- content: () => h(DialogContent, { type: "success", content: options.content }),
1252
- simple: true,
1253
- style: { maxWidth: "420px", ...options.style },
1254
- lockScroll: false
1255
- });
1345
+ return this.create(buildMessageOptions("success", options));
1256
1346
  },
1347
+ /** 警告提示框 */
1257
1348
  warning(options) {
1258
- return this.create({
1259
- ...options,
1260
- content: () => h(DialogContent, { type: "warning", content: options.content }),
1261
- simple: true,
1262
- style: { maxWidth: "420px", ...options.style },
1263
- lockScroll: false
1264
- });
1349
+ return this.create(buildMessageOptions("warning", options));
1265
1350
  },
1351
+ /** 错误提示框 */
1266
1352
  error(options) {
1267
- return this.create({
1268
- ...options,
1269
- content: () => h(DialogContent, { type: "error", content: options.content }),
1270
- simple: true,
1271
- style: { maxWidth: "420px", ...options.style },
1272
- lockScroll: false
1273
- });
1353
+ return this.create(buildMessageOptions("error", options));
1274
1354
  }
1275
1355
  };
1276
1356
  return Dialog2;
@@ -1521,25 +1601,31 @@ const Drawer$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v
1521
1601
  const DEF_OPTIONS = {};
1522
1602
  function createDrawer() {
1523
1603
  const Drawer2 = {
1604
+ /** 主应用上下文,需在 app.use 后赋值:Drawer._context = app._context */
1524
1605
  _context: {},
1525
- // 核心创建方法
1606
+ /** 核心创建方法 */
1526
1607
  create(options) {
1527
1608
  const mergedOptions = { ...DEF_OPTIONS, ...options };
1528
1609
  const container = document.createElement("div");
1529
1610
  document.body.appendChild(container);
1530
1611
  const visible = ref(true);
1531
- const dialogOptions = ref(mergedOptions || {});
1532
- const drawerApp = createApp({
1612
+ const drawerOptions = ref({ ...mergedOptions });
1613
+ let destroyed = false;
1614
+ let drawerApp;
1615
+ const destroy = () => {
1616
+ if (destroyed)
1617
+ return;
1618
+ destroyed = true;
1619
+ drawerApp.unmount();
1620
+ container.remove();
1621
+ };
1622
+ drawerApp = createApp({
1533
1623
  setup() {
1534
- const closed = () => {
1535
- drawerApp.unmount();
1536
- container.remove();
1537
- };
1538
1624
  return () => h(Drawer$1, {
1539
- ...dialogOptions.value,
1625
+ ...drawerOptions.value,
1540
1626
  "modelValue": visible.value,
1541
1627
  "onUpdate:modelValue": (val) => visible.value = val,
1542
- "onClosed": () => closed()
1628
+ "onClosed": destroy
1543
1629
  });
1544
1630
  }
1545
1631
  });
@@ -1547,21 +1633,18 @@ function createDrawer() {
1547
1633
  Object.assign(drawerApp._context, Drawer2._context);
1548
1634
  drawerApp.mount(container);
1549
1635
  return {
1550
- /** 关闭抽屉 */
1636
+ /** 关闭抽屉,等待关闭动画结束后由 onClosed 触发销毁 */
1551
1637
  close: () => {
1552
1638
  visible.value = false;
1553
- setTimeout(() => {
1554
- drawerApp.unmount();
1555
- container.remove();
1556
- }, 300);
1557
1639
  },
1558
- /** 更新抽屉 */
1640
+ /** 动态更新抽屉 props */
1559
1641
  update: (newProps) => {
1560
- dialogOptions.value = { ...dialogOptions.value, ...newProps };
1642
+ if (newProps)
1643
+ drawerOptions.value = { ...drawerOptions.value, ...newProps };
1561
1644
  }
1562
1645
  };
1563
1646
  },
1564
- /** 抽屉-打开 */
1647
+ /** 打开抽屉 */
1565
1648
  open(options) {
1566
1649
  return this.create(options);
1567
1650
  }
@@ -1642,15 +1725,85 @@ const clearable = false;
1642
1725
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
1643
1726
  __name: "edit-table",
1644
1727
  props: {
1645
- rowKey: { default: "id" },
1646
- data: { default: () => [] },
1647
1728
  columns: { default: () => [] },
1648
- cellDisabled: {}
1729
+ cellDisabled: { type: [Boolean, Function] },
1730
+ disabled: { type: Boolean },
1731
+ data: { default: () => [] },
1732
+ height: {},
1733
+ maxHeight: {},
1734
+ stripe: { type: Boolean },
1735
+ border: { type: Boolean, default: true },
1736
+ size: {},
1737
+ fit: { type: Boolean },
1738
+ showHeader: { type: Boolean, default: true },
1739
+ highlightCurrentRow: { type: Boolean },
1740
+ currentRowKey: {},
1741
+ rowClassName: {},
1742
+ rowStyle: {},
1743
+ cellClassName: {},
1744
+ cellStyle: {},
1745
+ headerRowClassName: {},
1746
+ headerRowStyle: {},
1747
+ headerCellClassName: {},
1748
+ headerCellStyle: {},
1749
+ rowKey: { type: [String, Function], default: "id" },
1750
+ emptyText: {},
1751
+ defaultExpandAll: { type: Boolean },
1752
+ expandRowKeys: {},
1753
+ defaultSort: {},
1754
+ tooltipEffect: {},
1755
+ tooltipOptions: {},
1756
+ appendFilterPanelTo: {},
1757
+ showSummary: { type: Boolean },
1758
+ sumText: {},
1759
+ summaryMethod: {},
1760
+ spanMethod: {},
1761
+ selectOnIndeterminate: { type: Boolean },
1762
+ indent: {},
1763
+ lazy: { type: Boolean },
1764
+ load: {},
1765
+ treeProps: {},
1766
+ tableLayout: {},
1767
+ scrollbarAlwaysOn: { type: Boolean },
1768
+ showOverflowTooltip: { type: [Boolean, Object] },
1769
+ flexible: { type: Boolean },
1770
+ scrollbarTabindex: {},
1771
+ allowDragLastColumn: { type: Boolean },
1772
+ tooltipFormatter: {},
1773
+ preserveExpandedContent: { type: Boolean },
1774
+ nativeScrollbar: { type: Boolean },
1775
+ rowExpandable: {},
1776
+ onSelect: {},
1777
+ onSelectAll: {},
1778
+ onSelectionChange: {},
1779
+ onCellMouseEnter: {},
1780
+ onCellMouseLeave: {},
1781
+ onCellClick: {},
1782
+ onCellDblclick: {},
1783
+ onCellContextmenu: {},
1784
+ onRowClick: {},
1785
+ onRowContextmenu: {},
1786
+ onRowDblclick: {},
1787
+ onHeaderClick: {},
1788
+ onHeaderContextmenu: {},
1789
+ onSortChange: {},
1790
+ onFilterChange: {},
1791
+ onCurrentChange: {},
1792
+ onHeaderDragend: {},
1793
+ onExpandChange: {},
1794
+ onScroll: {}
1649
1795
  },
1650
1796
  setup(__props, { expose: __expose }) {
1651
1797
  const props = __props;
1652
1798
  const attrs = useAttrs();
1653
1799
  const { b } = useBemClass();
1800
+ const tableProps = computed(() => {
1801
+ const { data, columns, cellDisabled, disabled, ...restProps } = props;
1802
+ return {
1803
+ ...attrs,
1804
+ ...restProps
1805
+ };
1806
+ });
1654
1807
  const COMP_MAP = {
1655
1808
  "input": El.ElInput,
1656
1809
  "textarea": El.ElInput,
@@ -1770,13 +1923,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1770
1923
  ref_key: "formRef",
1771
1924
  ref: formRef,
1772
1925
  model: form.value,
1773
- class: normalizeClass(unref(b)("edit-table"))
1926
+ class: normalizeClass(unref(b)("edit-table")),
1927
+ disabled: props.disabled
1774
1928
  }, {
1775
1929
  default: withCtx(() => [
1776
1930
  createVNode(unref(ElTable), mergeProps({
1777
1931
  data: form.value.tableData,
1778
1932
  border: ""
1779
- }, unref(attrs)), {
1933
+ }, tableProps.value), createSlots({
1780
1934
  default: withCtx(() => [
1781
1935
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (column, index2) => {
1782
1936
  return openBlock(), createBlock(unref(ElTableColumn), mergeProps({
@@ -1816,15 +1970,30 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1816
1970
  }, 1040, ["width", "prop", "label", "label-class-name"]);
1817
1971
  }), 128))
1818
1972
  ]),
1819
- _: 3
1820
- }, 16, ["data"])
1973
+ _: 2
1974
+ }, [
1975
+ _ctx.$slots.append ? {
1976
+ name: "append",
1977
+ fn: withCtx(() => [
1978
+ renderSlot(_ctx.$slots, "append", {}, void 0, true)
1979
+ ]),
1980
+ key: "0"
1981
+ } : void 0,
1982
+ _ctx.$slots.empty ? {
1983
+ name: "empty",
1984
+ fn: withCtx(() => [
1985
+ renderSlot(_ctx.$slots, "empty", {}, void 0, true)
1986
+ ]),
1987
+ key: "1"
1988
+ } : void 0
1989
+ ]), 1040, ["data"])
1821
1990
  ]),
1822
1991
  _: 3
1823
- }, 8, ["model", "class"]);
1992
+ }, 8, ["model", "class", "disabled"]);
1824
1993
  };
1825
1994
  }
1826
1995
  });
1827
- const EditTable = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-b88099ba"]]);
1996
+ const _EditTable = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-01bf53e6"]]);
1828
1997
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
1829
1998
  __name: "flex",
1830
1999
  props: {
@@ -2376,7 +2545,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2376
2545
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
2377
2546
  ], 6);
2378
2547
  }
2379
- const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render], ["__scopeId", "data-v-6eabaf75"]]);
2548
+ const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render], ["__scopeId", "data-v-f4d52836"]]);
2380
2549
  const _hoisted_1$2 = {
2381
2550
  key: 0,
2382
2551
  class: "w-full"
@@ -3152,6 +3321,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3152
3321
  }
3153
3322
  });
3154
3323
  const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0ed9c74a"]]);
3324
+ const TABLE_SLOTS_KEY = Symbol("tableSlots");
3155
3325
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3156
3326
  ...{
3157
3327
  name: "TableColumn"
@@ -3162,22 +3332,24 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3162
3332
  },
3163
3333
  setup(__props) {
3164
3334
  const props = __props;
3335
+ const tableSlots = inject(TABLE_SLOTS_KEY, useSlots());
3336
+ function renderColumnSlot(slotName, scope) {
3337
+ const slotFn = tableSlots[slotName];
3338
+ return slotFn ? slotFn(scope) : null;
3339
+ }
3165
3340
  const columnProps = computed(() => {
3166
3341
  const { slotName, render, children, ...restProps } = props.column;
3167
3342
  return restProps;
3168
3343
  });
3169
3344
  return (_ctx, _cache) => {
3170
3345
  const _component_TableColumn = resolveComponent("TableColumn", true);
3171
- const _directive_slots = resolveDirective("slots");
3172
3346
  return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(columnProps.value)), createSlots({
3173
3347
  default: withCtx(() => [
3174
3348
  _ctx.column.children && _ctx.column.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.column.children, (child) => {
3175
- return withDirectives((openBlock(), createBlock(_component_TableColumn, {
3349
+ return openBlock(), createBlock(_component_TableColumn, {
3176
3350
  key: child.prop || child.label,
3177
3351
  column: child
3178
- }, null, 8, ["column"])), [
3179
- [_directive_slots, _ctx.$slots]
3180
- ]);
3352
+ }, null, 8, ["column"]);
3181
3353
  }), 128)) : createCommentVNode("", true)
3182
3354
  ]),
3183
3355
  _: 2
@@ -3193,7 +3365,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3193
3365
  } : _ctx.column.slotName ? {
3194
3366
  name: "default",
3195
3367
  fn: withCtx((scope) => [
3196
- renderSlot(_ctx.$slots, _ctx.column.slotName, normalizeProps(guardReactiveProps(scope)))
3368
+ (openBlock(), createBlock(resolveDynamicComponent(() => renderColumnSlot(_ctx.column.slotName, scope))))
3197
3369
  ]),
3198
3370
  key: "1"
3199
3371
  } : void 0
@@ -3274,6 +3446,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3274
3446
  setup(__props, { expose: __expose }) {
3275
3447
  const props = __props;
3276
3448
  const attrs = useAttrs();
3449
+ const slots = useSlots();
3450
+ provide(TABLE_SLOTS_KEY, slots);
3277
3451
  const { b } = useBemClass();
3278
3452
  const tableRef = useTemplateRef("tableRef");
3279
3453
  const tableProps = computed(() => {
@@ -3303,26 +3477,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3303
3477
  ref_key: "tableRef",
3304
3478
  ref: tableRef,
3305
3479
  data: props.data
3306
- }), {
3480
+ }), createSlots({
3307
3481
  default: withCtx(() => [
3308
3482
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item) => {
3309
3483
  return openBlock(), createBlock(_sfc_main$4, {
3310
3484
  key: item.prop || item.label,
3311
3485
  column: item
3312
- }, createSlots({ _: 2 }, [
3313
- renderList(_ctx.$slots, (_, slotName) => {
3314
- return {
3315
- name: slotName,
3316
- fn: withCtx((scope) => [
3317
- renderSlot(_ctx.$slots, slotName, mergeProps({ ref_for: true }, scope), void 0, true)
3318
- ])
3319
- };
3320
- })
3321
- ]), 1032, ["column"]);
3486
+ }, null, 8, ["column"]);
3322
3487
  }), 128))
3323
3488
  ]),
3324
- _: 3
3325
- }, 16, ["data"]),
3489
+ _: 2
3490
+ }, [
3491
+ _ctx.$slots.append ? {
3492
+ name: "append",
3493
+ fn: withCtx(() => [
3494
+ renderSlot(_ctx.$slots, "append", {}, void 0, true)
3495
+ ]),
3496
+ key: "0"
3497
+ } : void 0,
3498
+ _ctx.$slots.empty ? {
3499
+ name: "empty",
3500
+ fn: withCtx(() => [
3501
+ renderSlot(_ctx.$slots, "empty", {}, void 0, true)
3502
+ ]),
3503
+ key: "1"
3504
+ } : void 0
3505
+ ]), 1040, ["data"]),
3326
3506
  props.pagination !== false ? (openBlock(), createBlock(unref(ElRow), {
3327
3507
  key: 0,
3328
3508
  justify: "end",
@@ -3340,7 +3520,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3340
3520
  };
3341
3521
  }
3342
3522
  });
3343
- const _Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-42ae2dfb"]]);
3523
+ const _Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-39da9c8f"]]);
3344
3524
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3345
3525
  __name: "tabs",
3346
3526
  props: /* @__PURE__ */ mergeModels({
@@ -9282,8 +9462,9 @@ const createSelectDialog = (params) => {
9282
9462
  };
9283
9463
  void [Dialog.info, Dialog.success, Dialog.warning, Dialog.error];
9284
9464
  const components = {
9285
- Button: _sfc_main$l,
9465
+ Button: _sfc_main$m,
9286
9466
  Card,
9467
+ Comment,
9287
9468
  Descriptions: _sfc_main$j,
9288
9469
  Drawer: Drawer$1,
9289
9470
  Dot,
@@ -9297,13 +9478,14 @@ const components = {
9297
9478
  Form: _Form,
9298
9479
  PageLayout,
9299
9480
  Dialog: DialogComponent,
9300
- EditTable,
9481
+ EditTable: _EditTable,
9301
9482
  Table: _Table,
9302
9483
  Tag,
9303
9484
  TreeTransfer
9304
9485
  };
9305
- const GiButton = _sfc_main$l;
9486
+ const GiButton = _sfc_main$m;
9306
9487
  const GiCard = Card;
9488
+ const GiComment = Comment;
9307
9489
  const GiDescriptions = _sfc_main$j;
9308
9490
  const GiDrawer = Drawer$1;
9309
9491
  const GiDot = Dot;
@@ -9317,7 +9499,7 @@ const GiGridItem = GridItem;
9317
9499
  const GiForm = _Form;
9318
9500
  const GiPageLayout = PageLayout;
9319
9501
  const GiDialog = DialogComponent;
9320
- const GiEditTable = EditTable;
9502
+ const GiEditTable = _EditTable;
9321
9503
  const GiTable = _Table;
9322
9504
  const GiTag = Tag;
9323
9505
  const GiTreeTransfer = TreeTransfer;
@@ -9341,6 +9523,7 @@ export {
9341
9523
  Drawer,
9342
9524
  GiButton,
9343
9525
  GiCard,
9526
+ GiComment,
9344
9527
  GiDescriptions,
9345
9528
  GiDialog,
9346
9529
  GiDot,
@@ -9358,6 +9541,9 @@ export {
9358
9541
  GiTabs,
9359
9542
  GiTag,
9360
9543
  GiTreeTransfer,
9544
+ Grid,
9545
+ GridItem,
9546
+ TABLE_SLOTS_KEY,
9361
9547
  createDialog,
9362
9548
  createDrawer,
9363
9549
  createSelectDialog,