@aplus-frontend/ui 0.1.41 → 0.1.43
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-table/utils.mjs +69 -69
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +41 -39
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +42 -43
- package/es/src/business/ap-batch-action-group/interface.d.ts +4 -1
- package/es/src/business/index.d.ts +13 -5
- package/es/src/check-card/group.vue.mjs +23 -22
- package/es/src/editable-table/utils.mjs +51 -51
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/interface.d.ts +4 -1
- package/lib/src/business/index.d.ts +13 -5
- package/lib/src/check-card/group.vue.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as b, createVNode as s, mergeProps as a, cloneVNode as y, Fragment as g } from "vue";
|
|
2
|
+
import { isObject as f, isArray as p, isUndefined as h, isFunction as d, omit as j, isBoolean as F, isString as O } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as E, apTableFormItemMap as x } from "./constants.mjs";
|
|
4
|
+
import { isType as N } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
6
|
+
import { Tooltip as S } from "ant-design-vue";
|
|
7
|
+
import { QuestionCircleOutlined as I } from "@ant-design/icons-vue";
|
|
8
|
+
import v from "../ap-form/ap-form-item.vue.mjs";
|
|
9
|
+
function P(t) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !b(t);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const V = (t, e, n) => {
|
|
13
13
|
let r = {};
|
|
14
|
-
return
|
|
15
|
-
|
|
14
|
+
return f(t) ? Object.keys(t).forEach((o) => {
|
|
15
|
+
f(t[o]) ? r[o] = V(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
16
16
|
}) : r = n(t, e), r;
|
|
17
|
-
},
|
|
17
|
+
}, Q = (t, e) => {
|
|
18
18
|
switch (t) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return e.valueOf();
|
|
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
|
|
|
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":
|
|
@@ -35,15 +35,15 @@ const v = (t, e, n) => {
|
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function U(t) {
|
|
39
|
+
return p(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function w(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 =
|
|
45
|
+
const A = (t) => w(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
|
|
46
|
+
const e = [], n = A(t);
|
|
47
47
|
return n.forEach((r, o) => {
|
|
48
48
|
const i = n.get(o) || n.get(`${o}`);
|
|
49
49
|
if (i) {
|
|
@@ -63,7 +63,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}), e;
|
|
66
|
-
},
|
|
66
|
+
}, z = (t) => h(t) || t < 0 ? 0 : t, G = (t, e, n) => {
|
|
67
67
|
if (n)
|
|
68
68
|
return n;
|
|
69
69
|
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
@@ -74,74 +74,74 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
74
74
|
if (o.includes(e))
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return !t || !
|
|
77
|
+
function C(t, e) {
|
|
78
|
+
return !t || !d(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function K(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
82
82
|
return t.valueEnum && (e = "status"), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var
|
|
86
|
-
const o =
|
|
84
|
+
function X(t, e, n, r) {
|
|
85
|
+
var u;
|
|
86
|
+
const o = E[t];
|
|
87
87
|
if (o)
|
|
88
|
-
return
|
|
88
|
+
return s(o, a(e, {
|
|
89
89
|
mode: "read"
|
|
90
90
|
}), null);
|
|
91
91
|
const i = r == null ? void 0 : r[t];
|
|
92
|
-
return ((
|
|
92
|
+
return ((u = i == null ? void 0 : i.render) == null ? void 0 : u.call(i, e.value, n, e)) || e.value;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Y(t, e) {
|
|
95
95
|
if (t.customRenderFormItem)
|
|
96
96
|
return () => {
|
|
97
97
|
const o = t.customRenderFormItem(t);
|
|
98
|
-
return
|
|
98
|
+
return y(o, {
|
|
99
99
|
...t.fieldProps,
|
|
100
100
|
span: t.span,
|
|
101
101
|
...o.props || {}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
const n =
|
|
104
|
+
const n = x[t.valueType];
|
|
105
105
|
if (n)
|
|
106
106
|
return n;
|
|
107
107
|
const r = e == null ? void 0 : e[t.valueType];
|
|
108
108
|
return () => {
|
|
109
109
|
var i;
|
|
110
110
|
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
-
return o ?
|
|
111
|
+
return o ? s(v, a(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
|
-
}),
|
|
113
|
+
}), P(o) ? o : {
|
|
114
114
|
default: () => [o]
|
|
115
115
|
}) : null;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const n =
|
|
118
|
+
function Z(t, e) {
|
|
119
|
+
const n = C(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", u = o ? {
|
|
120
120
|
checked: e.value
|
|
121
121
|
} : {
|
|
122
122
|
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
124
|
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
-
...
|
|
126
|
-
...
|
|
125
|
+
...j(r, ["request"]),
|
|
126
|
+
...u
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function k(t) {
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return F(t.filters) && t.filters && t.valueEnum && (e.filters = m(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function H(t, e) {
|
|
136
136
|
var r;
|
|
137
137
|
const n = e || {};
|
|
138
138
|
return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
|
|
139
139
|
...n.field,
|
|
140
|
-
options:
|
|
140
|
+
options: m(t.valueEnum)
|
|
141
141
|
}), n;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (!
|
|
143
|
+
function M(t) {
|
|
144
|
+
if (!N("Object")(t))
|
|
145
145
|
return t;
|
|
146
146
|
try {
|
|
147
147
|
return JSON.stringify(t);
|
|
@@ -149,51 +149,51 @@ function Z(t) {
|
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function tt(t, e, n, r) {
|
|
153
153
|
const o = n == null ? void 0 : n({
|
|
154
154
|
title: t.title,
|
|
155
155
|
column: t
|
|
156
|
-
});
|
|
157
|
-
if (o &&
|
|
156
|
+
}), i = (o == null ? void 0 : o.filter((T) => T.type !== Symbol.for("v-cmt"))) || [];
|
|
157
|
+
if (o && i.length > 0)
|
|
158
158
|
return o;
|
|
159
|
-
const
|
|
159
|
+
const l = O(t.title) ? s("span", {
|
|
160
160
|
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title,
|
|
163
|
-
return
|
|
162
|
+
}, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : s(g, null, [t.tooltip]) : null;
|
|
163
|
+
return c ? s("span", {
|
|
164
164
|
style: {
|
|
165
165
|
display: "inline-flex",
|
|
166
166
|
alignItems: "center",
|
|
167
167
|
maxWidth: "100%"
|
|
168
168
|
}
|
|
169
|
-
}, [
|
|
170
|
-
title:
|
|
169
|
+
}, [l, s(S, {
|
|
170
|
+
title: c,
|
|
171
171
|
placement: "bottom"
|
|
172
172
|
}, {
|
|
173
|
-
default: () => [
|
|
173
|
+
default: () => [s(I, {
|
|
174
174
|
style: {
|
|
175
175
|
padding: "4px",
|
|
176
176
|
color: r,
|
|
177
177
|
verticalAlign: "middle"
|
|
178
178
|
}
|
|
179
179
|
}, null)]
|
|
180
|
-
})]) :
|
|
180
|
+
})]) : l;
|
|
181
181
|
}
|
|
182
182
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
183
|
+
k as apColumnToColumn,
|
|
184
|
+
U as dataIndexToStr,
|
|
185
|
+
V as formatParamsValueType,
|
|
186
|
+
z as getColumnOrder,
|
|
187
|
+
C as getFieldProps,
|
|
188
|
+
G as getPlaceholder,
|
|
189
|
+
Y as getSearchFormItemRenderNode,
|
|
190
|
+
X as getTableCellRenderNode,
|
|
191
|
+
Z as getTableRenderProps,
|
|
192
|
+
K as getTableRenderType,
|
|
193
|
+
tt as getTableTitle,
|
|
194
|
+
A as objectToMap,
|
|
195
|
+
M as objectToString,
|
|
196
|
+
Q as parseFieldValue,
|
|
197
|
+
H as updateFormProps,
|
|
198
|
+
m as valueEnumToArray
|
|
199
199
|
};
|
|
@@ -15,44 +15,46 @@ const ge = ["accept"], he = {
|
|
|
15
15
|
}, _e = ["src"], ke = { class: "state-un-title" }, ye = { class: "state-un-subtitle" }, De = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "state-ing"
|
|
18
|
-
}, Ce = { class: "left" }, we = ["src"], Fe = { class: "center" }, Ue = { class: "center-progress" },
|
|
18
|
+
}, Ce = { class: "left" }, we = ["src"], Fe = { class: "center" }, Ue = { class: "center-progress" }, Re = /* @__PURE__ */ V({
|
|
19
19
|
__name: "SingleFile",
|
|
20
20
|
setup(Ne) {
|
|
21
|
-
const { t: r } = fe(), { b: k } = me("ap-upload-single-file"), { put: M, client: B } = ie(), y = s("theme"), j = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, G = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"),
|
|
21
|
+
const { t: r } = fe(), { b: k } = me("ap-upload-single-file"), { put: M, client: B } = ie(), y = s("theme"), j = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, G = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), l = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), O = s("customRequest"), W = s("getOssAccess"), n = h(null);
|
|
22
22
|
ee(
|
|
23
|
-
() =>
|
|
23
|
+
() => l == null ? void 0 : l.value,
|
|
24
24
|
function(e) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
if (n.value === null && e) {
|
|
27
|
+
const t = re(F, e);
|
|
28
|
+
o.value = 3, n.value = new File(
|
|
29
|
+
[e],
|
|
30
|
+
t,
|
|
31
|
+
{}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
33
35
|
},
|
|
34
36
|
{ immediate: !0 }
|
|
35
37
|
);
|
|
36
|
-
const
|
|
38
|
+
const o = h(1), f = h(0), m = h(null), P = te(() => n.value && (l == null ? void 0 : l.value));
|
|
37
39
|
function H() {
|
|
38
40
|
var e;
|
|
39
|
-
|
|
41
|
+
o.value === 1 && ((e = m.value) == null || e.click());
|
|
40
42
|
}
|
|
41
|
-
function
|
|
43
|
+
function T(e) {
|
|
42
44
|
e.preventDefault(), e.stopPropagation();
|
|
43
45
|
}
|
|
44
46
|
function J(e) {
|
|
45
47
|
e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
|
|
46
48
|
}
|
|
47
49
|
function K(e) {
|
|
48
|
-
|
|
50
|
+
L(e);
|
|
49
51
|
}
|
|
50
52
|
function Q(e) {
|
|
51
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
53
|
+
if (e.preventDefault(), e.stopPropagation(), o.value !== 1)
|
|
52
54
|
return;
|
|
53
|
-
var t = e.dataTransfer, c = [],
|
|
55
|
+
var t = e.dataTransfer, c = [], R = 0, I = t.files.length;
|
|
54
56
|
function v() {
|
|
55
|
-
|
|
57
|
+
R === I - 1 && K(c), R++;
|
|
56
58
|
}
|
|
57
59
|
if (t.items !== void 0)
|
|
58
60
|
for (var U = 0; U < t.items.length; U++) {
|
|
@@ -90,9 +92,9 @@ const ge = ["accept"], he = {
|
|
|
90
92
|
}
|
|
91
93
|
function X(e) {
|
|
92
94
|
const t = e.target;
|
|
93
|
-
|
|
95
|
+
L(t == null ? void 0 : t.files), m.value && (m.value.value = "");
|
|
94
96
|
}
|
|
95
|
-
async function
|
|
97
|
+
async function L(e) {
|
|
96
98
|
if (e != null && e.length) {
|
|
97
99
|
if (typeof b == "function") {
|
|
98
100
|
if (b(e[0]) === !1)
|
|
@@ -111,20 +113,20 @@ const ge = ["accept"], he = {
|
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
115
|
}
|
|
114
|
-
if (
|
|
116
|
+
if (n.value = e[0], o.value = 2, f.value = 0, p.value++, typeof O == "function") {
|
|
115
117
|
O({
|
|
116
118
|
onProgress: (t) => {
|
|
117
119
|
f.value = t;
|
|
118
120
|
},
|
|
119
121
|
onError: (t) => {
|
|
120
|
-
u.warning(t || r("ap.apUpload.networkAnomaly")),
|
|
122
|
+
u.warning(t || r("ap.apUpload.networkAnomaly")), o.value = 1, n.value = null, p.value--;
|
|
121
123
|
},
|
|
122
124
|
onSuccess: (t) => {
|
|
123
|
-
|
|
125
|
+
l.value = $(
|
|
124
126
|
F,
|
|
125
127
|
t,
|
|
126
|
-
|
|
127
|
-
),
|
|
128
|
+
n.value.name
|
|
129
|
+
), o.value = 3, p.value--;
|
|
128
130
|
},
|
|
129
131
|
file: e[0]
|
|
130
132
|
});
|
|
@@ -132,18 +134,18 @@ const ge = ["accept"], he = {
|
|
|
132
134
|
}
|
|
133
135
|
try {
|
|
134
136
|
await ce(W), M({
|
|
135
|
-
file:
|
|
137
|
+
file: n.value,
|
|
136
138
|
dirName: j,
|
|
137
139
|
oss: B,
|
|
138
140
|
successCallBack(t) {
|
|
139
|
-
|
|
141
|
+
l.value = $(
|
|
140
142
|
F,
|
|
141
143
|
t,
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
+
n.value.name
|
|
145
|
+
), o.value = 3, p.value--;
|
|
144
146
|
},
|
|
145
147
|
errorCallBack(t) {
|
|
146
|
-
u.warning(t || r("ap.apUpload.networkAnomaly")),
|
|
148
|
+
u.warning(t || r("ap.apUpload.networkAnomaly")), o.value = 1, n.value = null, p.value--;
|
|
147
149
|
},
|
|
148
150
|
progressCallBack(t) {
|
|
149
151
|
f.value = t;
|
|
@@ -152,12 +154,12 @@ const ge = ["accept"], he = {
|
|
|
152
154
|
} catch (t) {
|
|
153
155
|
u.warning(
|
|
154
156
|
typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
|
|
155
|
-
),
|
|
157
|
+
), o.value = 1, n.value = null, p.value--;
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
}
|
|
159
161
|
function Y() {
|
|
160
|
-
|
|
162
|
+
n.value && !(l != null && l.value) && B.pauseUpload(), o.value = 1, n.value = null, l.value = void 0;
|
|
161
163
|
}
|
|
162
164
|
return (e, t) => {
|
|
163
165
|
var c;
|
|
@@ -165,12 +167,12 @@ const ge = ["accept"], he = {
|
|
|
165
167
|
class: ae({
|
|
166
168
|
[a(k)()]: !0,
|
|
167
169
|
[a(k)("admin")]: a(y) === "admin",
|
|
168
|
-
[a(k)("un")]:
|
|
170
|
+
[a(k)("un")]: o.value === 1
|
|
169
171
|
}),
|
|
170
172
|
onClick: H,
|
|
171
|
-
onDragenter:
|
|
173
|
+
onDragenter: T,
|
|
172
174
|
onDragover: J,
|
|
173
|
-
onDragleave:
|
|
175
|
+
onDragleave: T,
|
|
174
176
|
onDrop: Q
|
|
175
177
|
}, [
|
|
176
178
|
i("input", {
|
|
@@ -181,7 +183,7 @@ const ge = ["accept"], he = {
|
|
|
181
183
|
accept: a(D),
|
|
182
184
|
onChange: X
|
|
183
185
|
}, null, 40, ge),
|
|
184
|
-
|
|
186
|
+
o.value === 1 ? (_(), A("div", he, [
|
|
185
187
|
i("img", {
|
|
186
188
|
class: "state-un-icon",
|
|
187
189
|
src: a(q)
|
|
@@ -193,7 +195,7 @@ const ge = ["accept"], he = {
|
|
|
193
195
|
maxSize: a(C)
|
|
194
196
|
})}`), 1)
|
|
195
197
|
])) : z("", !0),
|
|
196
|
-
[2, 3].includes(
|
|
198
|
+
[2, 3].includes(o.value) ? (_(), A("div", De, [
|
|
197
199
|
i("div", Ce, [
|
|
198
200
|
i("img", { src: a(q) }, null, 8, we)
|
|
199
201
|
]),
|
|
@@ -203,7 +205,7 @@ const ge = ["accept"], he = {
|
|
|
203
205
|
style: ne({
|
|
204
206
|
color: P.value ? "#0070FF" : "#182948"
|
|
205
207
|
})
|
|
206
|
-
}, x((c =
|
|
208
|
+
}, x((c = n.value) == null ? void 0 : c.name), 5),
|
|
207
209
|
i("div", Ue, [
|
|
208
210
|
P.value ? z("", !0) : (_(), oe(a(ve), {
|
|
209
211
|
key: 0,
|
|
@@ -227,5 +229,5 @@ const ge = ["accept"], he = {
|
|
|
227
229
|
}
|
|
228
230
|
});
|
|
229
231
|
export {
|
|
230
|
-
|
|
232
|
+
Re as default
|
|
231
233
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as A, computed as n, openBlock as
|
|
2
|
-
import { DropdownButton as
|
|
1
|
+
import { defineComponent as A, computed as n, openBlock as v, createBlock as y, unref as a, mergeProps as m, withCtx as r, createVNode as c, createElementVNode as C, normalizeStyle as D, toDisplayString as h, normalizeClass as N, normalizeProps as R, guardReactiveProps as T, createTextVNode as x, createCommentVNode as V } from "vue";
|
|
2
|
+
import { DropdownButton as z, Dropdown as G } from "ant-design-vue";
|
|
3
|
+
import "../../ap-button/index.mjs";
|
|
3
4
|
import "./MenuItemGroup.vue.mjs";
|
|
4
5
|
import "../../config-provider/index.mjs";
|
|
5
6
|
import { DownOutlined as M } from "@ant-design/icons-vue";
|
|
6
7
|
import { usePermission as S } from "@aplus-frontend/hooks";
|
|
7
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as $ } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
9
|
import { useLocale as F } from "../../config-provider/hooks/use-locale.mjs";
|
|
9
10
|
import { useGlobalConfig as O } from "../../config-provider/hooks/use-global-config.mjs";
|
|
10
|
-
import
|
|
11
|
-
|
|
11
|
+
import w from "./MenuItemGroup.vue2.mjs";
|
|
12
|
+
import E from "../../ap-button/ap-button.vue.mjs";
|
|
13
|
+
const ee = /* @__PURE__ */ A({
|
|
12
14
|
__name: "ApBatchActionGroup",
|
|
13
15
|
props: {
|
|
14
16
|
selectedRows: {},
|
|
@@ -16,95 +18,92 @@ const W = /* @__PURE__ */ A({
|
|
|
16
18
|
menuList: {}
|
|
17
19
|
},
|
|
18
20
|
setup(P) {
|
|
19
|
-
const { b: i } =
|
|
21
|
+
const { b: i } = $("ap-batch-action-group"), { t: _ } = F(), e = P, L = O("uiMode"), { hasPermission: g } = S(), p = n(
|
|
20
22
|
() => {
|
|
21
23
|
var t;
|
|
22
24
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.dropdownType) || "default";
|
|
23
25
|
}
|
|
24
|
-
),
|
|
26
|
+
), u = n(
|
|
25
27
|
() => {
|
|
26
28
|
var t;
|
|
27
29
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.type) || "borderLink";
|
|
28
30
|
}
|
|
29
|
-
),
|
|
31
|
+
), f = n(
|
|
30
32
|
() => {
|
|
31
33
|
var t;
|
|
32
34
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || _("ap.apApBatchActionGroup.batchOperation");
|
|
33
35
|
}
|
|
34
|
-
), k = n(() => (e == null ? void 0 : e.selectedRows) || []),
|
|
36
|
+
), k = n(() => (e == null ? void 0 : e.selectedRows) || []), d = n(
|
|
35
37
|
() => {
|
|
36
38
|
var t;
|
|
37
39
|
return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? k.value.length === 0 : !1);
|
|
38
40
|
}
|
|
39
|
-
),
|
|
41
|
+
), B = n(() => {
|
|
40
42
|
const t = {
|
|
41
43
|
aplus: "#0070FF",
|
|
42
44
|
admin: "#34b77c"
|
|
43
45
|
};
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
46
|
+
return u.value === "borderLink" ? d.value ? void 0 : t[L.value] || t.aplus : void 0;
|
|
47
|
+
}), l = n(() => {
|
|
46
48
|
var t;
|
|
47
49
|
return ((t = e == null ? void 0 : e.menuList) == null ? void 0 : t.filter((o) => {
|
|
48
|
-
let
|
|
49
|
-
return !(o != null && o.ifShow) && (o != null && o.auth) && (
|
|
50
|
+
let s = o == null ? void 0 : o.ifShow;
|
|
51
|
+
return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => g(o.auth)), (s == null ? void 0 : s()) ?? !0;
|
|
50
52
|
})) || [];
|
|
51
53
|
});
|
|
52
|
-
function
|
|
54
|
+
function b() {
|
|
53
55
|
return e != null && e.buttonProps ? {
|
|
54
56
|
...e.buttonProps,
|
|
55
|
-
type:
|
|
57
|
+
type: u.value === "borderLink" ? "default" : u.value
|
|
56
58
|
} : {};
|
|
57
59
|
}
|
|
58
|
-
return (t, o) =>
|
|
60
|
+
return (t, o) => l.value.length && p.value === "dropdown" ? (v(), y(a(z), m({
|
|
59
61
|
key: 0,
|
|
60
62
|
class: [a(i)()]
|
|
61
63
|
}, {
|
|
62
|
-
...
|
|
63
|
-
disabled:
|
|
64
|
+
...b(),
|
|
65
|
+
disabled: d.value
|
|
64
66
|
}), {
|
|
65
|
-
overlay:
|
|
66
|
-
c(
|
|
67
|
+
overlay: r(() => [
|
|
68
|
+
c(w, m({
|
|
67
69
|
...e
|
|
68
|
-
}, { menuList:
|
|
70
|
+
}, { menuList: l.value }), null, 16, ["menuList"])
|
|
69
71
|
]),
|
|
70
|
-
default:
|
|
72
|
+
default: r(() => [
|
|
71
73
|
C("span", {
|
|
72
74
|
style: D({
|
|
73
|
-
color:
|
|
75
|
+
color: B.value
|
|
74
76
|
})
|
|
75
|
-
},
|
|
77
|
+
}, h(f.value), 5)
|
|
76
78
|
]),
|
|
77
79
|
_: 1
|
|
78
|
-
}, 16, ["class"])) :
|
|
80
|
+
}, 16, ["class"])) : l.value.length && p.value === "default" ? (v(), y(a(G), {
|
|
79
81
|
key: 1,
|
|
80
82
|
class: N([a(i)()]),
|
|
81
|
-
disabled:
|
|
83
|
+
disabled: d.value
|
|
82
84
|
}, {
|
|
83
|
-
overlay:
|
|
84
|
-
c(
|
|
85
|
+
overlay: r(() => [
|
|
86
|
+
c(w, m({
|
|
85
87
|
...e
|
|
86
|
-
}, { menuList:
|
|
88
|
+
}, { menuList: l.value }), null, 16, ["menuList"])
|
|
87
89
|
]),
|
|
88
|
-
default:
|
|
89
|
-
c(a(
|
|
90
|
+
default: r(() => [
|
|
91
|
+
c(a(E), R(T({
|
|
90
92
|
...t.$attrs,
|
|
91
|
-
...
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}), {
|
|
97
|
-
default: u(() => [
|
|
98
|
-
T(w(p.value) + " ", 1),
|
|
93
|
+
...b(),
|
|
94
|
+
type: u.value
|
|
95
|
+
})), {
|
|
96
|
+
default: r(() => [
|
|
97
|
+
x(h(f.value) + " ", 1),
|
|
99
98
|
c(a(M))
|
|
100
99
|
]),
|
|
101
100
|
_: 1
|
|
102
|
-
}, 16
|
|
101
|
+
}, 16)
|
|
103
102
|
]),
|
|
104
103
|
_: 1
|
|
105
|
-
}, 8, ["class", "disabled"])) :
|
|
104
|
+
}, 8, ["class", "disabled"])) : V("", !0);
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
export {
|
|
109
|
-
|
|
108
|
+
ee as default
|
|
110
109
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, MenuItemProps } from 'ant-design-vue';
|
|
2
|
+
import { ApButtonProps } from '../../ap-button/interface';
|
|
2
3
|
import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
|
|
3
4
|
import { VNodeChild } from 'vue';
|
|
4
5
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
@@ -7,7 +8,9 @@ type MixinButton<T> = Omit<T, 'type'> & {
|
|
|
7
8
|
content?: string;
|
|
8
9
|
};
|
|
9
10
|
interface ApBatchActionGroupTypeProps {
|
|
10
|
-
default:
|
|
11
|
+
default: ApButtonProps & {
|
|
12
|
+
content?: string;
|
|
13
|
+
};
|
|
11
14
|
dropdown: MixinButton<DropdownButtonProps>;
|
|
12
15
|
}
|
|
13
16
|
export type ApBatchActionGroupPropsKeys = keyof ApBatchActionGroupTypeProps;
|
|
@@ -9,8 +9,8 @@ import { ApInputRadioOptions } from './ap-input-radio';
|
|
|
9
9
|
import { KeyboardEventHandler, MouseEventHandler, FocusEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
10
10
|
import { ButtonType, ButtonShape, ButtonSize } from 'ant-design-vue/es/button';
|
|
11
11
|
import { ButtonHTMLType } from 'ant-design-vue/es/button/buttonTypes';
|
|
12
|
+
import { ButtonProps, ItemType, MenuTheme, MenuMode } from 'ant-design-vue';
|
|
12
13
|
import { DropdownArrowOptions, Trigger, Align } from 'ant-design-vue/es/dropdown/props';
|
|
13
|
-
import { ItemType, MenuTheme, MenuMode, ButtonProps } from 'ant-design-vue';
|
|
14
14
|
import { CSSMotionProps } from 'ant-design-vue/es/_util/transition';
|
|
15
15
|
import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from 'ant-design-vue/es/menu/src/interface';
|
|
16
16
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
@@ -1274,8 +1274,12 @@ export declare const ApBatchActionGroup: DefineComponent<{
|
|
|
1274
1274
|
onMousedown: {
|
|
1275
1275
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
1276
1276
|
};
|
|
1277
|
-
}>>, "type"> & {
|
|
1278
|
-
type?:
|
|
1277
|
+
}>>, "type" | "onClick"> & {
|
|
1278
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
1279
|
+
borderLinkColor?: string;
|
|
1280
|
+
minWidth?: boolean | number | string;
|
|
1281
|
+
onClick?: () => any | Promise<any>;
|
|
1282
|
+
} & {
|
|
1279
1283
|
content?: string;
|
|
1280
1284
|
}) | ({
|
|
1281
1285
|
dropdownType?: "dropdown" | undefined;
|
|
@@ -1566,8 +1570,12 @@ export declare const ApBatchActionGroup: DefineComponent<{
|
|
|
1566
1570
|
onMousedown: {
|
|
1567
1571
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
1568
1572
|
};
|
|
1569
|
-
}>>, "type"> & {
|
|
1570
|
-
type?:
|
|
1573
|
+
}>>, "type" | "onClick"> & {
|
|
1574
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
1575
|
+
borderLinkColor?: string;
|
|
1576
|
+
minWidth?: boolean | number | string;
|
|
1577
|
+
onClick?: () => any | Promise<any>;
|
|
1578
|
+
} & {
|
|
1571
1579
|
content?: string;
|
|
1572
1580
|
}) | ({
|
|
1573
1581
|
dropdownType?: "dropdown" | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, unref as d, computed as g, renderSlot as b } from "vue";
|
|
2
2
|
import "../hooks/index.mjs";
|
|
3
|
-
import { useProvideCheckCard as
|
|
4
|
-
import { isUndefined as
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { useProvideCheckCard as S } from "./context.mjs";
|
|
4
|
+
import { isUndefined as B } from "lodash-unified";
|
|
5
|
+
import { Form as z } from "ant-design-vue";
|
|
6
|
+
import { useControllableValue as V } from "../hooks/useControllableValue.mjs";
|
|
7
|
+
const A = /* @__PURE__ */ y({
|
|
7
8
|
name: "CheckCardGroup",
|
|
8
9
|
__name: "group",
|
|
9
10
|
props: {
|
|
@@ -20,43 +21,43 @@ const P = /* @__PURE__ */ v({
|
|
|
20
21
|
"onUpdate:value": {}
|
|
21
22
|
},
|
|
22
23
|
emits: ["update:value"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
function
|
|
24
|
+
setup(u, { emit: s }) {
|
|
25
|
+
const { onFieldChange: o } = z.useInjectFormItemContext(), t = u, p = s, { value: r, updateValue: n } = V(t, p), l = /* @__PURE__ */ new Map();
|
|
26
|
+
function f(e) {
|
|
26
27
|
if (!t.multiple) {
|
|
27
|
-
if (r
|
|
28
|
+
if (d(r) === e)
|
|
28
29
|
return;
|
|
29
|
-
|
|
30
|
+
n(e), o == null || o();
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
let
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
let i = [...d(r) || []];
|
|
34
|
+
const v = i.find((a) => a === e);
|
|
35
|
+
B(v) ? i.push(e) : i = i.filter((a) => a !== e).filter((a) => l.has(a)), n(i), o == null || o();
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function m(e) {
|
|
37
38
|
l.set(e, !0);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function c(e) {
|
|
40
41
|
l.delete(e);
|
|
41
42
|
}
|
|
42
|
-
return
|
|
43
|
+
return S(
|
|
43
44
|
g(() => ({
|
|
44
|
-
toggleOption:
|
|
45
|
-
registerValue:
|
|
46
|
-
cancelValue:
|
|
45
|
+
toggleOption: f,
|
|
46
|
+
registerValue: m,
|
|
47
|
+
cancelValue: c,
|
|
47
48
|
disabled: t.disabled,
|
|
48
49
|
size: t.size,
|
|
49
50
|
bordered: t.bordered,
|
|
50
51
|
loading: t.loading,
|
|
51
|
-
value: r
|
|
52
|
+
value: d(r),
|
|
52
53
|
multiple: t.multiple,
|
|
53
54
|
stopPropagation: t.stopPropagation,
|
|
54
55
|
style: t.style,
|
|
55
56
|
indicatorSize: t.indicatorSize
|
|
56
57
|
}))
|
|
57
|
-
), (e,
|
|
58
|
+
), (e, i) => b(e.$slots, "default");
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
A as default
|
|
62
63
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isFunction as m, isArray as g, isBoolean as
|
|
3
|
-
import { apTableFormItemMap as
|
|
1
|
+
import { isVNode as I, createVNode as r, mergeProps as S, createTextVNode as F, Fragment as w } from "vue";
|
|
2
|
+
import { isFunction as m, isArray as g, isBoolean as P, omit as V, isString as q } from "lodash-unified";
|
|
3
|
+
import { apTableFormItemMap as v, noRenderAsFormItemValueList as C, apTableRenderItemMap as N } from "../ap-table/constants.mjs";
|
|
4
4
|
import { isDef as j } from "../utils/index.mjs";
|
|
5
5
|
import { getValueStr as A } from "../ap-field/number/helper.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { Typography as
|
|
6
|
+
import O from "scroll-into-view-if-needed";
|
|
7
|
+
import { Typography as W, Tooltip as _ } from "ant-design-vue";
|
|
8
8
|
import "../ap-form/index.mjs";
|
|
9
|
-
import { objectToString as
|
|
10
|
-
import { QuestionCircleOutlined as
|
|
9
|
+
import { objectToString as D } from "../ap-table/utils.mjs";
|
|
10
|
+
import { QuestionCircleOutlined as E } from "@ant-design/icons-vue";
|
|
11
11
|
import T from "../ap-form/ap-form-item.vue.mjs";
|
|
12
12
|
function b(t) {
|
|
13
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
13
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !I(t);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function R(t) {
|
|
16
|
+
return v[t];
|
|
17
17
|
}
|
|
18
18
|
function k(t) {
|
|
19
19
|
if (!t.fieldProps)
|
|
@@ -28,9 +28,9 @@ function B(t, e) {
|
|
|
28
28
|
const i = t.fieldProps ? m(t.fieldProps) ? t.fieldProps({}) : t.fieldProps : {};
|
|
29
29
|
return A(e, i) || "--";
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return D(e);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function H(t, e) {
|
|
34
34
|
const i = [t];
|
|
35
35
|
if (e) {
|
|
36
36
|
const o = g(e) ? e : [e];
|
|
@@ -38,22 +38,22 @@ function Z(t, e) {
|
|
|
38
38
|
}
|
|
39
39
|
return i.join(" ");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function M(t, e = document.body, i = {}) {
|
|
42
42
|
const o = e.querySelectorAll("tr.ant-table-row")[t];
|
|
43
|
-
o &&
|
|
43
|
+
o && O(o, {
|
|
44
44
|
scrollMode: "if-needed",
|
|
45
45
|
block: "nearest",
|
|
46
46
|
behavior: "smooth",
|
|
47
47
|
...i
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
50
|
+
function L(t, e, i) {
|
|
51
|
+
return C.includes(t.valueType) ? i : t.copyable || t.ellipsis ? r(W.Paragraph, {
|
|
52
52
|
copyable: t.copyable ? {
|
|
53
53
|
text: e,
|
|
54
54
|
tooltip: !1
|
|
55
55
|
} : !1,
|
|
56
|
-
ellipsis: t.ellipsis ?
|
|
56
|
+
ellipsis: t.ellipsis ? P(t.ellipsis) ? {
|
|
57
57
|
tooltip: e
|
|
58
58
|
} : {
|
|
59
59
|
...t.ellipsis,
|
|
@@ -62,73 +62,73 @@ function H(t, e, i) {
|
|
|
62
62
|
content: t.ellipsis ? B(t, e) : i
|
|
63
63
|
}, null) : i;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
var
|
|
65
|
+
function tt(t, e, i, o, d, l) {
|
|
66
|
+
var u, y;
|
|
67
67
|
if (e) {
|
|
68
68
|
if (t.customRenderFormItem) {
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
default: () => [
|
|
69
|
+
const a = t.customRenderFormItem(t, i.field, e, d);
|
|
70
|
+
return r(T, V(i, ["field"]), b(a) ? a : {
|
|
71
|
+
default: () => [a]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
return s
|
|
77
|
-
const n = l == null ? void 0 : l[t.valueType],
|
|
78
|
-
return
|
|
79
|
-
default: () => [
|
|
74
|
+
const s = R(t.valueType);
|
|
75
|
+
if (s)
|
|
76
|
+
return r(s, i, null);
|
|
77
|
+
const n = l == null ? void 0 : l[t.valueType], p = (u = n == null ? void 0 : n.renderFormItem) == null ? void 0 : u.call(n, i.field);
|
|
78
|
+
return p ? r(T, i, b(p) ? p : {
|
|
79
|
+
default: () => [p]
|
|
80
80
|
}) : null;
|
|
81
81
|
}
|
|
82
|
-
let
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
|
|
82
|
+
let f;
|
|
83
|
+
const c = N[t.valueType];
|
|
84
|
+
if (c)
|
|
85
|
+
f = r(c, S(i.field, {
|
|
86
86
|
mode: "read"
|
|
87
87
|
}), null);
|
|
88
88
|
else {
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const s = l == null ? void 0 : l[t.valueType];
|
|
90
|
+
f = (y = s == null ? void 0 : s.render) == null ? void 0 : y.call(s, o, d, i.field);
|
|
91
91
|
}
|
|
92
|
-
return
|
|
92
|
+
return f ? L(t, o, f) : null;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function et(t, e, i, o, d) {
|
|
95
95
|
const l = o == null ? void 0 : o({
|
|
96
96
|
title: t.title,
|
|
97
97
|
column: t
|
|
98
|
-
});
|
|
99
|
-
if (l &&
|
|
98
|
+
}), f = (l == null ? void 0 : l.filter((h) => h.type !== Symbol.for("v-cmt"))) || [];
|
|
99
|
+
if (l && f.length > 0)
|
|
100
100
|
return l;
|
|
101
|
-
const u = k(t),
|
|
101
|
+
const u = k(t), s = q(t.title) ? {
|
|
102
102
|
class: e,
|
|
103
103
|
title: t.title
|
|
104
|
-
} : {},
|
|
104
|
+
} : {}, n = r("div", s, [u ? r("span", {
|
|
105
105
|
class: i
|
|
106
|
-
}, [F("*")]) : null, t.title]),
|
|
107
|
-
return
|
|
106
|
+
}, [F("*")]) : null, t.title]), p = t.tooltip ? m(t.tooltip) ? t.tooltip(t) : r(w, null, [t.tooltip]) : null;
|
|
107
|
+
return p ? r("span", {
|
|
108
108
|
style: {
|
|
109
109
|
display: "inline-flex",
|
|
110
110
|
alignItems: "center",
|
|
111
111
|
maxWidth: "100%"
|
|
112
112
|
}
|
|
113
|
-
}, [
|
|
114
|
-
title:
|
|
113
|
+
}, [n, r(_, {
|
|
114
|
+
title: p,
|
|
115
115
|
placement: "bottom"
|
|
116
116
|
}, {
|
|
117
|
-
default: () => [
|
|
117
|
+
default: () => [r(E, {
|
|
118
118
|
style: {
|
|
119
119
|
padding: "4px",
|
|
120
120
|
color: d,
|
|
121
121
|
verticalAlign: "middle"
|
|
122
122
|
}
|
|
123
123
|
}, null)]
|
|
124
|
-
})]) :
|
|
124
|
+
})]) : n;
|
|
125
125
|
}
|
|
126
126
|
export {
|
|
127
127
|
k as getColumnIsRequired,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
R as getEditableComponent,
|
|
129
|
+
et as getEditableTableTitle,
|
|
130
|
+
tt as getFinalNode,
|
|
131
131
|
B as getRawDisplayValue,
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
H as mergeClass,
|
|
133
|
+
M as scrollToRowIndex
|
|
134
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),i=require("lodash-unified"),f=require("./constants.js"),g=require("@fruits-chain/utils");require("../ap-form/index.js");const y=require("ant-design-vue"),h=require("@ant-design/icons-vue"),j=require("../ap-form/ap-form-item.vue.js");function F(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!u.isVNode(e)}const p=(e,t,n)=>{let o={};return i.isObject(e)?Object.keys(e).forEach(r=>{i.isObject(e[r])?o[r]=p(e[r],t[r],n):o[r]=n(e[r],t)}):o=n(e,t),o},N=(e,t)=>{switch(e){case"dayjs":return t.valueOf();case"dayjsRange":return t.map(n=>n.valueOf());case"dayjsDayRange":{const[n,o]=t;return[n.startOf("day").valueOf(),o.endOf("day").valueOf()]}case"multiple":case"multipleNumber":return i.isArray(t)?t:[t];case"boolean":return t;case"object":return t;default:return t}};function O(e){return i.isArray(e)?e.join("."):e}function S(e){const t=Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();return t==="string"&&typeof e=="object"?"object":e===null?"null":e===void 0?"undefined":t}const m=e=>S(e)==="map"?e:new Map(Object.entries(e||{})),c=e=>{const t=[],n=m(e);return n.forEach((o,r)=>{const s=n.get(r)||n.get(`${r}`);if(s){if(typeof s=="object"&&(s!=null&&s.text)){t.push({text:s==null?void 0:s.text,value:r,label:s==null?void 0:s.text,disabled:s.disabled});return}t.push({text:s,label:s,value:r})}}),t},V=e=>i.isUndefined(e)||e<0?0:e,E=(e,t,n)=>{if(n)return n;const o=["select","date"],r=["text","textArea","number"];if(t==="dateRange")return[e("ap.common.chooseText"),e("ap.common.chooseText")];if(o.includes(t))return e("ap.common.chooseText");if(r.includes(t))return e("ap.common.inputText")};function T(e,t){return!e||!i.isFunction(e)?e:e(t)}function P(e){let t=e.valueType||"text";return e.valueEnum&&(t="status"),t}function v(e,t,n,o){var l;const r=f.apTableRenderItemMap[e];if(r)return u.createVNode(r,u.mergeProps(t,{mode:"read"}),null);const s=o==null?void 0:o[e];return((l=s==null?void 0:s.render)==null?void 0:l.call(s,t.value,n,t))||t.value}function I(e,t){if(e.customRenderFormItem)return()=>{const r=e.customRenderFormItem(e);return u.cloneVNode(r,{...e.fieldProps,span:e.span,...r.props||{}})};const n=f.apTableFormItemMap[e.valueType];if(n)return n;const o=t==null?void 0:t[e.valueType];return()=>{var s;const r=(s=o==null?void 0:o.renderFormItem)==null?void 0:s.call(o,e.fieldProps.field);return r?u.createVNode(j.default,u.mergeProps(e.fieldProps,{span:e.span}),F(r)?r:{default:()=>[r]}):null}}function x(e,t){const n=T(e.fieldProps,t),o=(n==null?void 0:n.field)||n||{},r=e.valueType==="switch",s=e.valueType==="index",l=r?{checked:t.value}:{value:s?t.index+1:t.value};return e.valueEnum&&(o.valueEnum=e.valueEnum),{...i.omit(o,["request"]),...l}}function q(e){const t={...e};return i.isBoolean(e.filters)&&e.filters&&e.valueEnum&&(t.filters=c(e.valueEnum)),t}function C(e,t){var o;const n=t||{};return e.valueEnum&&!((o=n.field)!=null&&o.options)&&(n.field={...n.field,options:c(e.valueEnum)}),n}function _(e){if(!g.isType("Object")(e))return e;try{return JSON.stringify(e)}catch{return e}}function A(e,t,n,o){const r=n==null?void 0:n({title:e.title,column:e}),s=(r==null?void 0:r.filter(b=>b.type!==Symbol.for("v-cmt")))||[];if(r&&s.length>0)return r;const a=i.isString(e.title)?u.createVNode("span",{class:t,title:e.title},[e.title]):e.title,d=e.tooltip?i.isFunction(e.tooltip)?e.tooltip(e):u.createVNode(u.Fragment,null,[e.tooltip]):null;return d?u.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[a,u.createVNode(y.Tooltip,{title:d,placement:"bottom"},{default:()=>[u.createVNode(h.QuestionCircleOutlined,{style:{padding:"4px",color:o,verticalAlign:"middle"}},null)]})]):a}exports.apColumnToColumn=q;exports.dataIndexToStr=O;exports.formatParamsValueType=p;exports.getColumnOrder=V;exports.getFieldProps=T;exports.getPlaceholder=E;exports.getSearchFormItemRenderNode=I;exports.getTableCellRenderNode=v;exports.getTableRenderProps=x;exports.getTableRenderType=P;exports.getTableTitle=A;exports.objectToMap=m;exports.objectToString=_;exports.parseFieldValue=N;exports.updateFormProps=C;exports.valueEnumToArray=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const w=require("../utils/returnData.js"),z=require("../hooks/useOss.js"),x=require("../utils/accept.js"),s=require("ant-design-vue"),J=require("@ant-design/icons-vue"),O=require("../assets/single-file-icon.png.js");require("../styles/single-file.css");const K=require("../../config-provider/hooks/use-locale.js"),Q=require("../../config-provider/hooks/use-namespace.js"),X=["accept"],Y={key:0,class:"state-un"},Z=["src"],ee={class:"state-un-title"},te={class:"state-un-subtitle"},ne={key:1,class:"state-ing"},ae={class:"left"},oe=["src"],
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../config-provider/index.js");const w=require("../utils/returnData.js"),z=require("../hooks/useOss.js"),x=require("../utils/accept.js"),s=require("ant-design-vue"),J=require("@ant-design/icons-vue"),O=require("../assets/single-file-icon.png.js");require("../styles/single-file.css");const K=require("../../config-provider/hooks/use-locale.js"),Q=require("../../config-provider/hooks/use-namespace.js"),X=["accept"],Y={key:0,class:"state-un"},Z=["src"],ee={class:"state-un-title"},te={class:"state-un-subtitle"},ne={key:1,class:"state-ing"},ae={class:"left"},oe=["src"],re={class:"center"},le={class:"center-progress"},se=e.defineComponent({__name:"SingleFile",setup(ce){const{t:l}=K.useLocale(),{b:m}=Q.useNamespace("ap-upload-single-file"),{put:V,client:F}=z.useOss(),g=e.inject("theme"),P=e.inject("dirName"),h=e.inject("accept")||"*",_=e.inject("maxSize")??500,T=e.inject("title")||l("ap.apUpload.clickOrDragUpload"),k=e.inject("subTitle"),r=e.inject("value"),D=e.inject("needName"),u=e.inject("uploadingCount"),S=e.inject("beforeUpload"),U=e.inject("customRequest"),L=e.inject("getOssAccess"),a=e.ref(null);e.watch(()=>r==null?void 0:r.value,function(t){setTimeout(()=>{if(a.value===null&&t){const n=w.getName(D,t);o.value=3,a.value=new File([t],n,{})}})},{immediate:!0});const o=e.ref(1),d=e.ref(0),f=e.ref(null),j=e.computed(()=>a.value&&(r==null?void 0:r.value));function R(){var t;o.value===1&&((t=f.value)==null||t.click())}function q(t){t.preventDefault(),t.stopPropagation()}function I(t){t.dataTransfer.dropEffect="copy",t.preventDefault(),t.stopPropagation()}function M(t){B(t)}function $(t){if(t.preventDefault(),t.stopPropagation(),o.value!==1)return;var n=t.dataTransfer,c=[],A=0,b=n.files.length;function i(){A===b-1&&M(c),A++}if(n.items!==void 0)for(var y=0;y<n.items.length;y++){var N=n.items[y];if(N.kind==="file"&&N.webkitGetAsEntry().isFile){var H=N.getAsFile();c.push(H),i()}}else for(let E=0;E<b;E++){var v=n.files[E];if(v.type)c.push(v),i();else try{var C=new FileReader;C.readAsDataURL(v.slice(0,3)),C.addEventListener("load",function(p){console.warn(p,"load"),c.push(v),i()},!1),C.addEventListener("error",function(p){console.warn(p,"error"),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()},!1)}catch(p){console.warn(p),s.message.warning(l("ap.apUpload.foldersNotSupported")),i()}}}function G(t){const n=t.target;B(n==null?void 0:n.files),f.value&&(f.value.value="")}async function B(t){if(t!=null&&t.length){if(typeof S=="function"){if(S(t[0])===!1)return}else{if(t[0].size>_*1024*1024){s.message.warning(l("ap.apUpload.maxUploadFileSize",{maxSize:_}));return}if(!x.fileMatchesAccept(t[0],h)){s.message.warning(l("ap.apUpload.fileFormatNotSupported"));return}}if(a.value=t[0],o.value=2,d.value=0,u.value++,typeof U=="function"){U({onProgress:n=>{d.value=n},onError:n=>{s.message.warning(n||l("ap.apUpload.networkAnomaly")),o.value=1,a.value=null,u.value--},onSuccess:n=>{r.value=w.getReturnData(D,n,a.value.name),o.value=3,u.value--},file:t[0]});return}try{await z.useOssInit(L),V({file:a.value,dirName:P,oss:F,successCallBack(n){r.value=w.getReturnData(D,n,a.value.name),o.value=3,u.value--},errorCallBack(n){s.message.warning(n||l("ap.apUpload.networkAnomaly")),o.value=1,a.value=null,u.value--},progressCallBack(n){d.value=n}})}catch(n){s.message.warning(typeof(n==null?void 0:n.message)=="string"?n.message:l("ap.apUpload.networkAnomaly")),o.value=1,a.value=null,u.value--}}}function W(){a.value&&!(r!=null&&r.value)&&F.pauseUpload(),o.value=1,a.value=null,r.value=void 0}return(t,n)=>{var c;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({[e.unref(m)()]:!0,[e.unref(m)("admin")]:e.unref(g)==="admin",[e.unref(m)("un")]:o.value===1}),onClick:R,onDragenter:q,onDragover:I,onDragleave:q,onDrop:$},[e.createElementVNode("input",{style:{display:"none"},type:"file",ref_key:"fileRef",ref:f,accept:e.unref(h),onChange:G},null,40,X),o.value===1?(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("img",{class:"state-un-icon",src:e.unref(O.default)},null,8,Z),e.createElementVNode("div",ee,e.toDisplayString(e.unref(T)),1),e.createElementVNode("div",te,e.toDisplayString(typeof e.unref(k)=="string"&&e.unref(k).length>0?e.unref(k):`${e.unref(l)("ap.apUpload.supportExtension")}:${e.unref(x.getAcceptText)(e.unref(h))},${e.unref(l)("ap.apUpload.maxWarnUploadFileSize",{maxSize:e.unref(_)})}`),1)])):e.createCommentVNode("",!0),[2,3].includes(o.value)?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",ae,[e.createElementVNode("img",{src:e.unref(O.default)},null,8,oe)]),e.createElementVNode("div",re,[e.createElementVNode("div",{class:"center-title",style:e.normalizeStyle({color:j.value?"#0070FF":"#182948"})},e.toDisplayString((c=a.value)==null?void 0:c.name),5),e.createElementVNode("div",le,[j.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.Progress),{key:0,percent:d.value,size:4,showInfo:!1,trailColor:e.unref(g)==="admin"?"#D9D9D9":"#DEE4ED",strokeColor:e.unref(g)==="admin"?"#34B77C":"#0070FF"},null,8,["percent","trailColor","strokeColor"]))])]),e.createElementVNode("div",{class:"right",onClick:e.withModifiers(W,["stop"])},[e.createVNode(e.unref(J.DeleteOutlined))])])):e.createCommentVNode("",!0)],34)}}});exports.default=se;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("ant-design-vue");require("../../ap-button/index.js");require("./MenuItemGroup.vue.js");require("../../config-provider/index.js");const g=require("@ant-design/icons-vue"),w=require("@aplus-frontend/hooks"),P=require("../../config-provider/hooks/use-namespace.js"),q=require("../../config-provider/hooks/use-locale.js"),L=require("../../config-provider/hooks/use-global-config.js"),m=require("./MenuItemGroup.vue2.js"),C=require("../../ap-button/ap-button.vue.js"),k=e.defineComponent({__name:"ApBatchActionGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(v){const{b:l}=P.useNamespace("ap-batch-action-group"),{t:f}=q.useLocale(),t=v,b=L.useGlobalConfig("uiMode"),{hasPermission:_}=w.usePermission(),c=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.dropdownType)||"default"}),n=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.type)||"borderLink"}),d=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)||f("ap.apApBatchActionGroup.batchOperation")}),y=e.computed(()=>(t==null?void 0:t.selectedRows)||[]),s=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.disabled)??(Array.isArray(t.selectedRows)?y.value.length===0:!1)}),h=e.computed(()=>{const o={aplus:"#0070FF",admin:"#34b77c"};return n.value==="borderLink"?s.value?void 0:o[b.value]||o.aplus:void 0}),r=e.computed(()=>{var o;return((o=t==null?void 0:t.menuList)==null?void 0:o.filter(u=>{let a=u==null?void 0:u.ifShow;return!(u!=null&&u.ifShow)&&(u!=null&&u.auth)&&(a=()=>_(u.auth)),(a==null?void 0:a())??!0}))||[]});function i(){return t!=null&&t.buttonProps?{...t.buttonProps,type:n.value==="borderLink"?"default":n.value}:{}}return(o,u)=>r.value.length&&c.value==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.DropdownButton),e.mergeProps({key:0,class:[e.unref(l)()]},{...i(),disabled:s.value}),{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{menuList:r.value}),null,16,["menuList"])]),default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:h.value})},e.toDisplayString(d.value),5)]),_:1},16,["class"])):r.value.length&&c.value==="default"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,class:e.normalizeClass([e.unref(l)()]),disabled:s.value},{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{menuList:r.value}),null,16,["menuList"])]),default:e.withCtx(()=>[e.createVNode(e.unref(C.default),e.normalizeProps(e.guardReactiveProps({...o.$attrs,...i(),type:n.value})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value)+" ",1),e.createVNode(e.unref(g.DownOutlined))]),_:1},16)]),_:1},8,["class","disabled"])):e.createCommentVNode("",!0)}});exports.default=k;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, MenuItemProps } from 'ant-design-vue';
|
|
2
|
+
import { ApButtonProps } from '../../ap-button/interface';
|
|
2
3
|
import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
|
|
3
4
|
import { VNodeChild } from 'vue';
|
|
4
5
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
@@ -7,7 +8,9 @@ type MixinButton<T> = Omit<T, 'type'> & {
|
|
|
7
8
|
content?: string;
|
|
8
9
|
};
|
|
9
10
|
interface ApBatchActionGroupTypeProps {
|
|
10
|
-
default:
|
|
11
|
+
default: ApButtonProps & {
|
|
12
|
+
content?: string;
|
|
13
|
+
};
|
|
11
14
|
dropdown: MixinButton<DropdownButtonProps>;
|
|
12
15
|
}
|
|
13
16
|
export type ApBatchActionGroupPropsKeys = keyof ApBatchActionGroupTypeProps;
|
|
@@ -9,8 +9,8 @@ import { ApInputRadioOptions } from './ap-input-radio';
|
|
|
9
9
|
import { KeyboardEventHandler, MouseEventHandler, FocusEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
10
10
|
import { ButtonType, ButtonShape, ButtonSize } from 'ant-design-vue/es/button';
|
|
11
11
|
import { ButtonHTMLType } from 'ant-design-vue/es/button/buttonTypes';
|
|
12
|
+
import { ButtonProps, ItemType, MenuTheme, MenuMode } from 'ant-design-vue';
|
|
12
13
|
import { DropdownArrowOptions, Trigger, Align } from 'ant-design-vue/es/dropdown/props';
|
|
13
|
-
import { ItemType, MenuTheme, MenuMode, ButtonProps } from 'ant-design-vue';
|
|
14
14
|
import { CSSMotionProps } from 'ant-design-vue/es/_util/transition';
|
|
15
15
|
import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from 'ant-design-vue/es/menu/src/interface';
|
|
16
16
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
@@ -1274,8 +1274,12 @@ export declare const ApBatchActionGroup: DefineComponent<{
|
|
|
1274
1274
|
onMousedown: {
|
|
1275
1275
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
1276
1276
|
};
|
|
1277
|
-
}>>, "type"> & {
|
|
1278
|
-
type?:
|
|
1277
|
+
}>>, "type" | "onClick"> & {
|
|
1278
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
1279
|
+
borderLinkColor?: string;
|
|
1280
|
+
minWidth?: boolean | number | string;
|
|
1281
|
+
onClick?: () => any | Promise<any>;
|
|
1282
|
+
} & {
|
|
1279
1283
|
content?: string;
|
|
1280
1284
|
}) | ({
|
|
1281
1285
|
dropdownType?: "dropdown" | undefined;
|
|
@@ -1566,8 +1570,12 @@ export declare const ApBatchActionGroup: DefineComponent<{
|
|
|
1566
1570
|
onMousedown: {
|
|
1567
1571
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
1568
1572
|
};
|
|
1569
|
-
}>>, "type"> & {
|
|
1570
|
-
type?:
|
|
1573
|
+
}>>, "type" | "onClick"> & {
|
|
1574
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
1575
|
+
borderLinkColor?: string;
|
|
1576
|
+
minWidth?: boolean | number | string;
|
|
1577
|
+
onClick?: () => any | Promise<any>;
|
|
1578
|
+
} & {
|
|
1571
1579
|
content?: string;
|
|
1572
1580
|
}) | ({
|
|
1573
1581
|
dropdownType?: "dropdown" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue");require("../hooks/index.js");const g=require("./context.js"),y=require("lodash-unified"),b=require("ant-design-vue"),S=require("../hooks/useControllableValue.js"),B=r.defineComponent({name:"CheckCardGroup",__name:"group",props:{bordered:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},size:{default:void 0},stopPropagation:{type:[Boolean,Function],default:void 0},indicatorSize:{default:void 0},style:{default:void 0},multiple:{type:Boolean,default:!1},defaultValue:{type:[String,Number,Boolean,Array],default:void 0},value:{type:[String,Number,Boolean,Array],default:void 0},"onUpdate:value":{}},emits:["update:value"],setup(d,{emit:s}){const{onFieldChange:o}=b.Form.useInjectFormItemContext(),t=d,p=s,{value:a,updateValue:n}=S.useControllableValue(t,p),u=new Map;function c(e){if(!t.multiple){if(r.unref(a)===e)return;n(e),o==null||o();return}let i=[...r.unref(a)||[]];const v=i.find(l=>l===e);y.isUndefined(v)?i.push(e):i=i.filter(l=>l!==e).filter(l=>u.has(l)),n(i),o==null||o()}function f(e){u.set(e,!0)}function m(e){u.delete(e)}return g.useProvideCheckCard(r.computed(()=>({toggleOption:c,registerValue:f,cancelValue:m,disabled:t.disabled,size:t.size,bordered:t.bordered,loading:t.loading,value:r.unref(a),multiple:t.multiple,stopPropagation:t.stopPropagation,style:t.style,indicatorSize:t.indicatorSize}))),(e,i)=>r.renderSlot(e.$slots,"default")}});exports.default=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("lodash-unified"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("lodash-unified"),g=require("../ap-table/constants.js"),S=require("../utils/index.js"),v=require("../ap-field/number/helper.js"),w=require("scroll-into-view-if-needed"),q=require("ant-design-vue");require("../ap-form/index.js");const C=require("../ap-table/utils.js"),P=require("@ant-design/icons-vue"),T=require("../ap-form/ap-form-item.vue.js");function V(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}function N(e){return g.apTableFormItemMap[e]}function I(e){if(!e.fieldProps)return!1;const t=u.isFunction(e.fieldProps)?e.fieldProps({}):e.fieldProps;return S.isDef(t.required)?t.required:(u.isArray(t.rules)?t.rules:t.rules?[t.rules]:[]).some(l=>l.required)}function h(e,t){if(e.valueType==="text"||e.valueType==="textArea")return t||"--";if(e.valueType==="number"){const i=e.fieldProps?u.isFunction(e.fieldProps)?e.fieldProps({}):e.fieldProps:{};return v.getValueStr(t,i)||"--"}return C.objectToString(t)}function _(e,t){const i=[e];if(t){const l=u.isArray(t)?t:[t];i.unshift(...l)}return i.join(" ")}function j(e,t=document.body,i={}){const l=t.querySelectorAll("tr.ant-table-row")[e];l&&w(l,{scrollMode:"if-needed",block:"nearest",behavior:"smooth",...i})}function A(e,t,i){return g.noRenderAsFormItemValueList.includes(e.valueType)?i:e.copyable||e.ellipsis?o.createVNode(q.Typography.Paragraph,{copyable:e.copyable?{text:t,tooltip:!1}:!1,ellipsis:e.ellipsis?u.isBoolean(e.ellipsis)?{tooltip:t}:{...e.ellipsis,tooltip:t}:!1,content:e.ellipsis?h(e,t):i},null):i}function m(e,t,i,l,c,r){var p,b;if(t){if(e.customRenderFormItem){const f=e.customRenderFormItem(e,i.field,t,c);return o.createVNode(T.default,u.omit(i,["field"]),V(f)?f:{default:()=>[f]})}const s=N(e.valueType);if(s)return o.createVNode(s,i,null);const n=r==null?void 0:r[e.valueType],d=(p=n==null?void 0:n.renderFormItem)==null?void 0:p.call(n,i.field);return d?o.createVNode(T.default,i,V(d)?d:{default:()=>[d]}):null}let a;const y=g.apTableRenderItemMap[e.valueType];if(y)a=o.createVNode(y,o.mergeProps(i.field,{mode:"read"}),null);else{const s=r==null?void 0:r[e.valueType];a=(b=s==null?void 0:s.render)==null?void 0:b.call(s,l,c,i.field)}return a?A(e,l,a):null}function R(e,t,i,l,c){const r=l==null?void 0:l({title:e.title,column:e}),a=(r==null?void 0:r.filter(F=>F.type!==Symbol.for("v-cmt")))||[];if(r&&a.length>0)return r;const p=I(e),s=u.isString(e.title)?{class:t,title:e.title}:{},n=o.createVNode("div",s,[p?o.createVNode("span",{class:i},[o.createTextVNode("*")]):null,e.title]),d=e.tooltip?u.isFunction(e.tooltip)?e.tooltip(e):o.createVNode(o.Fragment,null,[e.tooltip]):null;return d?o.createVNode("span",{style:{display:"inline-flex",alignItems:"center",maxWidth:"100%"}},[n,o.createVNode(q.Tooltip,{title:d,placement:"bottom"},{default:()=>[o.createVNode(P.QuestionCircleOutlined,{style:{padding:"4px",color:c,verticalAlign:"middle"}},null)]})]):n}exports.getColumnIsRequired=I;exports.getEditableComponent=N;exports.getEditableTableTitle=R;exports.getFinalNode=m;exports.getRawDisplayValue=h;exports.mergeClass=_;exports.scrollToRowIndex=j;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.43",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"sortablejs": "^1.15.2",
|
|
63
63
|
"vuedraggable": "^4.1.0",
|
|
64
64
|
"@aplus-frontend/hooks": "1.0.7",
|
|
65
|
-
"@aplus-frontend/utils": "1.0.
|
|
65
|
+
"@aplus-frontend/utils": "1.0.39"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@aplus-frontend/icon": "^1.0.21",
|