@aplus-frontend/ui 0.1.9 → 0.1.11
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 +77 -75
- package/es/src/ap-download/ap-download.vue.d.ts +2 -2
- package/es/src/ap-download/ap-download.vue.mjs +30 -33
- package/es/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/es/src/ap-download/hooks/useStyle.mjs +22 -0
- package/es/src/ap-download/index.mjs +4 -1
- package/es/src/ap-download/interface.d.ts +29 -6
- package/es/src/ap-download/interface.mjs +4 -1
- package/es/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/es/src/ap-download/utils/getFileInfo.mjs +44 -0
- package/es/src/ap-field/interface.d.ts +4 -0
- package/es/src/ap-field/select/index.vue.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +36 -31
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue.mjs +33 -23
- package/es/src/ap-table/ap-table.vue.mjs +158 -147
- package/es/src/ap-table/constants.d.ts +26 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/es/src/ap-table/hooks/use-table-paging.mjs +63 -63
- package/es/src/ap-table/interface.d.ts +13 -1
- package/es/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +69 -66
- package/es/src/business/ap-export-group/interface.d.ts +13 -3
- package/es/src/business/ap-export-group/interface.mjs +2 -2
- package/es/src/business/ap-label/ApLabel.vue2.mjs +18 -17
- package/es/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/es/src/business/ap-label/ApLabelGroup.mjs +17 -23
- package/es/src/business/ap-label/constans.d.ts +10 -2
- package/es/src/business/ap-label/constans.mjs +8 -0
- package/es/src/business/ap-label/interface.d.ts +13 -8
- package/es/src/business/ap-select-layout/index.css +1 -1
- package/es/src/business/index.d.ts +60 -5
- package/es/src/index.mjs +72 -70
- package/es/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/es/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/es/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +2 -2
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/useStyle.d.ts +6 -0
- package/lib/src/ap-download/hooks/useStyle.js +1 -0
- package/lib/src/ap-download/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +29 -6
- package/lib/src/ap-download/interface.js +1 -1
- package/lib/src/ap-download/utils/getFileInfo.d.ts +9 -0
- package/lib/src/ap-download/utils/getFileInfo.js +1 -0
- package/lib/src/ap-field/interface.d.ts +4 -0
- package/lib/src/ap-field/select/index.vue.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.d.ts +6 -2
- package/lib/src/ap-layout/ap-info-layout/ap-info-layout.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +26 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +4 -3
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
- package/lib/src/ap-table/interface.d.ts +13 -1
- package/lib/src/ap-upload/apUploadTypes.d.ts +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -2
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +13 -3
- package/lib/src/business/ap-export-group/interface.js +1 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabelGroup.d.ts +22 -4
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +10 -2
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +13 -8
- package/lib/src/business/ap-select-layout/index.css +1 -1
- package/lib/src/business/index.d.ts +60 -5
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/admin/index.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +3 -0
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +3 -0
- package/lib/src/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, ref as f, onMounted as q, computed as m, unref as
|
|
1
|
+
import { defineComponent as k, ref as f, onMounted as q, computed as m, unref as u, openBlock as v, createElementBlock as A, toDisplayString as M, createBlock as T, mergeProps as _, createSlots as R, renderList as z, withCtx as h, renderSlot as D, normalizeProps as U, guardReactiveProps as L, createVNode as K } from "vue";
|
|
2
2
|
import { debounce as H, isFunction as y, isArray as $, isNil as j, omit as E } from "lodash-unified";
|
|
3
3
|
import { Select as W, Spin as G } from "ant-design-vue";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
@@ -89,60 +89,65 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
89
89
|
value: {},
|
|
90
90
|
"onUpdate:value": {},
|
|
91
91
|
searchMode: { default: "filter" },
|
|
92
|
-
refetchOnFocus: { type: Boolean }
|
|
92
|
+
refetchOnFocus: { type: Boolean, default: !1 },
|
|
93
|
+
lazy: { type: Boolean, default: !1 }
|
|
93
94
|
},
|
|
94
95
|
emits: ["update:value"],
|
|
95
96
|
setup(w, { expose: S, emit: g }) {
|
|
96
|
-
let
|
|
97
|
+
let n = 0;
|
|
97
98
|
const B = H((o) => {
|
|
98
99
|
if (!y(e.request))
|
|
99
100
|
return;
|
|
100
|
-
|
|
101
|
-
const t =
|
|
102
|
-
i.value = [],
|
|
103
|
-
|
|
101
|
+
n += 1;
|
|
102
|
+
const t = n;
|
|
103
|
+
i.value = [], a.value = !0, e.request(o).then((l) => {
|
|
104
|
+
n === t && (i.value = l);
|
|
104
105
|
}).finally(() => {
|
|
105
|
-
|
|
106
|
+
a.value = !1;
|
|
106
107
|
});
|
|
107
108
|
}, 300), e = w, F = (o, t) => {
|
|
108
|
-
var
|
|
109
|
-
const l = ((
|
|
109
|
+
var r;
|
|
110
|
+
const l = ((r = e.fieldNames) == null ? void 0 : r.label) || "label";
|
|
110
111
|
return typeof (t == null ? void 0 : t.label) == "string" && t[l].indexOf(o) > -1;
|
|
111
|
-
}, i = f((e == null ? void 0 : e.options) || []), d = f(),
|
|
112
|
+
}, i = f((e == null ? void 0 : e.options) || []), d = f(), a = f((e == null ? void 0 : e.loading) || !1), b = g;
|
|
112
113
|
async function s(o = !0) {
|
|
113
114
|
if (!y(e.request))
|
|
114
115
|
return;
|
|
115
|
-
|
|
116
|
-
const t =
|
|
116
|
+
a.value = !0, n += 1;
|
|
117
|
+
const t = n;
|
|
117
118
|
try {
|
|
118
119
|
o && (i.value = []);
|
|
119
120
|
const l = await e.request();
|
|
120
|
-
if (t !==
|
|
121
|
+
if (t !== n)
|
|
121
122
|
return;
|
|
122
123
|
i.value = l;
|
|
123
124
|
} finally {
|
|
124
|
-
|
|
125
|
+
a.value = !1;
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
function C(o) {
|
|
128
129
|
var t;
|
|
129
|
-
(t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus &&
|
|
130
|
+
(t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !a.value && s(!0);
|
|
130
131
|
}
|
|
131
132
|
q(() => {
|
|
133
|
+
if (e.lazy) {
|
|
134
|
+
n += 1;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
132
137
|
s();
|
|
133
138
|
});
|
|
134
139
|
const { value: p, updateValue: x } = X(e, b), I = Q("Select", e), O = m(() => {
|
|
135
|
-
const o =
|
|
140
|
+
const o = u(p);
|
|
136
141
|
if (!o)
|
|
137
142
|
return e.emptyText;
|
|
138
143
|
if ($(o))
|
|
139
144
|
return o.map(
|
|
140
145
|
(l) => {
|
|
141
|
-
var
|
|
142
|
-
return (
|
|
146
|
+
var r;
|
|
147
|
+
return (r = u(i).find((c) => c.value === l)) == null ? void 0 : r.label;
|
|
143
148
|
}
|
|
144
149
|
).filter(Boolean).join("、") || e.emptyText;
|
|
145
|
-
const t =
|
|
150
|
+
const t = u(i).find((l) => l.value === o);
|
|
146
151
|
return (t == null ? void 0 : t.label) || e.emptyText;
|
|
147
152
|
}), P = m(() => {
|
|
148
153
|
const o = !!(e != null && e.showSearch), t = e.searchMode;
|
|
@@ -151,7 +156,7 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
151
156
|
showArrow: !1,
|
|
152
157
|
defaultActiveFirstOption: !1,
|
|
153
158
|
onSearch: B,
|
|
154
|
-
notFoundContent:
|
|
159
|
+
notFoundContent: a.value ? void 0 : null
|
|
155
160
|
} : {
|
|
156
161
|
showArrow: !0,
|
|
157
162
|
filterOption: j(e == null ? void 0 : e.filterOption) ? F : e == null ? void 0 : e.filterOption
|
|
@@ -167,7 +172,7 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
167
172
|
"onFocus"
|
|
168
173
|
])
|
|
169
174
|
),
|
|
170
|
-
placeholder:
|
|
175
|
+
placeholder: u(I),
|
|
171
176
|
...l
|
|
172
177
|
};
|
|
173
178
|
});
|
|
@@ -183,29 +188,29 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
|
|
|
183
188
|
focus: V,
|
|
184
189
|
blur: N,
|
|
185
190
|
request: s
|
|
186
|
-
}), (o, t) => o.mode === "read" ? (v(), A("span", Y, M(O.value), 1)) : (v(), T(
|
|
191
|
+
}), (o, t) => o.mode === "read" ? (v(), A("span", Y, M(O.value), 1)) : (v(), T(u(W), _({
|
|
187
192
|
key: 1,
|
|
188
193
|
"allow-clear": "",
|
|
189
194
|
ref_key: "selectRef",
|
|
190
195
|
ref: d
|
|
191
196
|
}, P.value, {
|
|
192
197
|
mode: o.multiple ? "multiple" : void 0,
|
|
193
|
-
value:
|
|
194
|
-
"onUpdate:value":
|
|
198
|
+
value: u(p),
|
|
199
|
+
"onUpdate:value": u(x),
|
|
195
200
|
options: i.value,
|
|
196
|
-
loading:
|
|
201
|
+
loading: a.value,
|
|
197
202
|
onFocus: C
|
|
198
203
|
}), R({ _: 2 }, [
|
|
199
|
-
|
|
200
|
-
name:
|
|
204
|
+
z(o.$slots, (l, r) => ({
|
|
205
|
+
name: r,
|
|
201
206
|
fn: h((c) => [
|
|
202
|
-
|
|
207
|
+
D(o.$slots, r, U(L(c || {})))
|
|
203
208
|
])
|
|
204
209
|
})),
|
|
205
|
-
|
|
210
|
+
a.value ? {
|
|
206
211
|
name: "notFoundContent",
|
|
207
212
|
fn: h(() => [
|
|
208
|
-
K(
|
|
213
|
+
K(u(G), { size: "small" })
|
|
209
214
|
]),
|
|
210
215
|
key: "0"
|
|
211
216
|
} : void 0
|
|
@@ -10,10 +10,14 @@ declare function __VLS_template(): {
|
|
|
10
10
|
declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<APInfoLayoutProps>, {
|
|
11
11
|
toEl: string;
|
|
12
12
|
telDisabled: boolean;
|
|
13
|
-
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
13
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14
|
+
"update:telDisabled": (...args: any[]) => void;
|
|
15
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<APInfoLayoutProps>, {
|
|
14
16
|
toEl: string;
|
|
15
17
|
telDisabled: boolean;
|
|
16
|
-
}
|
|
18
|
+
}>>> & {
|
|
19
|
+
"onUpdate:telDisabled"?: ((...args: any[]) => any) | undefined;
|
|
20
|
+
}, {
|
|
17
21
|
toEl: string | HTMLElement;
|
|
18
22
|
telDisabled: boolean;
|
|
19
23
|
}, {}>;
|
|
@@ -1,62 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Divider as
|
|
1
|
+
import { defineComponent as $, computed as t, onActivated as y, onDeactivated as B, openBlock as i, createElementBlock as E, normalizeClass as a, createBlock as H, Teleport as k, renderSlot as s, createElementVNode as o, createVNode as A, unref as N } from "vue";
|
|
2
|
+
import { Divider as T } from "ant-design-vue";
|
|
3
3
|
import "../style/ap-info-layout.css";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { useNamespace as
|
|
6
|
-
const
|
|
5
|
+
import { useNamespace as V } from "../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const w = /* @__PURE__ */ $({
|
|
7
7
|
name: "ApInfoLayout",
|
|
8
8
|
__name: "ap-info-layout",
|
|
9
9
|
props: {
|
|
10
10
|
toEl: { default: "#microapp-fixed-header" },
|
|
11
11
|
telDisabled: { type: Boolean, default: !1 }
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
emits: ["update:telDisabled"],
|
|
14
|
+
setup(d, { emit: c }) {
|
|
15
|
+
const u = d, p = c, { b: l, be: v, bem: r } = V("info-layout"), m = t(() => [l("container")]), f = t(() => [l("header")]), C = t(() => [l("divider")]), b = t(() => [l("contant")]), g = t(() => [v("header", "contant")]), h = t(() => [r("header", "contant", "title")]), D = t(() => [r("header", "contant", "actions")]), n = t({
|
|
16
|
+
get: () => u.telDisabled,
|
|
17
|
+
set: (e) => {
|
|
18
|
+
p("update:telDisabled", e);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return y(() => {
|
|
22
|
+
n.value = !1;
|
|
23
|
+
}), B(() => {
|
|
24
|
+
n.value = !0;
|
|
25
|
+
}), (e, z) => (i(), E("div", {
|
|
26
|
+
class: a(m.value)
|
|
17
27
|
}, [
|
|
18
|
-
(
|
|
28
|
+
(i(), H(k, {
|
|
19
29
|
to: e.toEl,
|
|
20
|
-
disabled:
|
|
30
|
+
disabled: n.value
|
|
21
31
|
}, [
|
|
22
|
-
|
|
32
|
+
s(e.$slots, "header"),
|
|
23
33
|
o("div", {
|
|
24
|
-
class: a(`${
|
|
34
|
+
class: a(`${f.value}`)
|
|
25
35
|
}, [
|
|
26
36
|
o("div", {
|
|
27
|
-
class: a(
|
|
37
|
+
class: a(g.value)
|
|
28
38
|
}, [
|
|
29
39
|
o("div", {
|
|
30
|
-
class: a(
|
|
40
|
+
class: a(h.value)
|
|
31
41
|
}, [
|
|
32
|
-
|
|
42
|
+
s(e.$slots, "title")
|
|
33
43
|
], 2),
|
|
34
44
|
o("div", {
|
|
35
|
-
class: a(
|
|
45
|
+
class: a(D.value)
|
|
36
46
|
}, [
|
|
37
|
-
|
|
47
|
+
s(e.$slots, "actions")
|
|
38
48
|
], 2)
|
|
39
49
|
], 2)
|
|
40
50
|
], 2)
|
|
41
51
|
], 8, ["to", "disabled"])),
|
|
42
52
|
o("div", {
|
|
43
|
-
class: a(
|
|
53
|
+
class: a(C.value)
|
|
44
54
|
}, [
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
s(e.$slots, "divider", {}, () => [
|
|
56
|
+
A(N(T), {
|
|
47
57
|
class: "ap-info-layout-divider",
|
|
48
58
|
dashed: ""
|
|
49
59
|
})
|
|
50
60
|
])
|
|
51
61
|
], 2),
|
|
52
62
|
o("div", {
|
|
53
|
-
class: a(
|
|
63
|
+
class: a(b.value)
|
|
54
64
|
}, [
|
|
55
|
-
|
|
65
|
+
s(e.$slots, "content")
|
|
56
66
|
], 2)
|
|
57
67
|
], 2));
|
|
58
68
|
}
|
|
59
69
|
});
|
|
60
70
|
export {
|
|
61
|
-
|
|
71
|
+
w as default
|
|
62
72
|
};
|