@aplus-frontend/ui 0.1.24 → 0.1.26
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/index.mjs +58 -55
- package/es/src/ap-form/ap-form-item.vue.mjs +26 -26
- package/es/src/ap-form/search-form/index.vue.mjs +1 -0
- package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
- package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
- package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
- package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
- package/es/src/ap-layout/index.d.ts +2 -1
- package/es/src/ap-layout/index.mjs +2 -1
- package/es/src/ap-layout/interface.d.ts +8 -2
- package/es/src/ap-layout/interface.mjs +1 -0
- package/es/src/ap-layout/style/ap-info-layout.css +17 -0
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +91 -89
- package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -27
- package/es/src/business/ap-input-radio/interface.d.ts +4 -3
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +176 -0
- package/es/src/business/ap-ladder/interface.d.ts +134 -0
- package/es/src/business/ap-ladder/interface.mjs +10 -0
- package/es/src/business/ap-ladder/style.css +56 -0
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +3 -1
- package/es/src/business/hooks/usePageListApTable.d.ts +25 -3
- package/es/src/business/hooks/usePageListApTable.mjs +40 -29
- package/es/src/business/hooks/useTableRefresh.d.ts +17 -0
- package/es/src/business/hooks/useTableRefresh.mjs +16 -0
- package/es/src/business/index.d.ts +719 -9
- package/es/src/business/index.mjs +25 -22
- package/es/src/components.d.ts +1 -0
- package/es/src/index.mjs +206 -203
- package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
- package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
- package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
- package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
- package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
- package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
- package/lib/src/ap-layout/index.d.ts +2 -1
- package/lib/src/ap-layout/index.js +1 -1
- package/lib/src/ap-layout/interface.d.ts +8 -2
- package/lib/src/ap-layout/interface.js +1 -0
- package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
- package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/interface.d.ts +4 -3
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
- package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
- package/lib/src/business/ap-ladder/interface.d.ts +134 -0
- package/lib/src/business/ap-ladder/interface.js +1 -0
- package/lib/src/business/ap-ladder/style.css +56 -0
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +25 -3
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/business/hooks/useTableRefresh.d.ts +17 -0
- package/lib/src/business/hooks/useTableRefresh.js +1 -0
- package/lib/src/business/index.d.ts +719 -9
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
- package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
- package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
- package/package.json +1 -1
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
- /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
- /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
- /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
|
@@ -17,3 +17,20 @@
|
|
|
17
17
|
.aplus-info-layout-contant {
|
|
18
18
|
border-bottom-color: #fff;
|
|
19
19
|
}
|
|
20
|
+
.aplus-ap-info-layout-admin {
|
|
21
|
+
margin: 16px;
|
|
22
|
+
height: calc(100% - 32px);
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
25
|
+
div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky_box {
|
|
26
|
+
box-shadow: 0 4px 6px 0 rgba(73, 107, 158, 0.1);
|
|
27
|
+
border-bottom: none;
|
|
28
|
+
}
|
|
29
|
+
.aplus-ap-info-layout-admin__sticky_box {
|
|
30
|
+
position: sticky;
|
|
31
|
+
top: 0;
|
|
32
|
+
z-index: 100;
|
|
33
|
+
}
|
|
34
|
+
.aplus-ap-info-layout-admin__sticky_box-bordered {
|
|
35
|
+
border-bottom: 1px solid #e9e9e9;
|
|
36
|
+
}
|
|
@@ -1,81 +1,83 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, inject as n, ref as j, watch as W, nextTick as G, openBlock as x, createElementBlock as C, normalizeClass as H, unref as s, createVNode as _, withCtx as b, createElementVNode as L, createTextVNode as J, toDisplayString as S, withModifiers as K, createBlock as Q, resolveDynamicComponent as V, createCommentVNode as X } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import { getPath as
|
|
4
|
-
import { useOss as
|
|
5
|
-
import { message as
|
|
6
|
-
import { UploadOutlined as
|
|
7
|
-
import { fileMatchesAccept as
|
|
3
|
+
import { getPath as Y, getName as Z, getReturnData as y } from "../utils/returnData.mjs";
|
|
4
|
+
import { useOss as ee, getOssInstance as te } from "../hooks/useOss.mjs";
|
|
5
|
+
import { message as c, Upload as oe, Button as ae } from "ant-design-vue";
|
|
6
|
+
import { UploadOutlined as se } from "@ant-design/icons-vue";
|
|
7
|
+
import { fileMatchesAccept as ne, getAcceptText as ie } from "../utils/accept.mjs";
|
|
8
8
|
import "../styles/multiple-file.css";
|
|
9
|
-
import { useLocale as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
const
|
|
9
|
+
import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
|
|
10
|
+
import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
const ue = { class: "multiple-file-context" }, pe = { key: 0 }, ce = { key: 1 }, _e = /* @__PURE__ */ $({
|
|
12
12
|
__name: "MultipleFile",
|
|
13
|
-
setup(
|
|
14
|
-
const { t: i } =
|
|
15
|
-
|
|
13
|
+
setup(me) {
|
|
14
|
+
const { t: i } = re(), { b: U } = le("ap-upload-multiple-file"), { put: B } = ee(), I = n("theme"), P = n("dirName"), w = n("accept") || "*", A = n("maxSize") ?? 500, z = n("title") || i("ap.apUpload.uploadFile"), h = n("subTitle"), r = n("maxCount") ?? 10, m = n("uploadingCount"), F = n("beforeUpload"), N = n("customRequest"), R = n("getOssAccess"), a = n("value"), g = [], d = n("needName"), p = j(null);
|
|
15
|
+
W(
|
|
16
16
|
() => a == null ? void 0 : a.value,
|
|
17
17
|
function(e) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
var t, o;
|
|
19
|
+
!((o = (t = p == null ? void 0 : p.value) == null ? void 0 : t.fileList) != null && o.length) && e && G(() => {
|
|
20
|
+
const l = e.map((u) => {
|
|
21
|
+
const E = Y(d, u), M = Z(d, u), k = new File(
|
|
22
|
+
[u],
|
|
23
|
+
M,
|
|
23
24
|
{}
|
|
24
25
|
);
|
|
25
|
-
return k.response =
|
|
26
|
+
return k.response = E, k.uid = E, k;
|
|
26
27
|
});
|
|
27
|
-
if (
|
|
28
|
-
|
|
28
|
+
if (r && l.length > r) {
|
|
29
|
+
c.warning(
|
|
29
30
|
i("ap.apUpload.fileInitializationException", {
|
|
30
|
-
maxCount:
|
|
31
|
+
maxCount: r
|
|
31
32
|
})
|
|
32
33
|
);
|
|
33
34
|
return;
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
uid:
|
|
38
|
-
path:
|
|
36
|
+
l.forEach((u) => {
|
|
37
|
+
f.push(u), g.push({
|
|
38
|
+
uid: u.uid,
|
|
39
|
+
path: u.response
|
|
39
40
|
});
|
|
40
|
-
}),
|
|
41
|
+
}), p.value.fileList = l;
|
|
41
42
|
});
|
|
42
|
-
}
|
|
43
|
+
},
|
|
44
|
+
{ immediate: !0 }
|
|
43
45
|
);
|
|
44
|
-
let
|
|
45
|
-
function
|
|
46
|
+
let f = [], T;
|
|
47
|
+
function v(e) {
|
|
46
48
|
setTimeout(() => {
|
|
47
|
-
const t =
|
|
49
|
+
const t = p.value.fileList.findIndex(
|
|
48
50
|
(o) => o.uid === e.uid
|
|
49
51
|
);
|
|
50
|
-
t >= 0 &&
|
|
52
|
+
t >= 0 && p.value.fileList.splice(t, 1);
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
+
function O(e) {
|
|
56
|
+
if (r && r > 1 && f.length >= r)
|
|
55
57
|
return clearTimeout(T), T = setTimeout(() => {
|
|
56
|
-
|
|
58
|
+
c.warning(
|
|
57
59
|
i("ap.apUpload.maxUploadFiles", {
|
|
58
|
-
maxCount:
|
|
60
|
+
maxCount: r
|
|
59
61
|
})
|
|
60
62
|
);
|
|
61
|
-
}),
|
|
63
|
+
}), v(e), !1;
|
|
62
64
|
if (typeof F == "function") {
|
|
63
65
|
if (F(e) === !1)
|
|
64
|
-
return
|
|
66
|
+
return v(e), !1;
|
|
65
67
|
} else {
|
|
66
68
|
if (e.size > A * 1024 * 1024)
|
|
67
|
-
return
|
|
69
|
+
return c.warning(
|
|
68
70
|
i("ap.apUpload.maxUploadFileSize", {
|
|
69
71
|
maxSize: A
|
|
70
72
|
})
|
|
71
|
-
),
|
|
72
|
-
if (!
|
|
73
|
-
return
|
|
73
|
+
), v(e), !1;
|
|
74
|
+
if (!ne(e, w))
|
|
75
|
+
return c.warning(i("ap.apUpload.fileFormatNotSupported")), v(e), !1;
|
|
74
76
|
}
|
|
75
|
-
|
|
77
|
+
r && r === 1 && (f = [], a.value = void 0), f.push(e);
|
|
76
78
|
}
|
|
77
|
-
async function
|
|
78
|
-
if (
|
|
79
|
+
async function q(e) {
|
|
80
|
+
if (m.value++, typeof N == "function") {
|
|
79
81
|
N({
|
|
80
82
|
onProgress: (t) => {
|
|
81
83
|
setTimeout(() => {
|
|
@@ -85,50 +87,50 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
|
|
|
85
87
|
});
|
|
86
88
|
},
|
|
87
89
|
onError: (t) => {
|
|
88
|
-
|
|
90
|
+
c.warning(t || i("ap.apUpload.networkAnomaly")), setTimeout(() => {
|
|
89
91
|
e.onError({
|
|
90
92
|
name: t,
|
|
91
93
|
message: t
|
|
92
94
|
});
|
|
93
|
-
}),
|
|
95
|
+
}), m.value--;
|
|
94
96
|
},
|
|
95
97
|
onSuccess: (t) => {
|
|
96
98
|
setTimeout(() => {
|
|
97
99
|
e.onSuccess(t);
|
|
98
100
|
}), a.value ? a.value.push(
|
|
99
|
-
|
|
101
|
+
y(d, t, e.file.name)
|
|
100
102
|
) : a.value = [
|
|
101
|
-
|
|
102
|
-
],
|
|
103
|
+
y(d, t, e.file.name)
|
|
104
|
+
], g.push({
|
|
103
105
|
uid: e.file.uid,
|
|
104
106
|
path: t
|
|
105
|
-
}),
|
|
107
|
+
}), m.value--;
|
|
106
108
|
},
|
|
107
109
|
file: e.file
|
|
108
110
|
});
|
|
109
111
|
return;
|
|
110
112
|
}
|
|
111
113
|
try {
|
|
112
|
-
const t = await
|
|
113
|
-
e.file.oss = t,
|
|
114
|
+
const t = await te(R);
|
|
115
|
+
e.file.oss = t, B({
|
|
114
116
|
file: e.file,
|
|
115
|
-
dirName:
|
|
117
|
+
dirName: P,
|
|
116
118
|
oss: t,
|
|
117
119
|
successCallBack(o) {
|
|
118
120
|
e.onSuccess(o), a.value ? a.value.push(
|
|
119
|
-
|
|
121
|
+
y(d, o, e.file.name)
|
|
120
122
|
) : a.value = [
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
+
y(d, o, e.file.name)
|
|
124
|
+
], g.push({
|
|
123
125
|
uid: e.file.uid,
|
|
124
126
|
path: o
|
|
125
|
-
}),
|
|
127
|
+
}), m.value--;
|
|
126
128
|
},
|
|
127
129
|
errorCallBack(o) {
|
|
128
|
-
|
|
130
|
+
c.warning(o || i("ap.apUpload.networkAnomaly")), e.onError({
|
|
129
131
|
name: o,
|
|
130
132
|
message: o
|
|
131
|
-
}),
|
|
133
|
+
}), m.value--;
|
|
132
134
|
},
|
|
133
135
|
progressCallBack(o) {
|
|
134
136
|
e.onProgress({
|
|
@@ -137,66 +139,66 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
|
|
|
137
139
|
}
|
|
138
140
|
});
|
|
139
141
|
} catch (t) {
|
|
140
|
-
|
|
142
|
+
c.warning(
|
|
141
143
|
typeof (t == null ? void 0 : t.message) == "string" ? t.message : i("ap.apUpload.networkAnomaly")
|
|
142
144
|
), e.onError({
|
|
143
145
|
name: (t == null ? void 0 : t.message) || i("ap.apUpload.networkAnomaly"),
|
|
144
146
|
message: (t == null ? void 0 : t.message) || i("ap.apUpload.networkAnomaly")
|
|
145
|
-
}),
|
|
147
|
+
}), m.value--;
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
|
-
function
|
|
150
|
+
function D(e) {
|
|
149
151
|
var o;
|
|
150
152
|
if (e.response) {
|
|
151
153
|
if (Array.isArray(a.value)) {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
+
const l = g.findIndex((u) => u.uid === e.uid);
|
|
155
|
+
l >= 0 && (a == null || a.value.splice(l, 1), g.splice(l, 1)), a.value.length === 0 && (a.value = void 0);
|
|
154
156
|
}
|
|
155
157
|
} else
|
|
156
158
|
(o = e == null ? void 0 : e.oss) == null || o.pauseUpload();
|
|
157
|
-
const t =
|
|
158
|
-
(
|
|
159
|
+
const t = f.findIndex(
|
|
160
|
+
(l) => l.uid === e.uid
|
|
159
161
|
);
|
|
160
|
-
return
|
|
162
|
+
return f.splice(t, 1), Promise.resolve(!0);
|
|
161
163
|
}
|
|
162
|
-
return (e, t) => (
|
|
163
|
-
class:
|
|
164
|
+
return (e, t) => (x(), C("div", {
|
|
165
|
+
class: H({
|
|
164
166
|
[s(U)()]: !0,
|
|
165
|
-
[s(U)("admin")]: s(
|
|
167
|
+
[s(U)("admin")]: s(I) === "admin"
|
|
166
168
|
})
|
|
167
169
|
}, [
|
|
168
|
-
_(s(
|
|
170
|
+
_(s(oe), {
|
|
169
171
|
ref_key: "uploadRef",
|
|
170
|
-
ref:
|
|
171
|
-
accept: s(
|
|
172
|
+
ref: p,
|
|
173
|
+
accept: s(w),
|
|
172
174
|
multiple: "",
|
|
173
|
-
maxCount: s(
|
|
175
|
+
maxCount: s(r),
|
|
174
176
|
progress: {
|
|
175
177
|
strokeWidth: 3,
|
|
176
178
|
showInfo: !1,
|
|
177
179
|
strokeColor: "#0070FF"
|
|
178
180
|
},
|
|
179
|
-
beforeUpload:
|
|
180
|
-
customRequest:
|
|
181
|
-
onRemove:
|
|
181
|
+
beforeUpload: O,
|
|
182
|
+
customRequest: q,
|
|
183
|
+
onRemove: D
|
|
182
184
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
|
|
185
|
-
_(s(
|
|
186
|
-
default:
|
|
187
|
-
_(s(
|
|
188
|
-
|
|
185
|
+
default: b(() => [
|
|
186
|
+
L("div", ue, [
|
|
187
|
+
_(s(ae), { class: "file-btn" }, {
|
|
188
|
+
default: b(() => [
|
|
189
|
+
_(s(se)),
|
|
190
|
+
J(" " + S(s(z)), 1)
|
|
189
191
|
]),
|
|
190
192
|
_: 1
|
|
191
193
|
}),
|
|
192
|
-
|
|
194
|
+
L("div", {
|
|
193
195
|
class: "sub-title",
|
|
194
|
-
onClick: t[0] || (t[0] =
|
|
196
|
+
onClick: t[0] || (t[0] = K(() => {
|
|
195
197
|
}, ["stop"]))
|
|
196
198
|
}, [
|
|
197
|
-
typeof s(
|
|
198
|
-
(
|
|
199
|
-
])) :
|
|
199
|
+
typeof s(h) == "string" ? (x(), C("div", pe, S(s(h) || `${s(i)("ap.apUpload.supportExtension")}:${s(ie)(s(w))}`), 1)) : s(h) ? (x(), C("div", ce, [
|
|
200
|
+
(x(), Q(V(s(h))))
|
|
201
|
+
])) : X("", !0)
|
|
200
202
|
])
|
|
201
203
|
])
|
|
202
204
|
]),
|
|
@@ -206,5 +208,5 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
|
|
|
206
208
|
}
|
|
207
209
|
});
|
|
208
210
|
export {
|
|
209
|
-
|
|
211
|
+
_e as default
|
|
210
212
|
};
|