gi-component 0.0.54 → 0.0.56
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.
- package/dist/components/button/src/button.d.ts +2 -2
- package/dist/components/button/src/button.d.ts.map +1 -1
- package/dist/components/button/src/type.d.ts +2 -1
- package/dist/components/button/src/type.d.ts.map +1 -1
- package/dist/components/comment/src/comment.d.ts.map +1 -1
- package/dist/components/dialog/src/create-dialog.d.ts +29 -13
- package/dist/components/dialog/src/create-dialog.d.ts.map +1 -1
- package/dist/components/dialog/src/dialog.d.ts +2 -0
- package/dist/components/dialog/src/dialog.d.ts.map +1 -1
- package/dist/components/drawer/src/create-drawer.d.ts +9 -5
- package/dist/components/drawer/src/create-drawer.d.ts.map +1 -1
- package/dist/components/edit-table/index.d.ts +25 -3
- package/dist/components/edit-table/index.d.ts.map +1 -1
- package/dist/components/edit-table/src/type.d.ts +225 -3
- package/dist/components/edit-table/src/type.d.ts.map +1 -1
- package/dist/components/flex/src/flex.d.ts.map +1 -1
- package/dist/components/grid/src/grid.d.ts.map +1 -1
- package/dist/components/input-search/src/input-search.d.ts +2 -2
- package/dist/components/table/src/table-column.d.ts +1 -14
- package/dist/components/table/src/table-column.d.ts.map +1 -1
- package/dist/components/table/src/type.d.ts +2 -1
- package/dist/components/table/src/type.d.ts.map +1 -1
- package/dist/gi.css +1 -1
- package/dist/index.es.js +208 -108
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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
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 */
|
|
@@ -702,13 +702,17 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
702
702
|
print: { btnProps: { icon: printer_default }, btnText: "打印" }
|
|
703
703
|
};
|
|
704
704
|
const bindProps = computed(() => {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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
|
-
|
|
711
|
-
|
|
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({
|
|
@@ -895,7 +899,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
895
899
|
};
|
|
896
900
|
}
|
|
897
901
|
});
|
|
898
|
-
const Comment = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-
|
|
902
|
+
const Comment = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-fd6e787e"]]);
|
|
899
903
|
const _hoisted_1$6 = { key: 2 };
|
|
900
904
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
901
905
|
__name: "descriptions",
|
|
@@ -1027,13 +1031,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
1027
1031
|
onBeforeOk: {},
|
|
1028
1032
|
onCancel: {},
|
|
1029
1033
|
appendToBody: { type: Boolean },
|
|
1030
|
-
appendTo: {},
|
|
1034
|
+
appendTo: { default: "body" },
|
|
1031
1035
|
beforeClose: {},
|
|
1032
1036
|
destroyOnClose: { type: Boolean },
|
|
1033
1037
|
closeOnClickModal: { type: Boolean, default: true },
|
|
1034
1038
|
closeOnPressEscape: { type: Boolean },
|
|
1035
1039
|
lockScroll: { type: Boolean, default: true },
|
|
1036
|
-
modal: { type: Boolean },
|
|
1040
|
+
modal: { type: Boolean, default: true },
|
|
1037
1041
|
modalPenetrable: { type: Boolean },
|
|
1038
1042
|
openDelay: {},
|
|
1039
1043
|
closeDelay: {},
|
|
@@ -1236,7 +1240,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
1236
1240
|
};
|
|
1237
1241
|
}
|
|
1238
1242
|
});
|
|
1239
|
-
const DialogComponent = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
1243
|
+
const DialogComponent = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-88f7d91e"]]);
|
|
1240
1244
|
const _hoisted_1$4 = { class: "el-message-box__message" };
|
|
1241
1245
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
1242
1246
|
__name: "dialog-content",
|
|
@@ -1274,27 +1278,42 @@ const DEF_OPTIONS$1 = {
|
|
|
1274
1278
|
// footer: true,
|
|
1275
1279
|
// closeOnClickModal: true
|
|
1276
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
|
+
}
|
|
1277
1290
|
function createDialog() {
|
|
1278
1291
|
const Dialog2 = {
|
|
1292
|
+
/** 主应用上下文,需在 app.use 后赋值:Dialog._context = app._context */
|
|
1279
1293
|
_context: {},
|
|
1280
|
-
|
|
1294
|
+
/** 核心创建方法 */
|
|
1281
1295
|
create(options) {
|
|
1282
1296
|
const mergedOptions = { ...DEF_OPTIONS$1, ...options };
|
|
1283
1297
|
const container = document.createElement("div");
|
|
1284
1298
|
document.body.appendChild(container);
|
|
1285
1299
|
const visible = ref(true);
|
|
1286
|
-
const dialogOptions = ref(mergedOptions
|
|
1287
|
-
|
|
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({
|
|
1288
1311
|
setup() {
|
|
1289
|
-
const closed = () => {
|
|
1290
|
-
dialogApp.unmount();
|
|
1291
|
-
container.remove();
|
|
1292
|
-
};
|
|
1293
1312
|
return () => h(DialogComponent, {
|
|
1294
1313
|
...dialogOptions.value,
|
|
1295
1314
|
"modelValue": visible.value,
|
|
1296
1315
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
1297
|
-
"onClosed":
|
|
1316
|
+
"onClosed": destroy
|
|
1298
1317
|
});
|
|
1299
1318
|
}
|
|
1300
1319
|
});
|
|
@@ -1302,59 +1321,36 @@ function createDialog() {
|
|
|
1302
1321
|
Object.assign(dialogApp._context, Dialog2._context);
|
|
1303
1322
|
dialogApp.mount(container);
|
|
1304
1323
|
return {
|
|
1305
|
-
/**
|
|
1324
|
+
/** 关闭对话框,等待关闭动画结束后由 onClosed 触发销毁 */
|
|
1306
1325
|
close: () => {
|
|
1307
1326
|
visible.value = false;
|
|
1308
|
-
setTimeout(() => {
|
|
1309
|
-
dialogApp.unmount();
|
|
1310
|
-
container.remove();
|
|
1311
|
-
}, 300);
|
|
1312
1327
|
},
|
|
1313
|
-
/**
|
|
1328
|
+
/** 动态更新对话框 props */
|
|
1314
1329
|
update: (newProps) => {
|
|
1315
|
-
|
|
1330
|
+
if (newProps)
|
|
1331
|
+
dialogOptions.value = { ...dialogOptions.value, ...newProps };
|
|
1316
1332
|
}
|
|
1317
1333
|
};
|
|
1318
1334
|
},
|
|
1319
|
-
/**
|
|
1335
|
+
/** 打开对话框 */
|
|
1320
1336
|
open(options) {
|
|
1321
1337
|
return this.create(options);
|
|
1322
1338
|
},
|
|
1339
|
+
/** 信息提示框 */
|
|
1323
1340
|
info(options) {
|
|
1324
|
-
return this.create(
|
|
1325
|
-
...options,
|
|
1326
|
-
content: () => h(DialogContent, { type: "info", content: options.content }),
|
|
1327
|
-
simple: true,
|
|
1328
|
-
style: { maxWidth: "420px", ...options.style },
|
|
1329
|
-
lockScroll: false
|
|
1330
|
-
});
|
|
1341
|
+
return this.create(buildMessageOptions("info", options));
|
|
1331
1342
|
},
|
|
1343
|
+
/** 成功提示框 */
|
|
1332
1344
|
success(options) {
|
|
1333
|
-
return this.create(
|
|
1334
|
-
...options,
|
|
1335
|
-
content: () => h(DialogContent, { type: "success", content: options.content }),
|
|
1336
|
-
simple: true,
|
|
1337
|
-
style: { maxWidth: "420px", ...options.style },
|
|
1338
|
-
lockScroll: false
|
|
1339
|
-
});
|
|
1345
|
+
return this.create(buildMessageOptions("success", options));
|
|
1340
1346
|
},
|
|
1347
|
+
/** 警告提示框 */
|
|
1341
1348
|
warning(options) {
|
|
1342
|
-
return this.create(
|
|
1343
|
-
...options,
|
|
1344
|
-
content: () => h(DialogContent, { type: "warning", content: options.content }),
|
|
1345
|
-
simple: true,
|
|
1346
|
-
style: { maxWidth: "420px", ...options.style },
|
|
1347
|
-
lockScroll: false
|
|
1348
|
-
});
|
|
1349
|
+
return this.create(buildMessageOptions("warning", options));
|
|
1349
1350
|
},
|
|
1351
|
+
/** 错误提示框 */
|
|
1350
1352
|
error(options) {
|
|
1351
|
-
return this.create(
|
|
1352
|
-
...options,
|
|
1353
|
-
content: () => h(DialogContent, { type: "error", content: options.content }),
|
|
1354
|
-
simple: true,
|
|
1355
|
-
style: { maxWidth: "420px", ...options.style },
|
|
1356
|
-
lockScroll: false
|
|
1357
|
-
});
|
|
1353
|
+
return this.create(buildMessageOptions("error", options));
|
|
1358
1354
|
}
|
|
1359
1355
|
};
|
|
1360
1356
|
return Dialog2;
|
|
@@ -1605,25 +1601,31 @@ const Drawer$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v
|
|
|
1605
1601
|
const DEF_OPTIONS = {};
|
|
1606
1602
|
function createDrawer() {
|
|
1607
1603
|
const Drawer2 = {
|
|
1604
|
+
/** 主应用上下文,需在 app.use 后赋值:Drawer._context = app._context */
|
|
1608
1605
|
_context: {},
|
|
1609
|
-
|
|
1606
|
+
/** 核心创建方法 */
|
|
1610
1607
|
create(options) {
|
|
1611
1608
|
const mergedOptions = { ...DEF_OPTIONS, ...options };
|
|
1612
1609
|
const container = document.createElement("div");
|
|
1613
1610
|
document.body.appendChild(container);
|
|
1614
1611
|
const visible = ref(true);
|
|
1615
|
-
const
|
|
1616
|
-
|
|
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({
|
|
1617
1623
|
setup() {
|
|
1618
|
-
const closed = () => {
|
|
1619
|
-
drawerApp.unmount();
|
|
1620
|
-
container.remove();
|
|
1621
|
-
};
|
|
1622
1624
|
return () => h(Drawer$1, {
|
|
1623
|
-
...
|
|
1625
|
+
...drawerOptions.value,
|
|
1624
1626
|
"modelValue": visible.value,
|
|
1625
1627
|
"onUpdate:modelValue": (val) => visible.value = val,
|
|
1626
|
-
"onClosed":
|
|
1628
|
+
"onClosed": destroy
|
|
1627
1629
|
});
|
|
1628
1630
|
}
|
|
1629
1631
|
});
|
|
@@ -1631,21 +1633,18 @@ function createDrawer() {
|
|
|
1631
1633
|
Object.assign(drawerApp._context, Drawer2._context);
|
|
1632
1634
|
drawerApp.mount(container);
|
|
1633
1635
|
return {
|
|
1634
|
-
/**
|
|
1636
|
+
/** 关闭抽屉,等待关闭动画结束后由 onClosed 触发销毁 */
|
|
1635
1637
|
close: () => {
|
|
1636
1638
|
visible.value = false;
|
|
1637
|
-
setTimeout(() => {
|
|
1638
|
-
drawerApp.unmount();
|
|
1639
|
-
container.remove();
|
|
1640
|
-
}, 300);
|
|
1641
1639
|
},
|
|
1642
|
-
/**
|
|
1640
|
+
/** 动态更新抽屉 props */
|
|
1643
1641
|
update: (newProps) => {
|
|
1644
|
-
|
|
1642
|
+
if (newProps)
|
|
1643
|
+
drawerOptions.value = { ...drawerOptions.value, ...newProps };
|
|
1645
1644
|
}
|
|
1646
1645
|
};
|
|
1647
1646
|
},
|
|
1648
|
-
/**
|
|
1647
|
+
/** 打开抽屉 */
|
|
1649
1648
|
open(options) {
|
|
1650
1649
|
return this.create(options);
|
|
1651
1650
|
}
|
|
@@ -1726,15 +1725,85 @@ const clearable = false;
|
|
|
1726
1725
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1727
1726
|
__name: "edit-table",
|
|
1728
1727
|
props: {
|
|
1729
|
-
rowKey: { default: "id" },
|
|
1730
|
-
data: { default: () => [] },
|
|
1731
1728
|
columns: { default: () => [] },
|
|
1732
|
-
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: {}
|
|
1733
1795
|
},
|
|
1734
1796
|
setup(__props, { expose: __expose }) {
|
|
1735
1797
|
const props = __props;
|
|
1736
1798
|
const attrs = useAttrs();
|
|
1737
1799
|
const { b } = useBemClass();
|
|
1800
|
+
const tableProps = computed(() => {
|
|
1801
|
+
const { data, columns, cellDisabled, disabled, ...restProps } = props;
|
|
1802
|
+
return {
|
|
1803
|
+
...attrs,
|
|
1804
|
+
...restProps
|
|
1805
|
+
};
|
|
1806
|
+
});
|
|
1738
1807
|
const COMP_MAP = {
|
|
1739
1808
|
"input": El.ElInput,
|
|
1740
1809
|
"textarea": El.ElInput,
|
|
@@ -1854,13 +1923,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1854
1923
|
ref_key: "formRef",
|
|
1855
1924
|
ref: formRef,
|
|
1856
1925
|
model: form.value,
|
|
1857
|
-
class: normalizeClass(unref(b)("edit-table"))
|
|
1926
|
+
class: normalizeClass(unref(b)("edit-table")),
|
|
1927
|
+
disabled: props.disabled
|
|
1858
1928
|
}, {
|
|
1859
1929
|
default: withCtx(() => [
|
|
1860
1930
|
createVNode(unref(ElTable), mergeProps({
|
|
1861
1931
|
data: form.value.tableData,
|
|
1862
1932
|
border: ""
|
|
1863
|
-
},
|
|
1933
|
+
}, tableProps.value), createSlots({
|
|
1864
1934
|
default: withCtx(() => [
|
|
1865
1935
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (column, index2) => {
|
|
1866
1936
|
return openBlock(), createBlock(unref(ElTableColumn), mergeProps({
|
|
@@ -1900,15 +1970,30 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1900
1970
|
}, 1040, ["width", "prop", "label", "label-class-name"]);
|
|
1901
1971
|
}), 128))
|
|
1902
1972
|
]),
|
|
1903
|
-
_:
|
|
1904
|
-
},
|
|
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"])
|
|
1905
1990
|
]),
|
|
1906
1991
|
_: 3
|
|
1907
|
-
}, 8, ["model", "class"]);
|
|
1992
|
+
}, 8, ["model", "class", "disabled"]);
|
|
1908
1993
|
};
|
|
1909
1994
|
}
|
|
1910
1995
|
});
|
|
1911
|
-
const
|
|
1996
|
+
const _EditTable = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-01bf53e6"]]);
|
|
1912
1997
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1913
1998
|
__name: "flex",
|
|
1914
1999
|
props: {
|
|
@@ -1924,16 +2009,19 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1924
2009
|
setup(__props) {
|
|
1925
2010
|
const props = __props;
|
|
1926
2011
|
const { b } = useBemClass();
|
|
2012
|
+
const GAP_SIZE = ["small", "middle", "large"];
|
|
1927
2013
|
const classNames = computed(() => {
|
|
1928
|
-
const arr = [b("flex")
|
|
2014
|
+
const arr = [b("flex")];
|
|
2015
|
+
if (GAP_SIZE.includes(props.gap)) {
|
|
2016
|
+
arr.push(b(`flex__size--${props.gap}`));
|
|
2017
|
+
}
|
|
1929
2018
|
if (props.full) {
|
|
1930
2019
|
arr.push(b("flex--full"));
|
|
1931
2020
|
}
|
|
1932
2021
|
return arr;
|
|
1933
2022
|
});
|
|
1934
|
-
const SIZE_MAP = ["small", "middle", "large"];
|
|
1935
2023
|
const resolvedGap = computed(() => {
|
|
1936
|
-
if (props.gap === void 0 || props.gap === null || props.gap === "" ||
|
|
2024
|
+
if (props.gap === void 0 || props.gap === null || props.gap === "" || GAP_SIZE.includes(props.gap))
|
|
1937
2025
|
return void 0;
|
|
1938
2026
|
if (typeof props.gap === "number")
|
|
1939
2027
|
return `${props.gap}px`;
|
|
@@ -1972,7 +2060,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1972
2060
|
};
|
|
1973
2061
|
}
|
|
1974
2062
|
});
|
|
1975
|
-
const Flex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
2063
|
+
const Flex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6652f5ee"]]);
|
|
1976
2064
|
const GridContextInjectionKey = Symbol(
|
|
1977
2065
|
"GridContextInjectionKey"
|
|
1978
2066
|
);
|
|
@@ -2460,7 +2548,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2460
2548
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2461
2549
|
], 6);
|
|
2462
2550
|
}
|
|
2463
|
-
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
2551
|
+
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render], ["__scopeId", "data-v-f4d52836"]]);
|
|
2464
2552
|
const _hoisted_1$2 = {
|
|
2465
2553
|
key: 0,
|
|
2466
2554
|
class: "w-full"
|
|
@@ -3236,6 +3324,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3236
3324
|
}
|
|
3237
3325
|
});
|
|
3238
3326
|
const PageLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-0ed9c74a"]]);
|
|
3327
|
+
const TABLE_SLOTS_KEY = Symbol("tableSlots");
|
|
3239
3328
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3240
3329
|
...{
|
|
3241
3330
|
name: "TableColumn"
|
|
@@ -3246,22 +3335,24 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3246
3335
|
},
|
|
3247
3336
|
setup(__props) {
|
|
3248
3337
|
const props = __props;
|
|
3338
|
+
const tableSlots = inject(TABLE_SLOTS_KEY, useSlots());
|
|
3339
|
+
function renderColumnSlot(slotName, scope) {
|
|
3340
|
+
const slotFn = tableSlots[slotName];
|
|
3341
|
+
return slotFn ? slotFn(scope) : null;
|
|
3342
|
+
}
|
|
3249
3343
|
const columnProps = computed(() => {
|
|
3250
3344
|
const { slotName, render, children, ...restProps } = props.column;
|
|
3251
3345
|
return restProps;
|
|
3252
3346
|
});
|
|
3253
3347
|
return (_ctx, _cache) => {
|
|
3254
3348
|
const _component_TableColumn = resolveComponent("TableColumn", true);
|
|
3255
|
-
const _directive_slots = resolveDirective("slots");
|
|
3256
3349
|
return openBlock(), createBlock(unref(ElTableColumn), normalizeProps(guardReactiveProps(columnProps.value)), createSlots({
|
|
3257
3350
|
default: withCtx(() => [
|
|
3258
3351
|
_ctx.column.children && _ctx.column.children.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.column.children, (child) => {
|
|
3259
|
-
return
|
|
3352
|
+
return openBlock(), createBlock(_component_TableColumn, {
|
|
3260
3353
|
key: child.prop || child.label,
|
|
3261
3354
|
column: child
|
|
3262
|
-
}, null, 8, ["column"])
|
|
3263
|
-
[_directive_slots, _ctx.$slots]
|
|
3264
|
-
]);
|
|
3355
|
+
}, null, 8, ["column"]);
|
|
3265
3356
|
}), 128)) : createCommentVNode("", true)
|
|
3266
3357
|
]),
|
|
3267
3358
|
_: 2
|
|
@@ -3277,7 +3368,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
3277
3368
|
} : _ctx.column.slotName ? {
|
|
3278
3369
|
name: "default",
|
|
3279
3370
|
fn: withCtx((scope) => [
|
|
3280
|
-
|
|
3371
|
+
(openBlock(), createBlock(resolveDynamicComponent(() => renderColumnSlot(_ctx.column.slotName, scope))))
|
|
3281
3372
|
]),
|
|
3282
3373
|
key: "1"
|
|
3283
3374
|
} : void 0
|
|
@@ -3358,6 +3449,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3358
3449
|
setup(__props, { expose: __expose }) {
|
|
3359
3450
|
const props = __props;
|
|
3360
3451
|
const attrs = useAttrs();
|
|
3452
|
+
const slots = useSlots();
|
|
3453
|
+
provide(TABLE_SLOTS_KEY, slots);
|
|
3361
3454
|
const { b } = useBemClass();
|
|
3362
3455
|
const tableRef = useTemplateRef("tableRef");
|
|
3363
3456
|
const tableProps = computed(() => {
|
|
@@ -3387,26 +3480,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3387
3480
|
ref_key: "tableRef",
|
|
3388
3481
|
ref: tableRef,
|
|
3389
3482
|
data: props.data
|
|
3390
|
-
}), {
|
|
3483
|
+
}), createSlots({
|
|
3391
3484
|
default: withCtx(() => [
|
|
3392
3485
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.columns, (item) => {
|
|
3393
3486
|
return openBlock(), createBlock(_sfc_main$4, {
|
|
3394
3487
|
key: item.prop || item.label,
|
|
3395
3488
|
column: item
|
|
3396
|
-
},
|
|
3397
|
-
renderList(_ctx.$slots, (_, slotName) => {
|
|
3398
|
-
return {
|
|
3399
|
-
name: slotName,
|
|
3400
|
-
fn: withCtx((scope) => [
|
|
3401
|
-
renderSlot(_ctx.$slots, slotName, mergeProps({ ref_for: true }, scope), void 0, true)
|
|
3402
|
-
])
|
|
3403
|
-
};
|
|
3404
|
-
})
|
|
3405
|
-
]), 1032, ["column"]);
|
|
3489
|
+
}, null, 8, ["column"]);
|
|
3406
3490
|
}), 128))
|
|
3407
3491
|
]),
|
|
3408
|
-
_:
|
|
3409
|
-
},
|
|
3492
|
+
_: 2
|
|
3493
|
+
}, [
|
|
3494
|
+
_ctx.$slots.append ? {
|
|
3495
|
+
name: "append",
|
|
3496
|
+
fn: withCtx(() => [
|
|
3497
|
+
renderSlot(_ctx.$slots, "append", {}, void 0, true)
|
|
3498
|
+
]),
|
|
3499
|
+
key: "0"
|
|
3500
|
+
} : void 0,
|
|
3501
|
+
_ctx.$slots.empty ? {
|
|
3502
|
+
name: "empty",
|
|
3503
|
+
fn: withCtx(() => [
|
|
3504
|
+
renderSlot(_ctx.$slots, "empty", {}, void 0, true)
|
|
3505
|
+
]),
|
|
3506
|
+
key: "1"
|
|
3507
|
+
} : void 0
|
|
3508
|
+
]), 1040, ["data"]),
|
|
3410
3509
|
props.pagination !== false ? (openBlock(), createBlock(unref(ElRow), {
|
|
3411
3510
|
key: 0,
|
|
3412
3511
|
justify: "end",
|
|
@@ -3424,7 +3523,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3424
3523
|
};
|
|
3425
3524
|
}
|
|
3426
3525
|
});
|
|
3427
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
3526
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-39da9c8f"]]);
|
|
3428
3527
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3429
3528
|
__name: "tabs",
|
|
3430
3529
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -3499,7 +3598,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3499
3598
|
};
|
|
3500
3599
|
}
|
|
3501
3600
|
});
|
|
3502
|
-
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3601
|
+
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f6ea7029"]]);
|
|
3503
3602
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3504
3603
|
__name: "tag",
|
|
3505
3604
|
props: {
|
|
@@ -9382,7 +9481,7 @@ const components = {
|
|
|
9382
9481
|
Form: _Form,
|
|
9383
9482
|
PageLayout,
|
|
9384
9483
|
Dialog: DialogComponent,
|
|
9385
|
-
EditTable,
|
|
9484
|
+
EditTable: _EditTable,
|
|
9386
9485
|
Table: _Table,
|
|
9387
9486
|
Tag,
|
|
9388
9487
|
TreeTransfer
|
|
@@ -9403,7 +9502,7 @@ const GiGridItem = GridItem;
|
|
|
9403
9502
|
const GiForm = _Form;
|
|
9404
9503
|
const GiPageLayout = PageLayout;
|
|
9405
9504
|
const GiDialog = DialogComponent;
|
|
9406
|
-
const GiEditTable =
|
|
9505
|
+
const GiEditTable = _EditTable;
|
|
9407
9506
|
const GiTable = _Table;
|
|
9408
9507
|
const GiTag = Tag;
|
|
9409
9508
|
const GiTreeTransfer = TreeTransfer;
|
|
@@ -9447,6 +9546,7 @@ export {
|
|
|
9447
9546
|
GiTreeTransfer,
|
|
9448
9547
|
Grid,
|
|
9449
9548
|
GridItem,
|
|
9549
|
+
TABLE_SLOTS_KEY,
|
|
9450
9550
|
createDialog,
|
|
9451
9551
|
createDrawer,
|
|
9452
9552
|
createSelectDialog,
|