@aplus-frontend/ui 0.1.40 → 0.1.42
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-action/group/index.vue.d.ts +1 -1
- package/es/src/ap-download/interface.d.ts +1 -1
- package/es/src/ap-field/date/index.vue.d.ts +1 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +16 -16
- package/es/src/ap-form/items/text/index.vue.d.ts +12 -12
- package/es/src/ap-form/items/text/password.vue.d.ts +12 -12
- package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -12
- package/es/src/ap-table/constants.d.ts +209 -209
- package/es/src/ap-table/utils.d.ts +72 -72
- package/es/src/ap-table/utils.mjs +69 -69
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +41 -39
- package/es/src/base-button/index.d.ts +4 -4
- 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/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/index.d.ts +24 -16
- package/es/src/check-card/group.vue.d.ts +1 -1
- package/es/src/config-provider/config-provider-props.d.ts +5 -0
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +90 -3
- package/es/src/config-provider/config-provider.mjs +27 -23
- package/es/src/config-provider/css-var.d.ts +88 -0
- package/es/src/{theme/css-var/index.mjs → config-provider/css-var.mjs} +1 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -0
- package/es/src/config-provider/index.d.ts +486 -9
- package/es/src/editable-table/utils.mjs +51 -51
- package/es/src/theme/antd-global-overwrite/admin/button.css +0 -3
- package/es/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/es/src/theme/antd-global-overwrite/aplus/button.css +0 -3
- package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -3
- package/es/src/type.d.ts +3 -0
- package/es/src/utils/config-provider-preset.d.ts +3 -3
- package/lib/src/ap-action/group/index.vue.d.ts +1 -1
- package/lib/src/ap-download/interface.d.ts +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +16 -16
- package/lib/src/ap-form/items/text/index.vue.d.ts +12 -12
- package/lib/src/ap-form/items/text/password.vue.d.ts +12 -12
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -12
- package/lib/src/ap-table/constants.d.ts +209 -209
- package/lib/src/ap-table/utils.d.ts +72 -72
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/base-button/index.d.ts +4 -4
- 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/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/index.d.ts +24 -16
- package/lib/src/check-card/group.vue.d.ts +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +5 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +90 -3
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/css-var.d.ts +88 -0
- package/lib/src/{theme/css-var/index.js → config-provider/css-var.js} +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -0
- package/lib/src/config-provider/index.d.ts +486 -9
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +0 -3
- package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +0 -3
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -3
- package/lib/src/type.d.ts +3 -0
- package/lib/src/utils/config-provider-preset.d.ts +3 -3
- package/package.json +2 -2
- package/es/src/theme/css-var/index.d.ts +0 -7
- package/lib/src/theme/css-var/index.d.ts +0 -7
|
@@ -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
|
};
|
|
@@ -9,7 +9,7 @@ export declare const BaseButton: {
|
|
|
9
9
|
type: PropType<() => void>;
|
|
10
10
|
};
|
|
11
11
|
color: {
|
|
12
|
-
type: PropType<"error" | "
|
|
12
|
+
type: PropType<"error" | "primary" | "success" | "warning">;
|
|
13
13
|
};
|
|
14
14
|
text: {
|
|
15
15
|
type: PropType<string>;
|
|
@@ -35,7 +35,7 @@ export declare const BaseButton: {
|
|
|
35
35
|
type: PropType<() => void>;
|
|
36
36
|
};
|
|
37
37
|
color: {
|
|
38
|
-
type: PropType<"error" | "
|
|
38
|
+
type: PropType<"error" | "primary" | "success" | "warning">;
|
|
39
39
|
};
|
|
40
40
|
text: {
|
|
41
41
|
type: PropType<string>;
|
|
@@ -70,7 +70,7 @@ export declare const BaseButton: {
|
|
|
70
70
|
type: PropType<() => void>;
|
|
71
71
|
};
|
|
72
72
|
color: {
|
|
73
|
-
type: PropType<"error" | "
|
|
73
|
+
type: PropType<"error" | "primary" | "success" | "warning">;
|
|
74
74
|
};
|
|
75
75
|
text: {
|
|
76
76
|
type: PropType<string>;
|
|
@@ -102,7 +102,7 @@ export declare const BaseButton: {
|
|
|
102
102
|
type: PropType<() => void>;
|
|
103
103
|
};
|
|
104
104
|
color: {
|
|
105
|
-
type: PropType<"error" | "
|
|
105
|
+
type: PropType<"error" | "primary" | "success" | "warning">;
|
|
106
106
|
};
|
|
107
107
|
text: {
|
|
108
108
|
type: PropType<string>;
|
|
@@ -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;
|
|
@@ -127,12 +127,12 @@ declare const _default: DefineComponent<{
|
|
|
127
127
|
placement: TooltipPlacement;
|
|
128
128
|
show: boolean;
|
|
129
129
|
dot: boolean;
|
|
130
|
+
count: any;
|
|
130
131
|
iconType: "ellipsis" | "success" | "warning" | "question";
|
|
131
132
|
iconSize: number;
|
|
132
133
|
helpMessage: string | VNode< RendererNode, RendererElement, {
|
|
133
134
|
[key: string]: any;
|
|
134
135
|
}> | undefined;
|
|
135
|
-
count: any;
|
|
136
136
|
showZero: boolean;
|
|
137
137
|
overflowCount: number;
|
|
138
138
|
numberStyle: CSSProperties;
|