@aplus-frontend/ui 7.12.6 → 7.13.0
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/src/ag-grid/components/loading/index.vue.d.ts +3 -0
- package/es/src/ag-grid/components/loading/index.vue.mjs +4 -0
- package/es/src/ag-grid/components/loading/index.vue2.mjs +18 -0
- package/es/src/ag-grid/context.mjs +1 -1
- package/es/src/ag-grid/editable/form-item.vue.mjs +33 -31
- package/es/src/ag-grid/editable/index.vue.mjs +1 -0
- package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
- package/es/src/ag-grid/index.vue.mjs +209 -202
- package/es/src/ag-grid/interface.d.ts +4 -0
- package/es/src/ag-grid/style/index.mjs +8 -5
- package/es/src/ap-drawer/interface.d.ts +13 -2
- package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
- package/es/src/ap-field/select/index.vue.d.ts +1 -2
- package/es/src/ap-field/select/index.vue.mjs +126 -88
- package/es/src/ap-field/style/index.mjs +8 -6
- package/es/src/ap-field/style/select.d.ts +2 -0
- package/es/src/ap-field/style/select.mjs +43 -0
- package/es/src/ap-form/context.mjs +1 -1
- package/es/src/ap-form/item-group/helper.mjs +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +4 -8
- package/es/src/ap-form/provider/context.mjs +1 -1
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
- package/es/src/ap-table/ap-table.vue2.mjs +15 -16
- package/es/src/ap-table/components/setting/context.d.ts +17 -0
- package/es/src/ap-table/components/setting/context.mjs +18 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +217 -88
- package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
- package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
- package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +77 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
- package/es/src/ap-table/components/setting/utils.d.ts +1 -0
- package/es/src/ap-table/components/setting/utils.mjs +22 -15
- package/es/src/ap-table/constants.d.ts +2 -4
- package/es/src/ap-table/context.mjs +1 -1
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
- package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
- package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
- package/es/src/ap-table/interface.d.ts +26 -3
- package/es/src/ap-table/style/index.d.ts +1 -0
- package/es/src/ap-table/style/index.mjs +2 -1
- package/es/src/ap-table/style/setting.d.ts +2 -0
- package/es/src/ap-table/style/setting.mjs +114 -19
- package/es/src/ap-table/utils.mjs +1 -1
- package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
- package/es/src/business/ag-grid-modal/style/index.mjs +7 -7
- package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
- package/es/src/business/ap-attachment/style/index.mjs +33 -16
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/es/src/business/ap-download/hooks/index.mjs +1 -1
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
- package/es/src/business/ap-keep-alive/hook.mjs +1 -1
- package/es/src/business/ap-keep-alive/utils.mjs +1 -1
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
- package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
- package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
- package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
- package/es/src/business/ap-view/style/index.mjs +2 -2
- package/es/src/check-card/context.mjs +1 -1
- package/es/src/config-provider/constants.mjs +1 -1
- package/es/src/config-provider/hooks/use-locale.mjs +1 -1
- package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
- package/es/src/config-provider/hooks/use-token.mjs +1 -1
- package/es/src/design-token/index.mjs +5 -5
- package/es/src/editable-table/utils.mjs +1 -1
- package/es/src/locale/lang/en.mjs +15 -4
- package/es/src/locale/lang/zh-cn.mjs +18 -7
- package/es/src/text/context.mjs +1 -1
- package/es/src/time-ago/useTimeAgo.mjs +26 -27
- package/es/src/utils/data-range-persets.d.ts +13 -1
- package/es/src/utils/data-range-persets.mjs +80 -60
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +56 -48
- package/es/src/utils/retry.d.ts +12 -0
- package/es/src/utils/retry.mjs +27 -0
- package/es/src/utils/slot.mjs +1 -1
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/loading/index.vue.d.ts +3 -0
- package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
- package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +4 -0
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +13 -2
- package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/style/index.js +1 -1
- package/lib/src/ap-field/style/select.d.ts +2 -0
- package/lib/src/ap-field/style/select.js +1 -0
- package/lib/src/ap-form/items/select/index.vue.d.ts +4 -8
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/context.d.ts +17 -0
- package/lib/src/ap-table/components/setting/context.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
- package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -1
- package/lib/src/ap-table/constants.d.ts +2 -4
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
- package/lib/src/ap-table/interface.d.ts +26 -3
- package/lib/src/ap-table/style/index.d.ts +1 -0
- package/lib/src/ap-table/style/index.js +1 -1
- package/lib/src/ap-table/style/setting.d.ts +2 -0
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/business/ag-grid-modal/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/style/index.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/utils/data-range-persets.d.ts +13 -1
- package/lib/src/utils/data-range-persets.js +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/utils/retry.d.ts +12 -0
- package/lib/src/utils/retry.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { genComponentStyleHook as d } from "../../../utils/cssinjs/index.mjs";
|
|
2
2
|
const l = (e) => {
|
|
3
|
-
const { componentCls:
|
|
3
|
+
const { componentCls: i } = e, o = `${i}--table-layout`;
|
|
4
4
|
return {
|
|
5
|
-
[`${
|
|
6
|
-
border: `${e.lineWidth} ${e.lineType} ${e.
|
|
5
|
+
[`${i}--bordered`]: {
|
|
6
|
+
border: `${e.lineWidth} ${e.lineType} ${e.borderColorBase}`,
|
|
7
7
|
padding: e.spaceXL,
|
|
8
8
|
borderRadius: e.borderRadius,
|
|
9
9
|
"--ag-grid-modal-layout-divider-offset": "32px"
|
|
10
10
|
},
|
|
11
|
-
[
|
|
11
|
+
[o]: {
|
|
12
12
|
boxSizing: "border-box",
|
|
13
13
|
display: "flex",
|
|
14
14
|
flex: 1,
|
|
15
15
|
justifyContent: "space-between",
|
|
16
16
|
height: "100%",
|
|
17
|
-
[`${
|
|
17
|
+
[`${o}-left`]: {
|
|
18
18
|
flex: 1,
|
|
19
19
|
minWidth: 0,
|
|
20
20
|
paddingInlineEnd: e.spaceXL,
|
|
@@ -25,7 +25,7 @@ const l = (e) => {
|
|
|
25
25
|
flex: 1
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
[`${
|
|
28
|
+
[`${o}-right`]: {
|
|
29
29
|
maxHeight: "100%",
|
|
30
30
|
width: e.agGridModalRightWidth,
|
|
31
31
|
paddingInlineStart: e.spaceXL,
|
|
@@ -45,7 +45,7 @@ const l = (e) => {
|
|
|
45
45
|
content: '""',
|
|
46
46
|
height: "calc(100% + var(--ag-grid-modal-layout-divider-offset,16px))",
|
|
47
47
|
width: e.lineWidth,
|
|
48
|
-
backgroundColor: e.
|
|
48
|
+
backgroundColor: e.borderColorBase,
|
|
49
49
|
position: "absolute",
|
|
50
50
|
left: 0,
|
|
51
51
|
top: "-16px"
|
|
@@ -1,144 +1,151 @@
|
|
|
1
|
-
import { defineComponent as j, ref as g, useSlots as
|
|
2
|
-
import { LoadingOutlined as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import { IconApAdLineDownload as
|
|
5
|
-
import { debounce as
|
|
6
|
-
import { useToken as
|
|
7
|
-
import { warning as
|
|
1
|
+
import { defineComponent as j, ref as g, useSlots as B, computed as c, cloneVNode as M, toRaw as w, unref as R, createVNode as e, createTextVNode as D } from "vue";
|
|
2
|
+
import { LoadingOutlined as T } from "@ant-design/icons-vue";
|
|
3
|
+
import { Tooltip as d, Popover as G } from "@aplus-frontend/antdv";
|
|
4
|
+
import { IconApAdLineDownload as O } from "@aplus-frontend/icon";
|
|
5
|
+
import { debounce as H, isArray as q } from "lodash-unified";
|
|
6
|
+
import { useToken as E } from "../../config-provider/hooks/use-token.mjs";
|
|
7
|
+
import { warning as J } from "../../utils/warning.mjs";
|
|
8
8
|
import "../../config-provider/index.mjs";
|
|
9
|
-
import { useOssInit as
|
|
10
|
-
import { getHexWithOpacity as
|
|
11
|
-
import { ApFilePreview as
|
|
12
|
-
import { ApAttachmentProps as
|
|
13
|
-
import
|
|
14
|
-
import { useNamespace as
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
import { useLocale as
|
|
17
|
-
const
|
|
9
|
+
import { useOssInit as Q } from "../ap-download/hooks/index.mjs";
|
|
10
|
+
import { getHexWithOpacity as X, getFileInfo as A } from "../ap-download/utils/getFileInfo.mjs";
|
|
11
|
+
import { ApFilePreview as Y } from "../ap-file-preview/index.mjs";
|
|
12
|
+
import { ApAttachmentProps as Z } from "./constans.mjs";
|
|
13
|
+
import $ from "./style/index.mjs";
|
|
14
|
+
import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
|
|
15
|
+
import { useGlobalConfig as P } from "../../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
import { useLocale as te } from "../../config-provider/hooks/use-locale.mjs";
|
|
17
|
+
const we = /* @__PURE__ */ j({
|
|
18
18
|
name: "ApAttachment",
|
|
19
|
-
props:
|
|
19
|
+
props: Z(),
|
|
20
20
|
setup(t, {
|
|
21
|
-
emit:
|
|
21
|
+
emit: N
|
|
22
22
|
}) {
|
|
23
23
|
const {
|
|
24
|
-
b
|
|
25
|
-
e:
|
|
26
|
-
} =
|
|
27
|
-
token:
|
|
28
|
-
} =
|
|
24
|
+
b,
|
|
25
|
+
e: a
|
|
26
|
+
} = ee("ap-attachment"), C = $("ap-attachment"), f = P("apUpload"), L = P("downloadCenterTriggerConfig"), {
|
|
27
|
+
token: y
|
|
28
|
+
} = E(), {
|
|
29
29
|
lang: I,
|
|
30
|
-
t:
|
|
31
|
-
} =
|
|
30
|
+
t: s
|
|
31
|
+
} = te(), r = g(!1), m = g(""), p = B(), K = c(() => I.value === "zh-cn" ? "zh_CN" : "en_US"), i = c(() => t.needName ?? (f?.value?.needName === !0 ? {
|
|
32
32
|
nameKey: "fileName",
|
|
33
33
|
pathKey: "path"
|
|
34
|
-
} :
|
|
34
|
+
} : f?.value?.needName ?? {
|
|
35
35
|
nameKey: "fileName",
|
|
36
36
|
pathKey: "filePath"
|
|
37
|
-
})),
|
|
38
|
-
"--download-main-color":
|
|
39
|
-
"--download-main-color-opacity":
|
|
40
|
-
})),
|
|
41
|
-
const
|
|
42
|
-
return
|
|
37
|
+
})), S = c(() => t.attachmentList.length === 1), U = c(() => i.value ? t.attachmentList.length > 0 && i.value && i.value?.nameKey ? t.attachmentList[0][i.value.nameKey] : "" : t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), x = c(() => ({
|
|
38
|
+
"--download-main-color": y.value?.colorLink,
|
|
39
|
+
"--download-main-color-opacity": X(y.value?.colorLink, 0.6)
|
|
40
|
+
})), V = c(() => t.getOssAccess || f.value?.getOssAccess), z = c(() => {
|
|
41
|
+
const l = p.default ? p.default()[0] : null;
|
|
42
|
+
return l ? M(l, {
|
|
43
43
|
style: {
|
|
44
44
|
"font-size": "16px"
|
|
45
45
|
}
|
|
46
46
|
}) : null;
|
|
47
|
-
}), v = g(!1), h =
|
|
47
|
+
}), v = g(!1), h = H(async (l, n) => {
|
|
48
48
|
if (!t.disabled) {
|
|
49
|
-
r.value = !0, n && (
|
|
49
|
+
r.value = !0, n && (m.value = n);
|
|
50
50
|
try {
|
|
51
|
-
const o =
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
54
|
-
objectName:
|
|
55
|
-
fileName:
|
|
51
|
+
const o = q(w(l)) ? w(l) : [w(l)];
|
|
52
|
+
if (L.value?.trigger) {
|
|
53
|
+
const u = A(i.value, o).map((k) => ({
|
|
54
|
+
objectName: k.path,
|
|
55
|
+
fileName: k.fileName
|
|
56
56
|
}));
|
|
57
|
-
|
|
57
|
+
L.value?.trigger(u), N("downloadCallback", u);
|
|
58
58
|
} else {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const u = await (await Q(V.value, R(K))).downloadFile(A(i.value, o));
|
|
60
|
+
N("downloadCallback", u);
|
|
61
61
|
}
|
|
62
62
|
} catch (o) {
|
|
63
|
-
|
|
63
|
+
J(!1, o);
|
|
64
64
|
} finally {
|
|
65
|
-
r.value = !1,
|
|
65
|
+
r.value = !1, m.value = "";
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
}, 500),
|
|
69
|
-
const n =
|
|
70
|
-
|
|
68
|
+
}, 500), F = (l) => {
|
|
69
|
+
const n = A(i.value, l)?.[0];
|
|
70
|
+
Y.createFilePreviewModal({
|
|
71
71
|
src: n.path,
|
|
72
72
|
fileName: n.fileName
|
|
73
73
|
}), v.value = !1;
|
|
74
|
-
}, W = (
|
|
75
|
-
class: [
|
|
76
|
-
style:
|
|
77
|
-
}, [
|
|
74
|
+
}, W = (l) => l && l.length > 0 ? e("ul", {
|
|
75
|
+
class: [a("file-list"), C.value],
|
|
76
|
+
style: x.value
|
|
77
|
+
}, [l.map((n, o) => e("li", {
|
|
78
78
|
key: o,
|
|
79
|
-
class: [
|
|
80
|
-
}, [r.value &&
|
|
81
|
-
class: [
|
|
82
|
-
}, [e(
|
|
79
|
+
class: [a("file-item")]
|
|
80
|
+
}, [r.value && m.value === o + 1 ? e("span", {
|
|
81
|
+
class: [a("spin")]
|
|
82
|
+
}, [e(T, {
|
|
83
83
|
spin: !0
|
|
84
|
-
}, null)]) : null, e(
|
|
85
|
-
title:
|
|
84
|
+
}, null)]) : null, e(d, {
|
|
85
|
+
title: s("ap.apAppendix.previewFile")
|
|
86
86
|
}, {
|
|
87
87
|
default: () => [e("span", {
|
|
88
|
-
class: [
|
|
89
|
-
onClick: () =>
|
|
88
|
+
class: [a("file-item-text")],
|
|
89
|
+
onClick: () => F(n)
|
|
90
90
|
}, [n.fileName])]
|
|
91
|
-
}), e(
|
|
92
|
-
title:
|
|
91
|
+
}), e(d, {
|
|
92
|
+
title: s("ap.apAppendix.downloadFile")
|
|
93
93
|
}, {
|
|
94
94
|
default: () => [e("span", {
|
|
95
|
-
class: [
|
|
95
|
+
class: [a("file-item-download")],
|
|
96
96
|
onClick: () => h(n, o + 1)
|
|
97
|
-
}, [e(
|
|
97
|
+
}, [e(O, null, null)])]
|
|
98
98
|
})])), e("li", {
|
|
99
|
-
class: [
|
|
99
|
+
class: [a("download-all")],
|
|
100
100
|
onClick: () => h(t.attachmentList, "all")
|
|
101
|
-
}, [r.value &&
|
|
102
|
-
class: [
|
|
103
|
-
}, [e(
|
|
101
|
+
}, [r.value && m.value === "all" ? e("span", {
|
|
102
|
+
class: [a("spin")]
|
|
103
|
+
}, [e(T, {
|
|
104
104
|
spin: !0
|
|
105
|
-
}, null)]) : null,
|
|
105
|
+
}, null)]) : null, s("ap.apAttachment.downloadall")])]) : null;
|
|
106
106
|
return () => t.attachmentList?.length > 0 && e("div", {
|
|
107
|
-
class: [
|
|
108
|
-
style: [
|
|
109
|
-
}, [e(
|
|
110
|
-
|
|
107
|
+
class: [b(), C.value],
|
|
108
|
+
style: [x.value]
|
|
109
|
+
}, [e("div", {
|
|
110
|
+
class: [a("content")]
|
|
111
|
+
}, [e(d, {
|
|
112
|
+
title: s("ap.apAppendix.previewFile"),
|
|
111
113
|
placement: t.textToolTipPlacement,
|
|
112
114
|
color: t.toolTipBgColor
|
|
113
115
|
}, {
|
|
114
116
|
default: () => [e("div", {
|
|
115
|
-
class: [
|
|
116
|
-
onClick: () =>
|
|
117
|
-
}, [
|
|
118
|
-
class: [
|
|
119
|
-
}, [e(
|
|
120
|
-
|
|
121
|
-
}, null)]) : null, f.default ? e("div", {
|
|
122
|
-
class: [l("text-render")]
|
|
123
|
-
}, [V.value, D(" ")]) : null, e("div", {
|
|
124
|
-
class: [l("text-inner")],
|
|
117
|
+
class: [a("content-text")],
|
|
118
|
+
onClick: () => F(t.attachmentList[0])
|
|
119
|
+
}, [p.default ? e("div", {
|
|
120
|
+
class: [a("text-render")]
|
|
121
|
+
}, [z.value, D(" ")]) : null, e("div", {
|
|
122
|
+
class: [a("text-inner")],
|
|
125
123
|
style: {
|
|
126
124
|
"max-width": t.maxWidth ? t.maxWidth + "px" : "auto"
|
|
127
125
|
}
|
|
128
|
-
}, [
|
|
129
|
-
}), e(
|
|
126
|
+
}, [U.value])])]
|
|
127
|
+
}), e(d, {
|
|
128
|
+
title: s("ap.apAppendix.downloadFile"),
|
|
129
|
+
placement: t.textToolTipPlacement,
|
|
130
|
+
color: t.toolTipBgColor
|
|
131
|
+
}, {
|
|
132
|
+
default: () => [e("span", {
|
|
133
|
+
class: [a("content-download")],
|
|
134
|
+
onClick: () => h(t.attachmentList[0], 0)
|
|
135
|
+
}, [e(O, null, null)])]
|
|
136
|
+
})]), e(G, {
|
|
130
137
|
content: W(t.attachmentList),
|
|
131
138
|
placement: t.fileMorePopoverPlacement,
|
|
132
139
|
color: "#fff",
|
|
133
140
|
open: v.value,
|
|
134
|
-
"onUpdate:open": (
|
|
141
|
+
"onUpdate:open": (l) => v.value = l
|
|
135
142
|
}, {
|
|
136
|
-
default: () => [!
|
|
137
|
-
class: [
|
|
138
|
-
}, [
|
|
143
|
+
default: () => [!S.value && e("div", {
|
|
144
|
+
class: [a("more")]
|
|
145
|
+
}, [s("ap.apAttachment.all")])]
|
|
139
146
|
})]);
|
|
140
147
|
}
|
|
141
148
|
});
|
|
142
149
|
export {
|
|
143
|
-
|
|
150
|
+
we as default
|
|
144
151
|
};
|
|
@@ -1,26 +1,43 @@
|
|
|
1
|
-
import { genComponentStyleHook as
|
|
1
|
+
import { genComponentStyleHook as r } from "../../../utils/cssinjs/index.mjs";
|
|
2
2
|
const a = (o) => {
|
|
3
|
-
const { componentCls:
|
|
3
|
+
const { componentCls: e } = o;
|
|
4
4
|
return {
|
|
5
|
-
[
|
|
5
|
+
[e]: {
|
|
6
6
|
display: "flex",
|
|
7
7
|
justifyContent: "space-between",
|
|
8
8
|
alignItems: "center",
|
|
9
|
-
[`${
|
|
9
|
+
[`${e}__content`]: {
|
|
10
10
|
width: "80%",
|
|
11
11
|
flex: 1,
|
|
12
|
+
overflow: "hidden",
|
|
12
13
|
display: "flex",
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
"&:hover": {
|
|
16
|
+
[`${e}__content-download`]: {
|
|
17
|
+
opacity: 1
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"&-text": {
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
overflow: "hidden"
|
|
24
|
+
},
|
|
25
|
+
"&-download": {
|
|
26
|
+
cursor: "pointer",
|
|
27
|
+
color: "var(--download-main-color)",
|
|
28
|
+
marginLeft: o.space,
|
|
29
|
+
opacity: 0,
|
|
30
|
+
fontSize: o.fontSizeXL
|
|
31
|
+
}
|
|
15
32
|
},
|
|
16
|
-
[`${
|
|
33
|
+
[`${e}__text-render`]: {
|
|
17
34
|
color: "var(--download-main-color)",
|
|
18
35
|
marginInlineEnd: o.spaceXS,
|
|
19
36
|
"&:hover": {
|
|
20
37
|
color: "var(--download-main-color-opacity)"
|
|
21
38
|
}
|
|
22
39
|
},
|
|
23
|
-
[`${
|
|
40
|
+
[`${e}__text-inner`]: {
|
|
24
41
|
flex: 1,
|
|
25
42
|
flexShrink: 0,
|
|
26
43
|
whiteSpace: "nowrap",
|
|
@@ -33,7 +50,7 @@ const a = (o) => {
|
|
|
33
50
|
color: "var(--download-main-color-opacity)"
|
|
34
51
|
}
|
|
35
52
|
},
|
|
36
|
-
[`${
|
|
53
|
+
[`${e}__more`]: {
|
|
37
54
|
fontSize: o.fontSize,
|
|
38
55
|
lineHeight: o.lineHeight,
|
|
39
56
|
cursor: "pointer",
|
|
@@ -44,24 +61,24 @@ const a = (o) => {
|
|
|
44
61
|
}
|
|
45
62
|
}
|
|
46
63
|
},
|
|
47
|
-
[`${
|
|
64
|
+
[`${e}__spin`]: {
|
|
48
65
|
float: "left",
|
|
49
66
|
marginRight: o.spaceXS
|
|
50
67
|
},
|
|
51
|
-
[`${
|
|
68
|
+
[`${e}__file-list`]: {
|
|
52
69
|
maxWidth: o.apAttachmentListMaxWidth,
|
|
53
70
|
display: "flex",
|
|
54
71
|
flexDirection: "column",
|
|
55
72
|
margin: 0,
|
|
56
73
|
padding: 0,
|
|
57
|
-
[`${
|
|
74
|
+
[`${e}__file-item`]: {
|
|
58
75
|
flex: 1,
|
|
59
76
|
wordWrap: "break-word",
|
|
60
77
|
marginBlockEnd: o.spaceLG,
|
|
61
78
|
fontSize: o.fontSize,
|
|
62
79
|
color: o.textColor1,
|
|
63
80
|
"&:hover": {
|
|
64
|
-
[`${
|
|
81
|
+
[`${e}__file-item-download`]: {
|
|
65
82
|
opacity: 1
|
|
66
83
|
}
|
|
67
84
|
},
|
|
@@ -79,7 +96,7 @@ const a = (o) => {
|
|
|
79
96
|
fontSize: o.fontSizeXL
|
|
80
97
|
}
|
|
81
98
|
},
|
|
82
|
-
[`${
|
|
99
|
+
[`${e}__download-all`]: {
|
|
83
100
|
fontSize: o.fontSize,
|
|
84
101
|
color: "var(--download-main-color)",
|
|
85
102
|
cursor: "pointer",
|
|
@@ -90,7 +107,7 @@ const a = (o) => {
|
|
|
90
107
|
}
|
|
91
108
|
}
|
|
92
109
|
};
|
|
93
|
-
},
|
|
110
|
+
}, i = r(
|
|
94
111
|
"ApAttachment",
|
|
95
112
|
(o) => [a(o)],
|
|
96
113
|
{
|
|
@@ -98,5 +115,5 @@ const a = (o) => {
|
|
|
98
115
|
}
|
|
99
116
|
);
|
|
100
117
|
export {
|
|
101
|
-
|
|
118
|
+
i as default
|
|
102
119
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, useSlots as j, computed as
|
|
1
|
+
import { defineComponent as O, useSlots as j, computed as o, createBlock as l, createCommentVNode as x, openBlock as p, unref as r, mergeProps as f, createSlots as S, withCtx as n, createElementVNode as E, normalizeStyle as q, resolveDynamicComponent as k, h as L, createVNode as i, renderList as g, renderSlot as A, normalizeProps as b, guardReactiveProps as v, normalizeClass as F } from "vue";
|
|
2
2
|
import { DownOutlined as H } from "@ant-design/icons-vue";
|
|
3
3
|
import { DropdownButton as J, Dropdown as K } from "@aplus-frontend/antdv";
|
|
4
4
|
import { usePermission as M } from "@aplus-frontend/hooks";
|
|
@@ -11,7 +11,7 @@ import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs
|
|
|
11
11
|
import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import B from "./MenuItemGroup.vue2.mjs";
|
|
13
13
|
import Y from "../../ap-button/ap-button.vue.mjs";
|
|
14
|
-
const
|
|
14
|
+
const de = /* @__PURE__ */ O({
|
|
15
15
|
__name: "ApBatchActionGroup",
|
|
16
16
|
props: {
|
|
17
17
|
selectedRows: {},
|
|
@@ -19,17 +19,19 @@ const me = /* @__PURE__ */ O({
|
|
|
19
19
|
menuList: {}
|
|
20
20
|
},
|
|
21
21
|
setup(C, { expose: $ }) {
|
|
22
|
-
const { b: h } = W("ap-batch-action-group"), D = U("ap-batch-action-group"), { t: R } = X(), { columns: T, dataSource: N } = Q(), e = C, { hasPermission: z } = M(), y = j(), w =
|
|
22
|
+
const { b: h } = W("ap-batch-action-group"), D = U("ap-batch-action-group"), { t: R } = X(), { columns: T, dataSource: N } = Q(), e = C, { hasPermission: z } = M(), y = j(), w = o(
|
|
23
23
|
() => e?.buttonProps?.dropdownType || "default"
|
|
24
|
-
), a =
|
|
24
|
+
), a = o(
|
|
25
25
|
() => e?.buttonProps?.type || "borderLink"
|
|
26
|
-
), P =
|
|
26
|
+
), P = o(
|
|
27
27
|
() => e?.buttonProps?.content || R("ap.apApBatchActionGroup.batchOperation")
|
|
28
|
-
), V =
|
|
28
|
+
), V = o(() => e?.selectedRows || []), c = o(
|
|
29
29
|
() => e?.buttonProps?.disabled ?? (Array.isArray(e.selectedRows) ? V.value.length === 0 : !1)
|
|
30
|
-
), G =
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
), G = o(() => a.value === "borderLink" ? c.value ? void 0 : "var(--ap-button-border-link-color)" : void 0), u = o(() => e?.menuList?.filter((t) => {
|
|
31
|
+
if (t === "divider")
|
|
32
|
+
return !0;
|
|
33
|
+
let d = t?.ifShow;
|
|
34
|
+
return !t?.ifShow && t?.auth && (d = () => z(t.auth)), d?.() ?? !0;
|
|
33
35
|
}) || []);
|
|
34
36
|
function _() {
|
|
35
37
|
return e?.buttonProps ? {
|
|
@@ -40,18 +42,18 @@ const me = /* @__PURE__ */ O({
|
|
|
40
42
|
return $({
|
|
41
43
|
columns: T,
|
|
42
44
|
dataSource: N
|
|
43
|
-
}), (
|
|
45
|
+
}), (t, d) => u.value.length && w.value === "dropdown" ? (p(), l(r(J), f({
|
|
44
46
|
key: 0,
|
|
45
47
|
class: [r(h)(), r(D)]
|
|
46
48
|
}, {
|
|
47
|
-
...
|
|
49
|
+
...t.$attrs,
|
|
48
50
|
..._(),
|
|
49
51
|
disabled: c.value
|
|
50
52
|
}), S({
|
|
51
53
|
overlay: n(() => [
|
|
52
54
|
i(B, f({
|
|
53
55
|
...e
|
|
54
|
-
}, { "menu-list":
|
|
56
|
+
}, { "menu-list": u.value }), null, 16, ["menu-list"])
|
|
55
57
|
]),
|
|
56
58
|
default: n(() => [
|
|
57
59
|
E("span", {
|
|
@@ -59,18 +61,18 @@ const me = /* @__PURE__ */ O({
|
|
|
59
61
|
color: G.value
|
|
60
62
|
})
|
|
61
63
|
}, [
|
|
62
|
-
(p(),
|
|
64
|
+
(p(), l(k(L("span", [P.value]))))
|
|
63
65
|
], 4)
|
|
64
66
|
]),
|
|
65
67
|
_: 2
|
|
66
68
|
}, [
|
|
67
69
|
g(y, (I, s) => ({
|
|
68
70
|
name: s,
|
|
69
|
-
fn: n((
|
|
70
|
-
A(
|
|
71
|
+
fn: n((m) => [
|
|
72
|
+
A(t.$slots, s, b(v(m || {})))
|
|
71
73
|
])
|
|
72
74
|
}))
|
|
73
|
-
]), 1040, ["class"])) :
|
|
75
|
+
]), 1040, ["class"])) : u.value.length && w.value === "default" ? (p(), l(r(K), {
|
|
74
76
|
key: 1,
|
|
75
77
|
class: F([r(h)()]),
|
|
76
78
|
disabled: c.value
|
|
@@ -78,16 +80,16 @@ const me = /* @__PURE__ */ O({
|
|
|
78
80
|
overlay: n(() => [
|
|
79
81
|
i(B, f({
|
|
80
82
|
...e
|
|
81
|
-
}, { "menu-list":
|
|
83
|
+
}, { "menu-list": u.value }), null, 16, ["menu-list"])
|
|
82
84
|
]),
|
|
83
85
|
default: n(() => [
|
|
84
86
|
i(r(Y), b(v({
|
|
85
|
-
...
|
|
87
|
+
...t.$attrs,
|
|
86
88
|
..._(),
|
|
87
89
|
type: a.value
|
|
88
90
|
})), {
|
|
89
91
|
default: n(() => [
|
|
90
|
-
(p(),
|
|
92
|
+
(p(), l(k(L("span", [P.value])))),
|
|
91
93
|
i(r(H))
|
|
92
94
|
]),
|
|
93
95
|
_: 1
|
|
@@ -97,13 +99,13 @@ const me = /* @__PURE__ */ O({
|
|
|
97
99
|
}, [
|
|
98
100
|
g(y, (I, s) => ({
|
|
99
101
|
name: s,
|
|
100
|
-
fn: n((
|
|
101
|
-
A(
|
|
102
|
+
fn: n((m) => [
|
|
103
|
+
A(t.$slots, s, b(v(m || {})))
|
|
102
104
|
])
|
|
103
105
|
}))
|
|
104
106
|
]), 1032, ["class", "disabled"])) : x("", !0);
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
de as default
|
|
109
111
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApBatchActionGroupMenuProps, ApBatchActionGroupProps } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = ApBatchActionGroupProps & {
|
|
4
|
-
menuList: ApBatchActionGroupMenuProps[];
|
|
4
|
+
menuList: (ApBatchActionGroupMenuProps | 'divider')[];
|
|
5
5
|
};
|
|
6
6
|
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
export default _default;
|
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { LoadingOutlined as
|
|
3
|
-
import { Menu as
|
|
4
|
-
const B = { style: { display: "flex", "align-items": "center" } },
|
|
1
|
+
import { defineComponent as y, ref as _, createBlock as r, openBlock as o, unref as l, withCtx as c, createElementBlock as u, Fragment as a, renderList as k, mergeProps as m, createElementVNode as w, withDirectives as h, createVNode as b, vShow as g, resolveDynamicComponent as C, h as R } from "vue";
|
|
2
|
+
import { LoadingOutlined as L } from "@ant-design/icons-vue";
|
|
3
|
+
import { Menu as f, MenuItem as M } from "@aplus-frontend/antdv";
|
|
4
|
+
const B = { style: { display: "flex", "align-items": "center" } }, N = /* @__PURE__ */ y({
|
|
5
5
|
__name: "MenuItemGroup",
|
|
6
6
|
props: {
|
|
7
7
|
selectedRows: {},
|
|
8
8
|
buttonProps: {},
|
|
9
9
|
menuList: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
async function
|
|
14
|
-
const e =
|
|
15
|
-
|
|
11
|
+
setup(p) {
|
|
12
|
+
const s = p, n = _({});
|
|
13
|
+
async function v(d, i) {
|
|
14
|
+
const e = d?.id || i;
|
|
15
|
+
n.value[e] = !0;
|
|
16
16
|
try {
|
|
17
|
-
await
|
|
17
|
+
await d?.onClick?.({ selectedRows: s?.selectedRows });
|
|
18
18
|
} finally {
|
|
19
|
-
|
|
19
|
+
n.value[e] = void 0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
return (
|
|
23
|
-
default:
|
|
24
|
-
(o(!0),
|
|
25
|
-
key: e?.id ||
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
return (d, i) => (o(), r(l(f), null, {
|
|
23
|
+
default: c(() => [
|
|
24
|
+
(o(!0), u(a, null, k(s.menuList, (e, t) => (o(), u(a, {
|
|
25
|
+
key: e === "divider" ? `divider-${t}` : e?.id || t
|
|
26
|
+
}, [
|
|
27
|
+
e === "divider" ? (o(), r(l(f).Divider, { key: 0 })) : (o(), r(l(M), m({
|
|
28
|
+
key: e?.id || t
|
|
29
|
+
}, { ref_for: !0 }, {
|
|
30
|
+
...e,
|
|
31
|
+
onClick: () => v(e, t),
|
|
32
|
+
disabled: n.value[e?.id || t] ?? (typeof e?.disabled == "function" ? e?.disabled({ selectedRows: s?.selectedRows }) : e?.disabled) ?? !1
|
|
33
|
+
}), {
|
|
34
|
+
default: c(() => [
|
|
35
|
+
w("div", B, [
|
|
36
|
+
h(b(l(L), { style: { "margin-right": "10px" } }, null, 512), [
|
|
37
|
+
[g, n.value[e?.id || t]]
|
|
38
|
+
]),
|
|
39
|
+
(o(), r(C(R(a, [e?.content]))))
|
|
40
|
+
])
|
|
41
|
+
]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1040))
|
|
44
|
+
], 64))), 128))
|
|
41
45
|
]),
|
|
42
46
|
_: 1
|
|
43
47
|
}));
|
|
44
48
|
}
|
|
45
49
|
});
|
|
46
50
|
export {
|
|
47
|
-
|
|
51
|
+
N as default
|
|
48
52
|
};
|
|
@@ -322,7 +322,7 @@ declare const ApBatchActionGroup: {
|
|
|
322
322
|
type?: ButtonType | "borderLink" | undefined;
|
|
323
323
|
content?: VNodeChild;
|
|
324
324
|
}) | undefined;
|
|
325
|
-
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
325
|
+
menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
|
|
326
326
|
}> & Readonly<{}>, {
|
|
327
327
|
columns: ComputedRef<TableColumnsType<any>> | undefined;
|
|
328
328
|
dataSource: ComputedRef<any[]> | undefined;
|
|
@@ -644,7 +644,7 @@ declare const ApBatchActionGroup: {
|
|
|
644
644
|
type?: ButtonType | "borderLink" | undefined;
|
|
645
645
|
content?: VNodeChild;
|
|
646
646
|
}) | undefined;
|
|
647
|
-
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
647
|
+
menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
|
|
648
648
|
}> & Readonly<{}>, {
|
|
649
649
|
columns: ComputedRef<TableColumnsType<any>> | undefined;
|
|
650
650
|
dataSource: ComputedRef<any[]> | undefined;
|
|
@@ -963,7 +963,7 @@ declare const ApBatchActionGroup: {
|
|
|
963
963
|
type?: ButtonType | "borderLink" | undefined;
|
|
964
964
|
content?: VNodeChild;
|
|
965
965
|
}) | undefined;
|
|
966
|
-
menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
|
|
966
|
+
menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
|
|
967
967
|
}> & Readonly<{}>, {
|
|
968
968
|
columns: ComputedRef<TableColumnsType<any>> | undefined;
|
|
969
969
|
dataSource: ComputedRef<any[]> | undefined;
|
|
@@ -43,7 +43,7 @@ export type ApBatchActionGroupProps<RecordType = any> = {
|
|
|
43
43
|
/**
|
|
44
44
|
* 下拉列表配置
|
|
45
45
|
*/
|
|
46
|
-
menuList?: ApBatchActionGroupMenuProps<RecordType>[];
|
|
46
|
+
menuList?: (ApBatchActionGroupMenuProps<RecordType> | 'divider')[];
|
|
47
47
|
};
|
|
48
48
|
export type ApBatchActionGroupExpose<RecordType = any> = {
|
|
49
49
|
columns?: ColumnType<any>[];
|