@aplus-frontend/ui 0.1.26 → 0.1.27
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/ap-download/ap-download.vue.d.ts +7 -3
- package/es/src/ap-download/ap-download.vue.mjs +50 -35
- package/es/src/ap-download/interface.d.ts +3 -11
- package/es/src/ap-download/style/ap-download.css +3 -0
- package/es/src/ap-table/ap-table.vue.mjs +231 -183
- package/es/src/ap-table/components/interface.d.ts +33 -1
- package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
- package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
- package/es/src/ap-table/components/setting/utils.d.ts +17 -0
- package/es/src/ap-table/components/setting/utils.mjs +48 -0
- package/es/src/ap-table/components/style/setting/modal.css +39 -0
- package/es/src/ap-table/components/style/setting/select-group.css +7 -0
- package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/es/src/ap-table/components/style/setting/sorter.css +26 -0
- package/es/src/ap-table/constants.d.ts +31 -8
- package/es/src/ap-table/constants.mjs +41 -53
- package/es/src/ap-table/context.d.ts +31 -0
- package/es/src/ap-table/context.mjs +20 -0
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
- package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
- package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
- package/es/src/ap-table/interface.d.ts +51 -1
- package/es/src/ap-table/style/ap-table.css +29 -1
- package/es/src/ap-table/utils.d.ts +1 -1
- package/es/src/ap-table/utils.mjs +82 -82
- package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
- package/es/src/business/ap-attachment/style.css +2 -0
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/es/src/business/index.d.ts +1 -1
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/locale/lang/en.mjs +14 -0
- package/es/src/locale/lang/zh-cn.mjs +14 -0
- package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
- package/es/src/theme/ap-download/ap-download.css +3 -0
- package/es/src/theme/ap-table/ap-table.css +29 -1
- package/es/src/theme/ap-table/setting/modal.css +39 -0
- package/es/src/theme/ap-table/setting/select-group.css +7 -0
- package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/es/src/theme/ap-table/setting/sorter.css +26 -0
- package/es/src/theme/css-var/index.mjs +22 -12
- package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -11
- package/lib/src/ap-download/style/ap-download.css +3 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/components/interface.d.ts +33 -1
- package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
- package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
- package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
- package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
- package/lib/src/ap-table/components/setting/utils.js +1 -0
- package/lib/src/ap-table/components/style/setting/modal.css +39 -0
- package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
- package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
- package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
- package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
- package/lib/src/ap-table/constants.d.ts +31 -8
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/context.d.ts +31 -0
- package/lib/src/ap-table/context.js +1 -0
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
- package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
- package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +51 -1
- package/lib/src/ap-table/style/ap-table.css +29 -1
- package/lib/src/ap-table/utils.d.ts +1 -1
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style.css +2 -0
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/lib/src/business/index.d.ts +1 -1
- package/lib/src/editable-table/interface.d.ts +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/theme/ap-attachment/ap-attachment.css +2 -0
- package/lib/src/theme/ap-download/ap-download.css +3 -0
- package/lib/src/theme/ap-table/ap-table.css +29 -1
- package/lib/src/theme/ap-table/setting/modal.css +39 -0
- package/lib/src/theme/ap-table/setting/select-group.css +7 -0
- package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
- package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
- package/lib/src/theme/ap-table/setting/sorter.css +26 -0
- package/lib/src/theme/css-var/index.js +1 -1
- package/package.json +3 -2
|
@@ -8423,7 +8423,7 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
|
|
|
8423
8423
|
* @returns
|
|
8424
8424
|
*/
|
|
8425
8425
|
export declare function objectToString(value: any): any;
|
|
8426
|
-
export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
|
|
8426
|
+
export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassName: string, slot?: (props: {
|
|
8427
8427
|
title: any;
|
|
8428
8428
|
column: ApColumnType<any>;
|
|
8429
8429
|
}) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | import("vue/jsx-runtime").JSX.Element | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as T, createVNode as u, mergeProps as f, cloneVNode as b, Fragment as y } from "vue";
|
|
2
|
+
import { isObject as c, isArray as p, isUndefined as g, isFunction as h, omit as j, isBoolean as F, isString as a } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as O, apTableFormItemMap as E } from "./constants.mjs";
|
|
4
|
+
import { isType as x } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
6
|
+
import { Tooltip as N } from "ant-design-vue";
|
|
7
|
+
import { QuestionCircleOutlined as S } from "@ant-design/icons-vue";
|
|
8
8
|
import I from "../ap-form/ap-form-item.vue.mjs";
|
|
9
9
|
function v(t) {
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !T(t);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
let
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
}) :
|
|
12
|
+
const P = (t, e, n) => {
|
|
13
|
+
let r = {};
|
|
14
|
+
return c(t) ? Object.keys(t).forEach((o) => {
|
|
15
|
+
c(t[o]) ? r[o] = P(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
16
|
+
}) : r = n(t, e), r;
|
|
17
17
|
}, J = (t, e) => {
|
|
18
18
|
switch (t) {
|
|
19
19
|
case "dayjs":
|
|
@@ -21,12 +21,12 @@ const C = (t, e, n) => {
|
|
|
21
21
|
case "dayjsRange":
|
|
22
22
|
return e.map((n) => n.valueOf());
|
|
23
23
|
case "dayjsDayRange": {
|
|
24
|
-
const [n,
|
|
25
|
-
return [n.startOf("day").valueOf(),
|
|
24
|
+
const [n, r] = e;
|
|
25
|
+
return [n.startOf("day").valueOf(), r.endOf("day").valueOf()];
|
|
26
26
|
}
|
|
27
27
|
case "multiple":
|
|
28
28
|
case "multipleNumber":
|
|
29
|
-
return
|
|
29
|
+
return p(e) ? e : [e];
|
|
30
30
|
case "boolean":
|
|
31
31
|
return e;
|
|
32
32
|
case "object":
|
|
@@ -36,93 +36,93 @@ const C = (t, e, n) => {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
function L(t) {
|
|
39
|
-
return
|
|
39
|
+
return p(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function V(t) {
|
|
42
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
43
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
const e = [], n =
|
|
47
|
-
return n.forEach((
|
|
48
|
-
const
|
|
49
|
-
if (
|
|
50
|
-
if (typeof
|
|
45
|
+
const w = (t) => V(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t) => {
|
|
46
|
+
const e = [], n = w(t);
|
|
47
|
+
return n.forEach((r, o) => {
|
|
48
|
+
const i = n.get(o) || n.get(`${o}`);
|
|
49
|
+
if (i) {
|
|
50
|
+
if (typeof i == "object" && (i != null && i.text)) {
|
|
51
51
|
e.push({
|
|
52
|
-
text:
|
|
53
|
-
value:
|
|
54
|
-
label:
|
|
55
|
-
disabled:
|
|
52
|
+
text: i == null ? void 0 : i.text,
|
|
53
|
+
value: o,
|
|
54
|
+
label: i == null ? void 0 : i.text,
|
|
55
|
+
disabled: i.disabled
|
|
56
56
|
});
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
e.push({
|
|
60
|
-
text:
|
|
61
|
-
label:
|
|
62
|
-
value:
|
|
60
|
+
text: i,
|
|
61
|
+
label: i,
|
|
62
|
+
value: o
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}), e;
|
|
66
|
-
}, Q = (t) =>
|
|
66
|
+
}, Q = (t) => g(t) || t < 0 ? 0 : t, U = (t, e, n) => {
|
|
67
67
|
if (n)
|
|
68
68
|
return n;
|
|
69
|
-
const
|
|
69
|
+
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
70
70
|
if (e === "dateRange")
|
|
71
71
|
return [t("ap.common.chooseText"), t("ap.common.chooseText")];
|
|
72
|
-
if (
|
|
72
|
+
if (r.includes(e))
|
|
73
73
|
return t("ap.common.chooseText");
|
|
74
|
-
if (
|
|
74
|
+
if (o.includes(e))
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return !t || !
|
|
77
|
+
function A(t, e) {
|
|
78
|
+
return !t || !h(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function W(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
82
82
|
return t.valueEnum && (e = "status"), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function z(t, e, n, r) {
|
|
85
85
|
var s;
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
88
|
-
return u(
|
|
86
|
+
const o = O[t];
|
|
87
|
+
if (o)
|
|
88
|
+
return u(o, f(e, {
|
|
89
89
|
mode: "read"
|
|
90
90
|
}), null);
|
|
91
|
-
const
|
|
92
|
-
return ((s =
|
|
91
|
+
const i = r == null ? void 0 : r[t];
|
|
92
|
+
return ((s = i == null ? void 0 : i.render) == null ? void 0 : s.call(i, e.value, n, e)) || e.value;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function G(t, e) {
|
|
95
95
|
if (t.customRenderFormItem)
|
|
96
96
|
return () => {
|
|
97
|
-
const
|
|
98
|
-
return
|
|
97
|
+
const o = t.customRenderFormItem(t);
|
|
98
|
+
return b(o, {
|
|
99
99
|
...t.fieldProps,
|
|
100
100
|
span: t.span,
|
|
101
|
-
...
|
|
101
|
+
...o.props || {}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
const n =
|
|
104
|
+
const n = E[t.valueType];
|
|
105
105
|
if (n)
|
|
106
106
|
return n;
|
|
107
|
-
const
|
|
107
|
+
const r = e == null ? void 0 : e[t.valueType];
|
|
108
108
|
return () => {
|
|
109
|
-
var
|
|
110
|
-
const
|
|
111
|
-
return
|
|
109
|
+
var i;
|
|
110
|
+
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
+
return o ? u(I, f(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
|
-
}), v(
|
|
114
|
-
default: () => [
|
|
113
|
+
}), v(o) ? o : {
|
|
114
|
+
default: () => [o]
|
|
115
115
|
}) : null;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const n =
|
|
118
|
+
function K(t, e) {
|
|
119
|
+
const n = A(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", s = o ? {
|
|
120
120
|
checked: e.value
|
|
121
121
|
} : {
|
|
122
|
-
value:
|
|
122
|
+
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
|
-
return t.valueEnum && (
|
|
125
|
-
...
|
|
124
|
+
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
+
...j(r, ["request"]),
|
|
126
126
|
...s
|
|
127
127
|
};
|
|
128
128
|
}
|
|
@@ -130,18 +130,18 @@ function X(t) {
|
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return F(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
135
|
function Y(t, e) {
|
|
136
|
-
var
|
|
136
|
+
var r;
|
|
137
137
|
const n = e || {};
|
|
138
|
-
return t.valueEnum && !((
|
|
138
|
+
return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
|
|
139
139
|
...n.field,
|
|
140
|
-
options:
|
|
140
|
+
options: d(t.valueEnum)
|
|
141
141
|
}), n;
|
|
142
142
|
}
|
|
143
143
|
function Z(t) {
|
|
144
|
-
if (!
|
|
144
|
+
if (!x("Object")(t))
|
|
145
145
|
return t;
|
|
146
146
|
try {
|
|
147
147
|
return JSON.stringify(t);
|
|
@@ -149,50 +149,50 @@ function Z(t) {
|
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function k(t, e, n) {
|
|
153
|
-
const o =
|
|
152
|
+
function k(t, e, n, r) {
|
|
153
|
+
const o = n == null ? void 0 : n({
|
|
154
154
|
title: t.title,
|
|
155
155
|
column: t
|
|
156
156
|
});
|
|
157
157
|
if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
|
|
158
158
|
return o;
|
|
159
|
-
const
|
|
160
|
-
|
|
159
|
+
const s = a(t.title) ? u("span", {
|
|
160
|
+
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title,
|
|
162
|
+
}, [t.title]) : t.title, l = t.tooltip ? a(t.tooltip) ? u(y, null, [t.tooltip]) : t.tooltip(t) : null, m = u("span", {
|
|
163
163
|
style: {
|
|
164
164
|
display: "inline-flex",
|
|
165
165
|
alignItems: "center"
|
|
166
166
|
}
|
|
167
|
-
}, [
|
|
168
|
-
title:
|
|
167
|
+
}, [s, u(N, {
|
|
168
|
+
title: l,
|
|
169
169
|
placement: "bottom"
|
|
170
170
|
}, {
|
|
171
|
-
default: () => [u(
|
|
171
|
+
default: () => [u(S, {
|
|
172
172
|
style: {
|
|
173
173
|
padding: "4px",
|
|
174
|
-
color:
|
|
174
|
+
color: r,
|
|
175
175
|
verticalAlign: "middle"
|
|
176
176
|
}
|
|
177
177
|
}, null)]
|
|
178
178
|
})]);
|
|
179
|
-
return
|
|
179
|
+
return l ? m : s;
|
|
180
180
|
}
|
|
181
181
|
export {
|
|
182
182
|
X as apColumnToColumn,
|
|
183
183
|
L as dataIndexToStr,
|
|
184
|
-
|
|
184
|
+
P as formatParamsValueType,
|
|
185
185
|
Q as getColumnOrder,
|
|
186
|
-
|
|
186
|
+
A as getFieldProps,
|
|
187
187
|
U as getPlaceholder,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
G as getSearchFormItemRenderNode,
|
|
189
|
+
z as getTableCellRenderNode,
|
|
190
|
+
K as getTableRenderProps,
|
|
191
|
+
W as getTableRenderType,
|
|
192
192
|
k as getTableTitle,
|
|
193
|
-
|
|
193
|
+
w as objectToMap,
|
|
194
194
|
Z as objectToString,
|
|
195
195
|
J as parseFieldValue,
|
|
196
196
|
Y as updateFormProps,
|
|
197
|
-
|
|
197
|
+
d as valueEnumToArray
|
|
198
198
|
};
|
|
@@ -42,7 +42,7 @@ declare const _default: DefineComponent<{
|
|
|
42
42
|
toolTipBgColor: {
|
|
43
43
|
type: StringConstructor;
|
|
44
44
|
};
|
|
45
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
45
|
+
}, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
46
|
attachmentList: {
|
|
47
47
|
type: PropType<Array<AttachmentItemProps>>;
|
|
48
48
|
default: never[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as O, useSlots as T, computed as
|
|
1
|
+
import { defineComponent as O, useSlots as T, computed as o, cloneVNode as P, unref as k, toRaw as u, createVNode as a, createTextVNode as S } from "vue";
|
|
2
2
|
import { Tooltip as V, Popover as b } from "ant-design-vue";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
4
|
import { ApAttachmentProps as z } from "./constans.mjs";
|
|
@@ -7,7 +7,7 @@ import "./style.css";
|
|
|
7
7
|
import { useOssInit as U } from "../../ap-download/hooks/index.mjs";
|
|
8
8
|
import { isArray as _ } from "lodash-unified";
|
|
9
9
|
import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
-
import { useGlobalConfig as
|
|
10
|
+
import { useGlobalConfig as v } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
11
|
import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
const Y = /* @__PURE__ */ O({
|
|
13
13
|
name: "ApAttachment",
|
|
@@ -16,65 +16,68 @@ const Y = /* @__PURE__ */ O({
|
|
|
16
16
|
const {
|
|
17
17
|
b: p,
|
|
18
18
|
e: l
|
|
19
|
-
} = B("ap-attachment"), A =
|
|
19
|
+
} = B("ap-attachment"), A = v("uiMode"), g = v("apUpload"), {
|
|
20
20
|
lang: w,
|
|
21
21
|
t: i
|
|
22
|
-
} = G(), s = T(), C =
|
|
22
|
+
} = G(), s = T(), C = o(() => w.value === "zh-cn" ? "zh_CN" : "en_US"), n = o(() => t.attachmentList.length === 1), d = o(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), L = o(() => n.value ? d.value : i("ap.apAttachment.downloadall")), f = o(() => t.color ? t.color : A.value === "aplus" ? "#0070FF" : "#1890FF"), N = o(() => ({
|
|
23
23
|
width: n.value ? "auto" : "266px"
|
|
24
|
-
})),
|
|
24
|
+
})), h = o(() => ({
|
|
25
25
|
"--download-main-color": f.value,
|
|
26
26
|
"--download-main-color-opacity": I(f.value, 0.6)
|
|
27
|
-
})),
|
|
27
|
+
})), y = o(() => {
|
|
28
28
|
var e;
|
|
29
29
|
return t.getOssAccess || ((e = g.value) == null ? void 0 : e.getOssAccess);
|
|
30
|
-
}),
|
|
30
|
+
}), F = o(() => {
|
|
31
31
|
const e = s.default ? s.default()[0] : null;
|
|
32
32
|
return e ? P(e, {
|
|
33
33
|
style: {
|
|
34
34
|
"font-size": "16px"
|
|
35
35
|
}
|
|
36
36
|
}) : null;
|
|
37
|
-
}),
|
|
37
|
+
}), m = async (e) => {
|
|
38
38
|
if (!t.disabled) {
|
|
39
|
-
const c = await U(
|
|
40
|
-
await c.downloadFile(M(t.needName,
|
|
39
|
+
const c = await U(y.value, k(C)), r = _(u(e)) ? u(e) : [u(e)];
|
|
40
|
+
await c.downloadFile(M(t.needName, r));
|
|
41
41
|
}
|
|
42
|
-
}, x = (e) => e && e.length > 0 ?
|
|
42
|
+
}, x = (e) => e && e.length > 0 ? a("ul", {
|
|
43
43
|
class: [l("file-list")],
|
|
44
|
-
style:
|
|
45
|
-
}, [e.map((c,
|
|
46
|
-
key:
|
|
44
|
+
style: h.value
|
|
45
|
+
}, [e.map((c, r) => a("li", {
|
|
46
|
+
key: r,
|
|
47
47
|
class: [l("file-item")],
|
|
48
|
-
onClick: () =>
|
|
49
|
-
}, [c.fileName])),
|
|
48
|
+
onClick: () => m(c)
|
|
49
|
+
}, [c.fileName])), a("li", {
|
|
50
50
|
class: [l("down-load-all")],
|
|
51
|
-
onClick: () =>
|
|
51
|
+
onClick: () => m(t.attachmentList)
|
|
52
52
|
}, [i("ap.apAttachment.downloadall")])]) : null;
|
|
53
|
-
return () =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
53
|
+
return () => {
|
|
54
|
+
var e;
|
|
55
|
+
return ((e = t.attachmentList) == null ? void 0 : e.length) > 0 && a("div", {
|
|
56
|
+
class: [p()],
|
|
57
|
+
style: [N.value, h.value]
|
|
58
|
+
}, [a(V, {
|
|
59
|
+
title: L.value,
|
|
60
|
+
placement: t.textToolTipPlacement,
|
|
61
|
+
color: t.toolTipBgColor
|
|
62
|
+
}, {
|
|
63
|
+
default: () => [a("div", {
|
|
64
|
+
class: [l("content")],
|
|
65
|
+
onClick: () => m(n.value ? t.attachmentList[0] : t.attachmentList)
|
|
66
|
+
}, [s.default ? a("div", {
|
|
67
|
+
class: [l("text-render")]
|
|
68
|
+
}, [F.value, S(" ")]) : null, a("div", {
|
|
69
|
+
class: [l("text-inner")]
|
|
70
|
+
}, [d.value])])]
|
|
71
|
+
}), a(b, {
|
|
72
|
+
content: x(t.attachmentList),
|
|
73
|
+
placement: t.fileMorePopoverPlacement,
|
|
74
|
+
color: "#fff"
|
|
75
|
+
}, {
|
|
76
|
+
default: () => [!n.value && a("div", {
|
|
77
|
+
class: [l("more")]
|
|
78
|
+
}, [i("ap.apAttachment.more")])]
|
|
79
|
+
})]);
|
|
80
|
+
};
|
|
78
81
|
}
|
|
79
82
|
});
|
|
80
83
|
export {
|
|
@@ -38,11 +38,11 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
|
|
|
38
38
|
dataSource: any;
|
|
39
39
|
rowSelection?: {
|
|
40
40
|
select: (item: any) => void;
|
|
41
|
+
selectAll: () => void;
|
|
42
|
+
unSelectAll: () => void;
|
|
41
43
|
selectedRows: any[];
|
|
42
44
|
unSelect: (item: any) => void;
|
|
43
45
|
isSelected: (item: any) => boolean;
|
|
44
|
-
selectAll: () => void;
|
|
45
|
-
unSelectAll: () => void;
|
|
46
46
|
clearAll: () => void;
|
|
47
47
|
toggleSelect: (item: any) => void;
|
|
48
48
|
} | undefined;
|
|
@@ -2748,7 +2748,7 @@ export declare const ApAttachment: DefineComponent<{
|
|
|
2748
2748
|
toolTipBgColor: {
|
|
2749
2749
|
type: StringConstructor;
|
|
2750
2750
|
};
|
|
2751
|
-
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2751
|
+
}, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
2752
2752
|
attachmentList: {
|
|
2753
2753
|
type: PropType<Array< AttachmentItemProps>>;
|
|
2754
2754
|
default: never[];
|
|
@@ -85,6 +85,20 @@ const e = {
|
|
|
85
85
|
totalLeftSuffix: "items",
|
|
86
86
|
totalRightPrefix: "Page",
|
|
87
87
|
totalRightSuffix: ""
|
|
88
|
+
},
|
|
89
|
+
setting: {
|
|
90
|
+
title: "Custom Table",
|
|
91
|
+
selectAll: "Select All",
|
|
92
|
+
unSelectAll: "Deselect All",
|
|
93
|
+
selectAllTip: "Please select the columns to display in the table.",
|
|
94
|
+
sizeSmall: "Small",
|
|
95
|
+
sizeNormal: "Normal",
|
|
96
|
+
selectCount: "Selected fields ({count})",
|
|
97
|
+
reset: "Reset",
|
|
98
|
+
fixToLeft: "Fixed on the left",
|
|
99
|
+
fixToRight: "Fixed on the right",
|
|
100
|
+
unFixed: "Not fixed",
|
|
101
|
+
delete: "Delete"
|
|
88
102
|
}
|
|
89
103
|
},
|
|
90
104
|
apUpload: {
|
|
@@ -85,6 +85,20 @@ const e = {
|
|
|
85
85
|
totalLeftSuffix: "条记录",
|
|
86
86
|
totalRightPrefix: "第",
|
|
87
87
|
totalRightSuffix: "页"
|
|
88
|
+
},
|
|
89
|
+
setting: {
|
|
90
|
+
title: "自定义表格",
|
|
91
|
+
selectAll: "全选",
|
|
92
|
+
unSelectAll: "取消全选",
|
|
93
|
+
selectAllTip: "请选择需要展示在表格的字段",
|
|
94
|
+
sizeSmall: "紧凑",
|
|
95
|
+
sizeNormal: "正常",
|
|
96
|
+
selectCount: "已选字段({count})",
|
|
97
|
+
reset: "重置",
|
|
98
|
+
fixToLeft: "固定在左侧",
|
|
99
|
+
fixToRight: "固定在右侧",
|
|
100
|
+
unFixed: "不固定",
|
|
101
|
+
delete: "删除"
|
|
88
102
|
}
|
|
89
103
|
},
|
|
90
104
|
apUpload: {
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
}
|
|
10
|
-
.aplus-ap-table-adaptive .ant-table-wrapper
|
|
10
|
+
.aplus-ap-table-adaptive .ant-table-wrapper {
|
|
11
|
+
flex: 1;
|
|
12
|
+
}
|
|
11
13
|
.aplus-ap-table-adaptive .ant-spin-nested-loading,
|
|
12
14
|
.aplus-ap-table-adaptive .ant-spin-container {
|
|
13
15
|
height: 100%;
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
.aplus-ap-table__table-wrapper {
|
|
36
38
|
flex: 1;
|
|
37
39
|
max-height: 100%;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
38
42
|
}
|
|
39
43
|
.aplus-ap-table__table-wrapper-card {
|
|
40
44
|
padding: 16px;
|
|
@@ -98,3 +102,27 @@
|
|
|
98
102
|
.aplus-ap-table-pagination-total-wrapper {
|
|
99
103
|
color: var(--ap-table-pagination-total-color, #526A90);
|
|
100
104
|
}
|
|
105
|
+
.aplus-ap-table-header {
|
|
106
|
+
padding-bottom: 16px;
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
align-items: center;
|
|
110
|
+
flex-wrap: nowrap;
|
|
111
|
+
}
|
|
112
|
+
.aplus-ap-table-header__title {
|
|
113
|
+
flex: 1;
|
|
114
|
+
flex-shrink: 1;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
}
|
|
117
|
+
.aplus-ap-table-table-header__title {
|
|
118
|
+
display: -webkit-inline-box;
|
|
119
|
+
-webkit-line-clamp: 2;
|
|
120
|
+
-webkit-box-orient: vertical;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: normal;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
vertical-align: middle;
|
|
126
|
+
word-break: break-all;
|
|
127
|
+
flex: 1;
|
|
128
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.aplus-ap-column-setting-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
flex-wrap: nowrap;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
.aplus-ap-column-setting-left {
|
|
8
|
+
flex: 1;
|
|
9
|
+
flex-shrink: 1;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
padding-inline: 20px;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-column-setting-left__header {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
flex-wrap: nowrap;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
align-items: center;
|
|
21
|
+
padding: 12px;
|
|
22
|
+
}
|
|
23
|
+
.aplus-ap-column-setting-left__content {
|
|
24
|
+
flex: 1;
|
|
25
|
+
padding-inline: 12px;
|
|
26
|
+
padding-block: 16px;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
}
|
|
29
|
+
.aplus-ap-column-setting-left__content .ant-checkbox-wrapper {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
}
|
|
32
|
+
.aplus-ap-column-setting-left__content .ant-checkbox-wrapper > span:last-child {
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
}
|
|
37
|
+
.aplus-ap-column-setting-right {
|
|
38
|
+
width: 240px;
|
|
39
|
+
}
|