@dt-frames/ui 2.0.14 → 2.0.16
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/es/assets/imgs/tree/forder-open.svg +1 -0
- package/es/assets/imgs/tree/forder.svg +1 -0
- package/es/assets/locales/zh.ts +1 -1
- package/es/components/curd/index.js +28 -8
- package/es/components/curd/src/components/Curd.d.ts +10 -0
- package/es/components/curd/src/hooks/useCurd.d.ts +2 -4
- package/es/components/curd/src/props.d.ts +5 -1
- package/es/components/drawer/index.js +25 -24
- package/es/components/form/index.js +56 -40
- package/es/components/form/index.less +44 -3
- package/es/components/form/src/props.d.ts +3 -3
- package/es/components/modal/index.js +8 -143
- package/es/components/modal/index.less +23 -0
- package/es/components/modal/src/index.d.ts +2 -84
- package/es/components/table/index.js +72 -88
- package/es/components/table/src/components/TableAction.d.ts +6 -0
- package/es/components/table/src/index.d.ts +4 -4
- package/es/components/table/src/props.d.ts +1 -1
- package/es/components/tree/index.js +197 -93
- package/es/components/tree/index.less +75 -13
- package/es/components/tree/src/basicProps.d.ts +46 -7
- package/es/components/tree/src/components/TreeHeader.d.ts +2 -2
- package/es/components/tree/src/hooks/useTree.d.ts +3 -2
- package/es/components/tree/src/index.d.ts +120 -29
- package/es/components/upload/index.js +79 -75
- package/es/components/upload/index.less +19 -5
- package/es/components/upload/src/basicProps.d.ts +1 -1
- package/es/components/upload/src/index.d.ts +6 -6
- package/es/components/upload/src/utils/upload.d.ts +1 -1
- package/es/theme/index.js +387 -431
- package/es/theme/index.less +24 -0
- package/es/theme/src/components/header/components/lock/Lockscreen.d.ts +34 -3
- package/es/theme/src/components/header/components/lock/index.d.ts +1 -2
- package/es/theme/src/components/header/components/lock/useTime.d.ts +7 -0
- package/es/theme/src/components/header/components/size.d.ts +5 -5
- package/es/theme/src/components/header/components/user-info.d.ts +7 -0
- package/es/theme/src/components/header/index.d.ts +12 -5
- package/es/theme/src/components/header/multiple-header.d.ts +12 -5
- package/es/theme/src/index.d.ts +63 -13
- package/es/theme/src/stores/lockscreen.store.d.ts +7 -0
- package/manualContentPath.js +10 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/es/packages/ui/src/assets/locales/en.d.ts +0 -103
- package/es/packages/ui/src/assets/locales/index.d.ts +0 -2
- package/es/packages/ui/src/assets/locales/zh.d.ts +0 -104
- package/es/packages/ui/src/components/form/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/components/FormButtons.d.ts +0 -105
- package/es/packages/ui/src/components/form/src/components/FormItem.d.ts +0 -159
- package/es/packages/ui/src/components/form/src/components/componentMap.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/formIcon.d.ts +0 -1223
- package/es/packages/ui/src/components/form/src/components/formInputUseDialog.d.ts +0 -911
- package/es/packages/ui/src/components/form/src/components/index.d.ts +0 -4
- package/es/packages/ui/src/components/form/src/components/radioButton.d.ts +0 -34
- package/es/packages/ui/src/components/form/src/enums/index.d.ts +0 -7
- package/es/packages/ui/src/components/form/src/hooks/helper.d.ts +0 -14
- package/es/packages/ui/src/components/form/src/hooks/useForm.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/hooks/useFormActions.d.ts +0 -12
- package/es/packages/ui/src/components/form/src/hooks/useFormEvent.d.ts +0 -25
- package/es/packages/ui/src/components/form/src/hooks/useFormValue.d.ts +0 -3
- package/es/packages/ui/src/components/form/src/hooks/useFormValues.d.ts +0 -11
- package/es/packages/ui/src/components/form/src/hooks/useLabelWidth.d.ts +0 -6
- package/es/packages/ui/src/components/form/src/props.d.ts +0 -127
- package/es/packages/ui/src/components/form/src/types/actions.type.d.ts +0 -15
- package/es/packages/ui/src/components/form/src/types/form.type.d.ts +0 -79
- package/es/packages/ui/src/components/form/src/types/items.type.d.ts +0 -409
- package/es/packages/ui/src/components/iframe/index.d.ts +0 -2
- package/es/packages/ui/src/components/modal/index.d.ts +0 -4
- package/es/packages/ui/src/components/modal/src/hooks/useModal.d.ts +0 -5
- package/es/packages/ui/src/components/modal/src/props.d.ts +0 -101
- package/es/packages/ui/src/components/modal/src/types/modal.type.d.ts +0 -17
- package/es/packages/ui/src/components/upload/index.d.ts +0 -4
- package/es/packages/ui/src/components/upload/src/basicProps.d.ts +0 -87
- package/es/packages/ui/src/components/upload/src/components/PdfView.d.ts +0 -9
- package/es/packages/ui/src/components/upload/src/components/WordView.d.ts +0 -6
- package/es/packages/ui/src/components/upload/src/hooks/useFile.d.ts +0 -16
- package/es/packages/ui/src/components/upload/src/index.d.ts +0 -242
- package/es/packages/ui/src/components/upload/src/type/file.d.ts +0 -10
- package/es/packages/ui/src/components/upload/src/utils/upload.d.ts +0 -2
- package/es/packages/ui/src/global.d.ts +0 -7
- package/es/packages/ui/src/theme/index.d.ts +0 -12
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +0 -4
- package/es/packages/ui/src/theme/src/enums/index.d.ts +0 -1
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +0 -34
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +0 -6
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +0 -2
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +0 -25
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +0 -29
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +0 -8
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +0 -7
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +0 -9
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +0 -2
- package/es/packages/ui/src/theme/src/stores/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +0 -25
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +0 -19
- package/es/packages/ui/src/theme/src/types/index.d.ts +0 -3
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +0 -15
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +0 -62
- package/es/packages/ui/src/utils/withInstall.d.ts +0 -4
|
@@ -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, normalizeClass, Fragment, renderList, toDisplayString, createCommentVNode, createBlock, withCtx, createVNode, withDirectives, createElementVNode, normalizeStyle, provide, inject, h as h$1, computed, mergeProps, nextTick, toRaw as toRaw$1, reactive,
|
|
2
|
+
import { useSlots as useSlots$1, unref, ref, watch, onUnmounted, defineComponent, useAttrs, resolveDirective, openBlock, createElementBlock, normalizeClass, Fragment, renderList, toDisplayString, createCommentVNode, createBlock, withCtx, createVNode, withDirectives, createElementVNode, createTextVNode, normalizeStyle, 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 { MenuItem, Menu, Dropdown, Tooltip, 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";
|
|
@@ -7,7 +7,7 @@ import { omit, cloneDeep, isEqual } from "lodash-es";
|
|
|
7
7
|
import "ant-design-vue/es/tooltip/style";
|
|
8
8
|
import "ant-design-vue/es/dropdown/style";
|
|
9
9
|
import "ant-design-vue/es/menu/style";
|
|
10
|
-
import { useDebounceFn, useFullscreen,
|
|
10
|
+
import { useDebounceFn, useFullscreen, tryOnMounted } from "@vueuse/core";
|
|
11
11
|
import { Input, InputNumber, Select, TreeSelect, Switch, Checkbox, DatePicker, TimePicker, Popover } from "ant-design-vue";
|
|
12
12
|
import { DtFormButtons } from "../form";
|
|
13
13
|
import { useModal, DtModal, useModalOut } from "../modal";
|
|
@@ -236,16 +236,16 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
236
236
|
key: 0,
|
|
237
237
|
class: normalizeClass(__props.expandNum ? "dt-expand-has-collapse" : "")
|
|
238
238
|
}, [
|
|
239
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(actionBtns.value, (item,
|
|
239
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(actionBtns.value, (item, index) => {
|
|
240
240
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
241
241
|
item.ifShow ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
242
242
|
__props.expandNum ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
243
|
-
|
|
243
|
+
index < __props.expandNum ? (openBlock(), createElementBlock("span", {
|
|
244
244
|
key: 0,
|
|
245
245
|
class: "dt-table-action-btn w-8 inline-block",
|
|
246
246
|
onClick: ($event) => handleAction(item)
|
|
247
|
-
}, toDisplayString(item.label()), 9, _hoisted_1$8)) : createCommentVNode("
|
|
248
|
-
|
|
247
|
+
}, toDisplayString(item.label()), 9, _hoisted_1$8)) : createCommentVNode("", true),
|
|
248
|
+
index >= __props.expandNum && index === actionBtns.value.length - 1 ? (openBlock(), createBlock(_component_ADropdown, {
|
|
249
249
|
key: 1,
|
|
250
250
|
getPopupContainer: getPopupContainer$1,
|
|
251
251
|
trigger: ["click"]
|
|
@@ -264,10 +264,10 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
264
264
|
createElementVNode("span", _hoisted_4$2, toDisplayString(item1.label()), 1)
|
|
265
265
|
]),
|
|
266
266
|
_: 2
|
|
267
|
-
}, 1032, ["onClick"])) : createCommentVNode("
|
|
267
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
268
268
|
])), [
|
|
269
269
|
[_directive_auth, getAuth(item1.auth)]
|
|
270
|
-
]) : createCommentVNode("
|
|
270
|
+
]) : createCommentVNode("", true)
|
|
271
271
|
], 64);
|
|
272
272
|
}), 256))
|
|
273
273
|
]),
|
|
@@ -278,26 +278,28 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
278
278
|
_hoisted_2$2
|
|
279
279
|
]),
|
|
280
280
|
_: 1
|
|
281
|
-
})) : createCommentVNode("
|
|
281
|
+
})) : createCommentVNode("", true)
|
|
282
282
|
], 64)) : (openBlock(), createBlock(_component_ATooltip, {
|
|
283
283
|
key: 1,
|
|
284
284
|
placement: "bottom"
|
|
285
285
|
}, {
|
|
286
286
|
title: withCtx(() => [
|
|
287
|
-
|
|
287
|
+
createTextVNode(toDisplayString(item.label()), 1)
|
|
288
288
|
]),
|
|
289
289
|
default: withCtx(() => [
|
|
290
|
-
createElementVNode("
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
290
|
+
createElementVNode("span", _hoisted_5$1, [
|
|
291
|
+
createElementVNode("i", {
|
|
292
|
+
class: normalizeClass(["i cursor-pointer", item.icon()]),
|
|
293
|
+
style: normalizeStyle({
|
|
294
|
+
color: item.color
|
|
295
|
+
}),
|
|
296
|
+
onClick: ($event) => handleAction(item)
|
|
297
|
+
}, null, 14, _hoisted_6)
|
|
298
|
+
])
|
|
297
299
|
]),
|
|
298
300
|
_: 2
|
|
299
301
|
}, 1024))
|
|
300
|
-
], 64)) : createCommentVNode("
|
|
302
|
+
], 64)) : createCommentVNode("", true)
|
|
301
303
|
], 64);
|
|
302
304
|
}), 256))
|
|
303
305
|
], 2)) : (openBlock(), createBlock(_component_ADropdown, {
|
|
@@ -324,7 +326,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
324
326
|
createElementVNode("span", _hoisted_8, toDisplayString(item.label()), 1)
|
|
325
327
|
]),
|
|
326
328
|
_: 2
|
|
327
|
-
}, 1032, ["onClick"])) : createCommentVNode("
|
|
329
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
328
330
|
])), [
|
|
329
331
|
[_directive_auth, getAuth(item.auth)]
|
|
330
332
|
]);
|
|
@@ -341,14 +343,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
341
343
|
};
|
|
342
344
|
}
|
|
343
345
|
});
|
|
344
|
-
const _export_sfc = (sfc, props2) => {
|
|
345
|
-
const target = sfc.__vccOpts || sfc;
|
|
346
|
-
for (const [key, val] of props2) {
|
|
347
|
-
target[key] = val;
|
|
348
|
-
}
|
|
349
|
-
return target;
|
|
350
|
-
};
|
|
351
|
-
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"]]);
|
|
352
346
|
const tableKey = Symbol("dt-page");
|
|
353
347
|
function createTableInstance(instance) {
|
|
354
348
|
provide(tableKey, instance);
|
|
@@ -443,9 +437,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
443
437
|
const val = unref(currentValueRef);
|
|
444
438
|
const value = isCheckValue ? isNumber(val) && isBoolean(val) ? val : !!val : val;
|
|
445
439
|
let compProps = props2.column?.editComponentProps ?? {};
|
|
446
|
-
const { record, column, index
|
|
440
|
+
const { record, column, index } = props2;
|
|
447
441
|
if (isFunction(compProps)) {
|
|
448
|
-
compProps = compProps({ text: val, record, column, index
|
|
442
|
+
compProps = compProps({ text: val, record, column, index }) ?? {};
|
|
449
443
|
}
|
|
450
444
|
if (unref(getComponent) === "InputNumber") {
|
|
451
445
|
compProps = {
|
|
@@ -525,9 +519,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
525
519
|
};
|
|
526
520
|
}
|
|
527
521
|
});
|
|
528
|
-
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"]]);
|
|
529
522
|
function renderEditCell(column) {
|
|
530
|
-
return ({ text: value, record, index
|
|
523
|
+
return ({ text: value, record, index }) => {
|
|
531
524
|
record.onValid = async () => {
|
|
532
525
|
if (isArray(record?.validCbs)) {
|
|
533
526
|
const validFns = (record?.validCbs || []).map((fn) => fn());
|
|
@@ -555,11 +548,11 @@ function renderEditCell(column) {
|
|
|
555
548
|
}
|
|
556
549
|
return true;
|
|
557
550
|
};
|
|
558
|
-
return h(
|
|
551
|
+
return h(_sfc_main$8, {
|
|
559
552
|
value,
|
|
560
553
|
record,
|
|
561
554
|
column,
|
|
562
|
-
index
|
|
555
|
+
index
|
|
563
556
|
});
|
|
564
557
|
};
|
|
565
558
|
}
|
|
@@ -616,17 +609,17 @@ function handleIndexColumn(propsRef, getPaginationRef, columns) {
|
|
|
616
609
|
width: unref(getIsZH) ? 50 : 70,
|
|
617
610
|
title: t("NUMBER"),
|
|
618
611
|
align: "center",
|
|
619
|
-
customRender: ({ index
|
|
612
|
+
customRender: ({ index, renderIndex, record }) => {
|
|
620
613
|
if (virtual && record?.index)
|
|
621
614
|
return record?.index;
|
|
622
615
|
const getPagination = unref(getPaginationRef);
|
|
623
616
|
const { appConf } = useAppStore();
|
|
624
617
|
const { defaultPageSize } = appConf.ui.table;
|
|
625
618
|
if (isBoolean(getPagination)) {
|
|
626
|
-
return `${
|
|
619
|
+
return `${index + 1}`;
|
|
627
620
|
}
|
|
628
621
|
const { current = 1, pageSize = defaultPageSize } = getPagination;
|
|
629
|
-
return ((current < 1 ? 1 : current) - 1) * pageSize +
|
|
622
|
+
return ((current < 1 ? 1 : current) - 1) * pageSize + index + 1;
|
|
630
623
|
},
|
|
631
624
|
...isFixedLeft ? {
|
|
632
625
|
fixed: "left"
|
|
@@ -664,14 +657,14 @@ function handleActionColumn(propsRef, columns) {
|
|
|
664
657
|
};
|
|
665
658
|
columns.push({
|
|
666
659
|
...columnObj,
|
|
667
|
-
customRender: ({ record, index
|
|
660
|
+
customRender: ({ record, index }) => {
|
|
668
661
|
return h$1(
|
|
669
|
-
|
|
662
|
+
_sfc_main$9,
|
|
670
663
|
omit({
|
|
671
664
|
...columnObj,
|
|
672
665
|
authPrefix,
|
|
673
666
|
record,
|
|
674
|
-
index
|
|
667
|
+
index
|
|
675
668
|
}, "align")
|
|
676
669
|
);
|
|
677
670
|
}
|
|
@@ -708,7 +701,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
|
|
|
708
701
|
const getColumnsRef = computed(() => {
|
|
709
702
|
const columns = cloneDeep(unref(columnsRef));
|
|
710
703
|
const { ellipsis } = unref(propsRef);
|
|
711
|
-
columns.forEach((it,
|
|
704
|
+
columns.forEach((it, index) => {
|
|
712
705
|
it.class = it.class ?? "";
|
|
713
706
|
if (!it.class.split(" ").includes("__column")) {
|
|
714
707
|
it.class = `${it.class} __column`;
|
|
@@ -842,7 +835,7 @@ function useColumns(propsRef, getPaginationRef, tableElRef) {
|
|
|
842
835
|
};
|
|
843
836
|
}
|
|
844
837
|
function useCustomRow(propsRef, { setSelectedRowKeys, getSelectedRowKeys, clearSelectedRowKeys, emits }) {
|
|
845
|
-
const customRow = (record,
|
|
838
|
+
const customRow = (record, index) => {
|
|
846
839
|
return {
|
|
847
840
|
onClick: (e) => {
|
|
848
841
|
e?.stopPropagation();
|
|
@@ -896,19 +889,19 @@ function useCustomRow(propsRef, { setSelectedRowKeys, getSelectedRowKeys, clearS
|
|
|
896
889
|
}
|
|
897
890
|
}
|
|
898
891
|
handleClick();
|
|
899
|
-
emits("row-click", record,
|
|
892
|
+
emits("row-click", record, index, e);
|
|
900
893
|
},
|
|
901
894
|
onDblclick: (event) => {
|
|
902
|
-
emits("row-dbClick", record,
|
|
895
|
+
emits("row-dbClick", record, index, event);
|
|
903
896
|
},
|
|
904
897
|
onContextmenu: (event) => {
|
|
905
|
-
emits("row-contextmenu", record,
|
|
898
|
+
emits("row-contextmenu", record, index, event);
|
|
906
899
|
},
|
|
907
900
|
onMouseenter: (event) => {
|
|
908
|
-
emits("row-mouseenter", record,
|
|
901
|
+
emits("row-mouseenter", record, index, event);
|
|
909
902
|
},
|
|
910
903
|
onMouseleave: (event) => {
|
|
911
|
-
emits("row-mouseleave", record,
|
|
904
|
+
emits("row-mouseleave", record, index, event);
|
|
912
905
|
}
|
|
913
906
|
};
|
|
914
907
|
};
|
|
@@ -1030,7 +1023,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1030
1023
|
const _component_ATooltip = Tooltip;
|
|
1031
1024
|
return openBlock(), createBlock(_component_ATooltip, { placement: "top" }, {
|
|
1032
1025
|
title: withCtx(() => [
|
|
1033
|
-
!unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(unref(t)("FULLSCREEN")), 1)) : createCommentVNode("
|
|
1026
|
+
!unref(isFullscreen) ? (openBlock(), createElementBlock("span", _hoisted_1$6, toDisplayString(unref(t)("FULLSCREEN")), 1)) : createCommentVNode("", true)
|
|
1034
1027
|
]),
|
|
1035
1028
|
default: withCtx(() => [
|
|
1036
1029
|
createElementVNode("span", {
|
|
@@ -1047,7 +1040,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1047
1040
|
};
|
|
1048
1041
|
}
|
|
1049
1042
|
});
|
|
1050
|
-
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"]]);
|
|
1051
1043
|
const _hoisted_1$5 = { class: "column-select" };
|
|
1052
1044
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1053
1045
|
__name: "DownloadCtrl",
|
|
@@ -1119,7 +1111,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1119
1111
|
createVNode(_component_ADivider, { dashed: "" }),
|
|
1120
1112
|
createVNode(_component_ARow, null, {
|
|
1121
1113
|
default: withCtx(() => [
|
|
1122
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(modalData.value, (it,
|
|
1114
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(modalData.value, (it, index) => {
|
|
1123
1115
|
return openBlock(), createBlock(_component_ACol, { span: 8 }, {
|
|
1124
1116
|
default: withCtx(() => [
|
|
1125
1117
|
createVNode(_component_ACheckbox, {
|
|
@@ -1145,7 +1137,6 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1145
1137
|
};
|
|
1146
1138
|
}
|
|
1147
1139
|
});
|
|
1148
|
-
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"]]);
|
|
1149
1140
|
const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", { class: "flex" }, [
|
|
1150
1141
|
/* @__PURE__ */ createElementVNode("i", { class: "i ic:baseline-download w-7 leading-7 text-center cursor-pointer" })
|
|
1151
1142
|
], -1);
|
|
@@ -1204,19 +1195,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1204
1195
|
createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_CURRENT_PAGE")), 1)
|
|
1205
1196
|
]),
|
|
1206
1197
|
_: 1
|
|
1207
|
-
})) : createCommentVNode("
|
|
1198
|
+
})) : createCommentVNode("", true),
|
|
1208
1199
|
unref(showSelectedDownload) ? (openBlock(), createBlock(_component_AMenuItem, { key: "select" }, {
|
|
1209
1200
|
default: withCtx(() => [
|
|
1210
1201
|
createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_SELECT_COLUMN")), 1)
|
|
1211
1202
|
]),
|
|
1212
1203
|
_: 1
|
|
1213
|
-
})) : createCommentVNode("
|
|
1204
|
+
})) : createCommentVNode("", true),
|
|
1214
1205
|
unref(showBackDownload) ? (openBlock(), createBlock(_component_AMenuItem, { key: "all" }, {
|
|
1215
1206
|
default: withCtx(() => [
|
|
1216
1207
|
createElementVNode("span", null, toDisplayString(unref(t)("EXPORT_ALL")), 1)
|
|
1217
1208
|
]),
|
|
1218
1209
|
_: 1
|
|
1219
|
-
})) : createCommentVNode("
|
|
1210
|
+
})) : createCommentVNode("", true)
|
|
1220
1211
|
]),
|
|
1221
1212
|
_: 1
|
|
1222
1213
|
})
|
|
@@ -1226,14 +1217,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1226
1217
|
]),
|
|
1227
1218
|
_: 1
|
|
1228
1219
|
}),
|
|
1229
|
-
createVNode(
|
|
1220
|
+
createVNode(_sfc_main$6, { onRegister: unref(registerDialog) }, null, 8, ["onRegister"])
|
|
1230
1221
|
]),
|
|
1231
1222
|
_: 1
|
|
1232
1223
|
});
|
|
1233
1224
|
};
|
|
1234
1225
|
}
|
|
1235
1226
|
});
|
|
1236
|
-
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"]]);
|
|
1237
1227
|
const _hoisted_1$3 = /* @__PURE__ */ createElementVNode("i", { class: "i ant-design:drag-outlined drag-icon cursor-pointer" }, null, -1);
|
|
1238
1228
|
const _hoisted_2$1 = ["onClick"];
|
|
1239
1229
|
const _hoisted_3$1 = ["onClick"];
|
|
@@ -1376,9 +1366,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1376
1366
|
return;
|
|
1377
1367
|
const columns = getColumns();
|
|
1378
1368
|
const isFixed = item.fixed === fixed ? false : fixed;
|
|
1379
|
-
const
|
|
1380
|
-
if (
|
|
1381
|
-
columns[
|
|
1369
|
+
const index = columns.findIndex((col) => col.dataIndex === item.dataIndex);
|
|
1370
|
+
if (index !== -1) {
|
|
1371
|
+
columns[index].fixed = isFixed;
|
|
1382
1372
|
}
|
|
1383
1373
|
item.fixed = isFixed;
|
|
1384
1374
|
if (isFixed && !item.width) {
|
|
@@ -1414,7 +1404,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1414
1404
|
state.checkedList = checkList;
|
|
1415
1405
|
}
|
|
1416
1406
|
function getPopupContainer$1() {
|
|
1417
|
-
return isFunction
|
|
1407
|
+
return isFunction(attrs.getPopupContainer) ? attrs.getPopupContainer() : document.getElementById("dt-layout-content") || getPopupContainer();
|
|
1418
1408
|
}
|
|
1419
1409
|
return (_ctx, _cache) => {
|
|
1420
1410
|
const _component_ACheckbox = Checkbox$1;
|
|
@@ -1569,7 +1559,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1569
1559
|
};
|
|
1570
1560
|
}
|
|
1571
1561
|
});
|
|
1572
|
-
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"]]);
|
|
1573
1562
|
const _hoisted_1$2 = { class: "flex dt-table-setting" };
|
|
1574
1563
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1575
1564
|
__name: "index",
|
|
@@ -1595,17 +1584,16 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1595
1584
|
}
|
|
1596
1585
|
return (_ctx, _cache) => {
|
|
1597
1586
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1598
|
-
unref(getSetting).download ? (openBlock(), createBlock(
|
|
1599
|
-
unref(getSetting).setting ? (openBlock(), createBlock(
|
|
1587
|
+
unref(getSetting).download ? (openBlock(), createBlock(_sfc_main$5, normalizeProps(mergeProps({ key: 0 }, unref(getSetting))), null, 16)) : createCommentVNode("", true),
|
|
1588
|
+
unref(getSetting).setting ? (openBlock(), createBlock(_sfc_main$4, {
|
|
1600
1589
|
key: 1,
|
|
1601
1590
|
onColumnsChange: handleColumnChange
|
|
1602
|
-
})) : createCommentVNode("
|
|
1603
|
-
unref(getSetting).fullscreen ? (openBlock(), createBlock(
|
|
1591
|
+
})) : createCommentVNode("", true),
|
|
1592
|
+
unref(getSetting).fullscreen ? (openBlock(), createBlock(_sfc_main$7, { key: 2 })) : createCommentVNode("", true)
|
|
1604
1593
|
]);
|
|
1605
1594
|
};
|
|
1606
1595
|
}
|
|
1607
1596
|
});
|
|
1608
|
-
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"]]);
|
|
1609
1597
|
const _hoisted_1$1 = { class: "dt-table-header" };
|
|
1610
1598
|
const _hoisted_2 = { class: "flex flex-row justify-between" };
|
|
1611
1599
|
const _hoisted_3 = { class: "flex flex-row flex-1" };
|
|
@@ -1641,21 +1629,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1641
1629
|
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
1642
1630
|
createElementVNode("div", _hoisted_2, [
|
|
1643
1631
|
createElementVNode("div", _hoisted_3, [
|
|
1644
|
-
unref(getActionsProps)?.buttonList.length ? (openBlock(), createBlock(unref(DtFormButtons), normalizeProps(mergeProps({ key: 0 }, unref(getActionsProps))), null, 16)) : createCommentVNode("
|
|
1632
|
+
unref(getActionsProps)?.buttonList.length ? (openBlock(), createBlock(unref(DtFormButtons), normalizeProps(mergeProps({ key: 0 }, unref(getActionsProps))), null, 16)) : createCommentVNode("", true),
|
|
1645
1633
|
renderSlot(_ctx.$slots, "toolbar")
|
|
1646
1634
|
]),
|
|
1647
1635
|
__props.tableSetting ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
1648
|
-
createVNode(
|
|
1649
|
-
])) : createCommentVNode("
|
|
1636
|
+
createVNode(_sfc_main$3, { setting: __props.tableSetting }, null, 8, ["setting"])
|
|
1637
|
+
])) : createCommentVNode("", true)
|
|
1650
1638
|
]),
|
|
1651
1639
|
_ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
1652
1640
|
renderSlot(_ctx.$slots, "headerTop")
|
|
1653
|
-
])) : createCommentVNode("
|
|
1641
|
+
])) : createCommentVNode("", true)
|
|
1654
1642
|
]);
|
|
1655
1643
|
};
|
|
1656
1644
|
}
|
|
1657
1645
|
});
|
|
1658
|
-
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"]]);
|
|
1659
1646
|
function useTableHeader(propsRef, slots, handlers) {
|
|
1660
1647
|
const { t } = useI18n("UI");
|
|
1661
1648
|
const getHeaderProps = computed(() => {
|
|
@@ -1668,7 +1655,7 @@ function useTableHeader(propsRef, slots, handlers) {
|
|
|
1668
1655
|
const hideTitle = (!toolbar || !toolbar.filter((it) => it.show ?? true).length) && !slots.toolbar && !slots.headerTop && !tableSetting;
|
|
1669
1656
|
return {
|
|
1670
1657
|
title: hideTitle ? null : () => h$1(
|
|
1671
|
-
|
|
1658
|
+
_sfc_main$2,
|
|
1672
1659
|
{
|
|
1673
1660
|
tableSetting,
|
|
1674
1661
|
toolbar,
|
|
@@ -2048,14 +2035,14 @@ function useTableScroll(propsRef, tableElRef, columnsRef, rowSelectionRef) {
|
|
|
2048
2035
|
};
|
|
2049
2036
|
}
|
|
2050
2037
|
function useRows(propsRef) {
|
|
2051
|
-
function getRowClassName(record,
|
|
2038
|
+
function getRowClassName(record, index) {
|
|
2052
2039
|
const { striped, rowClassName } = unref(propsRef);
|
|
2053
2040
|
const classNames = [];
|
|
2054
2041
|
if (striped) {
|
|
2055
|
-
classNames.push(
|
|
2042
|
+
classNames.push(index % 2 === 1 ? "table-striped" : "");
|
|
2056
2043
|
}
|
|
2057
2044
|
if (rowClassName && isFunction(rowClassName)) {
|
|
2058
|
-
classNames.push(rowClassName(record,
|
|
2045
|
+
classNames.push(rowClassName(record, index));
|
|
2059
2046
|
}
|
|
2060
2047
|
return classNames.join(" ");
|
|
2061
2048
|
}
|
|
@@ -2085,7 +2072,7 @@ const _sfc_main$1 = {
|
|
|
2085
2072
|
const {
|
|
2086
2073
|
column,
|
|
2087
2074
|
record,
|
|
2088
|
-
index
|
|
2075
|
+
index
|
|
2089
2076
|
} = props2;
|
|
2090
2077
|
const {
|
|
2091
2078
|
render,
|
|
@@ -2127,7 +2114,7 @@ const _sfc_main$1 = {
|
|
|
2127
2114
|
});
|
|
2128
2115
|
}
|
|
2129
2116
|
} else if (isFunction(render)) {
|
|
2130
|
-
let afterRenderData = render(record,
|
|
2117
|
+
let afterRenderData = render(record, index, text);
|
|
2131
2118
|
if (afterRenderData.__v_isRef) {
|
|
2132
2119
|
renderText = afterRenderData;
|
|
2133
2120
|
} else if (afterRenderData["setup"]) {
|
|
@@ -2145,7 +2132,6 @@ const _sfc_main$1 = {
|
|
|
2145
2132
|
return () => createVNode("span", null, [unref(renderText)]);
|
|
2146
2133
|
}
|
|
2147
2134
|
};
|
|
2148
|
-
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"]]);
|
|
2149
2135
|
const DEFAULT_SORT_FN = (sortInfo) => {
|
|
2150
2136
|
const { field, order } = sortInfo;
|
|
2151
2137
|
return field && order ? { field, order } : {};
|
|
@@ -2248,11 +2234,11 @@ const TableProps = {
|
|
|
2248
2234
|
},
|
|
2249
2235
|
onOpenUpdateDialog: {
|
|
2250
2236
|
type: Function,
|
|
2251
|
-
default: (row,
|
|
2237
|
+
default: (row, index) => ({})
|
|
2252
2238
|
},
|
|
2253
2239
|
onDelete: {
|
|
2254
2240
|
type: Function,
|
|
2255
|
-
default: (row,
|
|
2241
|
+
default: (row, index) => ({})
|
|
2256
2242
|
},
|
|
2257
2243
|
onDeletes: {
|
|
2258
2244
|
type: Function,
|
|
@@ -2400,16 +2386,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2400
2386
|
rowClassName: unref(getRowClassName),
|
|
2401
2387
|
onChange: unref(handleTableChange)
|
|
2402
2388
|
}), createSlots({
|
|
2403
|
-
bodyCell: withCtx(({ column, record, index
|
|
2404
|
-
_ctx.$slots.bodyCell ? renderSlot(_ctx.$slots, "bodyCell", normalizeProps(mergeProps({ key: 0 }, { column, record, index
|
|
2405
|
-
column.slot ? renderSlot(_ctx.$slots, column.slot, normalizeProps(mergeProps({ key: 1 }, { column, record, index
|
|
2406
|
-
|
|
2407
|
-
column?.render && !column.slot && !_ctx.$slots.bodyCell ? (openBlock(), createBlock(TableRender, {
|
|
2389
|
+
bodyCell: withCtx(({ column, record, index }) => [
|
|
2390
|
+
_ctx.$slots.bodyCell ? renderSlot(_ctx.$slots, "bodyCell", normalizeProps(mergeProps({ key: 0 }, { column, record, index }))) : createCommentVNode("", true),
|
|
2391
|
+
column.slot ? renderSlot(_ctx.$slots, column.slot, normalizeProps(mergeProps({ key: 1 }, { column, record, index }))) : createCommentVNode("", true),
|
|
2392
|
+
column?.render && !column.slot && !_ctx.$slots.bodyCell ? (openBlock(), createBlock(_sfc_main$1, {
|
|
2408
2393
|
key: 2,
|
|
2409
2394
|
column,
|
|
2410
2395
|
record,
|
|
2411
|
-
index
|
|
2412
|
-
}, null, 8, ["column", "record", "index"])) : createCommentVNode("
|
|
2396
|
+
index
|
|
2397
|
+
}, null, 8, ["column", "record", "index"])) : createCommentVNode("", true)
|
|
2413
2398
|
]),
|
|
2414
2399
|
emptyText: withCtx(() => [
|
|
2415
2400
|
_hoisted_1
|
|
@@ -2428,8 +2413,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2428
2413
|
};
|
|
2429
2414
|
}
|
|
2430
2415
|
});
|
|
2431
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/dt/dt-frame-front/dt-frames/frames/packages/ui/src/components/table/src/index.vue"]]);
|
|
2432
2416
|
export {
|
|
2433
|
-
|
|
2417
|
+
_sfc_main as DtTable,
|
|
2434
2418
|
useTable
|
|
2435
2419
|
};
|
|
@@ -9,6 +9,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
|
+
expandNum: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
};
|
|
12
15
|
width: {
|
|
13
16
|
type: StringConstructor;
|
|
14
17
|
default: string;
|
|
@@ -47,6 +50,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
47
50
|
type: BooleanConstructor;
|
|
48
51
|
default: boolean;
|
|
49
52
|
};
|
|
53
|
+
expandNum: {
|
|
54
|
+
type: NumberConstructor;
|
|
55
|
+
};
|
|
50
56
|
width: {
|
|
51
57
|
type: StringConstructor;
|
|
52
58
|
default: string;
|
|
@@ -75,7 +75,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
75
75
|
type: BooleanConstructor;
|
|
76
76
|
default: boolean;
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
expandActions: {
|
|
79
79
|
type: BooleanConstructor;
|
|
80
80
|
default: boolean;
|
|
81
81
|
};
|
|
@@ -311,7 +311,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
311
311
|
slotsTemplate: {};
|
|
312
312
|
showIndexColumn: boolean;
|
|
313
313
|
showCheckboxColumn: boolean;
|
|
314
|
-
|
|
314
|
+
expandActions: boolean;
|
|
315
315
|
ellipsis: boolean;
|
|
316
316
|
canResize: boolean;
|
|
317
317
|
onTableChange: Function;
|
|
@@ -478,7 +478,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
478
478
|
type: BooleanConstructor;
|
|
479
479
|
default: boolean;
|
|
480
480
|
};
|
|
481
|
-
|
|
481
|
+
expandActions: {
|
|
482
482
|
type: BooleanConstructor;
|
|
483
483
|
default: boolean;
|
|
484
484
|
};
|
|
@@ -607,7 +607,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
607
607
|
slotsTemplate: {};
|
|
608
608
|
showIndexColumn: boolean;
|
|
609
609
|
showCheckboxColumn: boolean;
|
|
610
|
-
|
|
610
|
+
expandActions: boolean;
|
|
611
611
|
ellipsis: boolean;
|
|
612
612
|
dataSource: import("@dt-frames/core").Recordable<any>[];
|
|
613
613
|
bordered: boolean;
|