@aplus-frontend/ui 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-download/ap-download.vue.mjs +26 -26
- package/es/src/ap-table/ap-table.vue.mjs +55 -55
- package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/es/src/business/ap-image/ApImage.vue.d.ts +2 -2
- package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
- package/es/src/business/ap-label/ApLabel.d.ts +141 -0
- package/es/src/business/ap-label/ApLabel.mjs +49 -0
- package/es/src/business/ap-label/ApLabelGroup.mjs +11 -12
- package/es/src/business/ap-label/constans.d.ts +65 -1
- package/es/src/business/ap-label/constans.mjs +33 -2
- package/es/src/business/ap-label/index.d.ts +1 -1
- package/es/src/business/ap-label/interface.d.ts +2 -1
- package/es/src/business/index.d.ts +166 -174
- package/es/src/business/index.mjs +18 -19
- package/es/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
- package/lib/src/business/ap-image/ApImage.vue.d.ts +2 -2
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +141 -0
- package/lib/src/business/ap-label/ApLabel.js +1 -0
- package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
- package/lib/src/business/ap-label/constans.d.ts +65 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-label/index.d.ts +1 -1
- package/lib/src/business/ap-label/interface.d.ts +2 -1
- package/lib/src/business/index.d.ts +166 -174
- package/lib/src/business/index.js +1 -1
- package/lib/src/pro-form/hooks/use-label-width.d.ts +1 -1
- package/package.json +3 -3
- package/es/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/es/src/business/ap-label/ApLabel.vue.mjs +0 -4
- package/es/src/business/ap-label/ApLabel.vue2.mjs +0 -85
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +0 -56
- package/lib/src/business/ap-label/ApLabel.vue.js +0 -1
- package/lib/src/business/ap-label/ApLabel.vue2.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as w, computed as o, unref as t, openBlock as z, createElementBlock as b, normalizeStyle as N, normalizeClass as n, createElementVNode as a, renderSlot as O, toDisplayString as S } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
|
-
import { useOssInit as
|
|
3
|
+
import { useOssInit as h } from "./hooks/index.mjs";
|
|
4
4
|
import "./style/ap-download.css";
|
|
5
|
-
import { getFileInfo as
|
|
6
|
-
import { useStyle as
|
|
5
|
+
import { getFileInfo as A } from "./utils/getFileInfo.mjs";
|
|
6
|
+
import { useStyle as v } from "./hooks/useStyle.mjs";
|
|
7
7
|
import { useLocale as B } from "../config-provider/hooks/use-locale.mjs";
|
|
8
|
-
import { useGlobalConfig as
|
|
9
|
-
const k = { class: "icon" },
|
|
8
|
+
import { useGlobalConfig as l } from "../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
const k = { class: "icon" }, x = { class: "text" }, V = /* @__PURE__ */ w({
|
|
10
10
|
name: "ApDownload",
|
|
11
11
|
__name: "ap-download",
|
|
12
12
|
props: {
|
|
@@ -18,32 +18,32 @@ const k = { class: "icon" }, v = { class: "text" }, V = /* @__PURE__ */ y({
|
|
|
18
18
|
needName: { type: [Boolean, Object] },
|
|
19
19
|
getOssAccess: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const { lang:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
),
|
|
27
|
-
var
|
|
28
|
-
return e.getOssAccess || ((
|
|
29
|
-
}),
|
|
30
|
-
e.disabled || await (await
|
|
31
|
-
|
|
32
|
-
t(
|
|
33
|
-
)).downloadFile(
|
|
21
|
+
setup(r) {
|
|
22
|
+
const { lang: c } = B(), i = o(() => c.value === "zh-cn" ? "zh_CN" : "en_US"), p = l("uiMode"), e = r, d = l("apUpload"), m = o(() => e.disabled), u = o(() => p.value === "aplus" ? "#0070FF" : "#1890FF"), f = o(() => e.size), { wrapperStyle: g, getWrapperClass: _, getInnerWrapperClass: C } = v(
|
|
23
|
+
u,
|
|
24
|
+
f,
|
|
25
|
+
m
|
|
26
|
+
), y = o(() => {
|
|
27
|
+
var s;
|
|
28
|
+
return e.getOssAccess || ((s = d.value) == null ? void 0 : s.getOssAccess);
|
|
29
|
+
}), F = async () => {
|
|
30
|
+
e.disabled || await (await h(
|
|
31
|
+
y.value,
|
|
32
|
+
t(i)
|
|
33
|
+
)).downloadFile(A(e.needName, e.fileName));
|
|
34
34
|
};
|
|
35
|
-
return (
|
|
36
|
-
style:
|
|
37
|
-
class: n(t(
|
|
38
|
-
onClick:
|
|
35
|
+
return (s, I) => (z(), b("span", {
|
|
36
|
+
style: N(t(g)),
|
|
37
|
+
class: n(t(_)),
|
|
38
|
+
onClick: F
|
|
39
39
|
}, [
|
|
40
40
|
a("span", {
|
|
41
|
-
class: n(t(
|
|
41
|
+
class: n(t(C))
|
|
42
42
|
}, [
|
|
43
43
|
a("span", k, [
|
|
44
|
-
|
|
44
|
+
O(s.$slots, "icon")
|
|
45
45
|
]),
|
|
46
|
-
a("span",
|
|
46
|
+
a("span", x, S(s.text), 1)
|
|
47
47
|
], 2)
|
|
48
48
|
], 6));
|
|
49
49
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as ce, useSlots as pe, computed as
|
|
2
|
-
import { Typography as
|
|
1
|
+
import { defineComponent as ce, useSlots as pe, computed as s, unref as l, createVNode as u, Fragment as D, watch as fe, openBlock as c, createElementBlock as y, normalizeClass as x, normalizeStyle as F, mergeProps as S, createSlots as j, withCtx as p, renderList as A, createBlock as me, resolveDynamicComponent as ge, renderSlot as v, createCommentVNode as W, createElementVNode as _, toDisplayString as ye, normalizeProps as Se, guardReactiveProps as he } from "vue";
|
|
2
|
+
import { Typography as be, Table as we, Tooltip as Ce } from "ant-design-vue";
|
|
3
3
|
import { useToken as Re } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as Te } from "../ap-form/index.mjs";
|
|
5
|
-
import { noRenderAsFormItemValueList as
|
|
5
|
+
import { noRenderAsFormItemValueList as H } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as xe } from "./hooks/use-table-paging.mjs";
|
|
8
|
-
import { omit as
|
|
8
|
+
import { omit as q, isUndefined as i, isBoolean as Fe } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
10
|
import { QuestionCircleOutlined as ve } from "@ant-design/icons-vue";
|
|
11
|
-
import { apColumnToColumn as Be, getTableRenderType as Pe, getTableRenderProps as ke, getTableCellRenderNode as Ie, getColumnOrder as
|
|
11
|
+
import { apColumnToColumn as Be, getTableRenderType as Pe, getTableRenderProps as ke, getTableCellRenderNode as Ie, getColumnOrder as U, updateFormProps as Ne, getFieldProps as Le, getPlaceholder as Ee, getSearchFormItemRenderNode as Oe, objectToString as Ve } from "./utils.mjs";
|
|
12
12
|
import Ke from "./hooks/use-table-content-height.mjs";
|
|
13
13
|
import { getRawDisplayValue as ze } from "../editable-table/utils.mjs";
|
|
14
14
|
import De from "./hooks/use-table-row-selection.mjs";
|
|
15
15
|
import { useLocale as je } from "../config-provider/hooks/use-locale.mjs";
|
|
16
|
-
import { useNamespace as
|
|
17
|
-
import { useGlobalConfig as
|
|
18
|
-
const
|
|
16
|
+
import { useNamespace as Ae } from "../config-provider/hooks/use-namespace.mjs";
|
|
17
|
+
import { useGlobalConfig as We } from "../config-provider/hooks/use-global-config.mjs";
|
|
18
|
+
const _e = {
|
|
19
19
|
key: 0
|
|
20
20
|
}, na = /* @__PURE__ */ ce({
|
|
21
21
|
name: "ApTable",
|
|
@@ -133,36 +133,36 @@ const Ae = {
|
|
|
133
133
|
default: !1
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
setup(
|
|
137
|
-
expose:
|
|
136
|
+
setup($, {
|
|
137
|
+
expose: G
|
|
138
138
|
}) {
|
|
139
|
-
const o =
|
|
139
|
+
const o = $;
|
|
140
140
|
let B = 0;
|
|
141
|
-
const P = pe(), [,
|
|
142
|
-
t:
|
|
141
|
+
const P = pe(), [, M] = Re(), {
|
|
142
|
+
t: Q
|
|
143
143
|
} = je(), {
|
|
144
|
-
e:
|
|
144
|
+
e: h,
|
|
145
145
|
b: f
|
|
146
|
-
} =
|
|
146
|
+
} = Ae("ap-table"), k = We("valueTypeMap"), {
|
|
147
147
|
height: J,
|
|
148
148
|
contentRef: X
|
|
149
|
-
} = Ke(),
|
|
149
|
+
} = Ke(), b = s(() => {
|
|
150
150
|
var r;
|
|
151
151
|
let e = ((r = o.columns) == null ? void 0 : r.filter((a) => !a.hideInTable)) || [];
|
|
152
152
|
return e = e.map((a) => ({
|
|
153
|
-
...
|
|
153
|
+
...q(Be(a), ["ellipsis"]),
|
|
154
154
|
customRender({
|
|
155
155
|
value: t,
|
|
156
156
|
...n
|
|
157
157
|
}) {
|
|
158
158
|
var K, z;
|
|
159
|
-
const
|
|
159
|
+
const d = Pe(a), O = ke({
|
|
160
160
|
...a,
|
|
161
|
-
valueType:
|
|
161
|
+
valueType: d
|
|
162
162
|
}, {
|
|
163
163
|
value: t,
|
|
164
164
|
...n
|
|
165
|
-
}), ue = Ie(
|
|
165
|
+
}), ue = Ie(d, O, n.record, l(k)), V = ((K = a.renderText) == null ? void 0 : K.call(a, {
|
|
166
166
|
value: t,
|
|
167
167
|
...n
|
|
168
168
|
})) || t, ie = a.renderText ? u(D, null, [(z = a.renderText) == null ? void 0 : z.call(a, {
|
|
@@ -179,27 +179,27 @@ const Ae = {
|
|
|
179
179
|
})), T;
|
|
180
180
|
}
|
|
181
181
|
})), e;
|
|
182
|
-
}), I =
|
|
182
|
+
}), I = s(() => {
|
|
183
183
|
var e, r, a;
|
|
184
|
-
return B++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !
|
|
185
|
-
let
|
|
186
|
-
return
|
|
184
|
+
return B++, ((a = (r = (e = o.columns) == null ? void 0 : e.filter((t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !H.includes(t.valueType))) == null ? void 0 : r.sort((t, n) => {
|
|
185
|
+
let d = U(t.order);
|
|
186
|
+
return U(n.order) - d;
|
|
187
187
|
})) == null ? void 0 : a.map((t) => {
|
|
188
|
-
const n = Ne(t, Le(t.fieldProps, {})),
|
|
188
|
+
const n = Ne(t, Le(t.fieldProps, {})), d = {
|
|
189
189
|
...t,
|
|
190
190
|
fieldProps: {
|
|
191
191
|
label: t.title,
|
|
192
192
|
name: t.dataIndex,
|
|
193
193
|
...n || {},
|
|
194
194
|
// 格式化placeholder
|
|
195
|
-
placeholder: Ee(
|
|
195
|
+
placeholder: Ee(Q, t.valueType, n == null ? void 0 : n.placeholder),
|
|
196
196
|
_signal: B
|
|
197
197
|
},
|
|
198
198
|
renderNode: void 0
|
|
199
199
|
};
|
|
200
|
-
return
|
|
200
|
+
return d.renderNode = Oe(d, l(k)), d;
|
|
201
201
|
})) || [];
|
|
202
|
-
}), Y =
|
|
202
|
+
}), Y = s(() => l(b).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), Z = s(() => l(b).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ee = s(() => i(o.dataSource) ? g.value.records : o.dataSource), {
|
|
203
203
|
rowSelection: w,
|
|
204
204
|
selectedRows: N,
|
|
205
205
|
...C
|
|
@@ -232,21 +232,21 @@ const Ae = {
|
|
|
232
232
|
defaultCurrent: o.pagination ? o.pagination.defaultCurrent : void 0,
|
|
233
233
|
defaultPageSize: o.pagination ? o.pagination.defaultPageSize : void 0,
|
|
234
234
|
formatParams: o.beforeSearchSubmit
|
|
235
|
-
}), oe =
|
|
236
|
-
var
|
|
237
|
-
return o.
|
|
235
|
+
}), oe = s(() => {
|
|
236
|
+
var r, a;
|
|
237
|
+
return o.adaptive && (g.value.total > 0 || ((r = o.dataSource) == null ? void 0 : r.length)) ? {
|
|
238
238
|
y: l(J),
|
|
239
|
-
x: "100%"
|
|
240
|
-
} : {
|
|
239
|
+
x: ((a = o.scroll) == null ? void 0 : a.x) || "100%"
|
|
240
|
+
} : o.scroll ? o.scroll : {
|
|
241
241
|
x: !0
|
|
242
242
|
};
|
|
243
|
-
}), te =
|
|
243
|
+
}), te = s(() => {
|
|
244
244
|
var e;
|
|
245
245
|
if (o.tableLayout)
|
|
246
246
|
return o.tableLayout;
|
|
247
247
|
if ((e = o.columns) != null && e.some((r) => r.ellipsis))
|
|
248
248
|
return "fixed";
|
|
249
|
-
}), re =
|
|
249
|
+
}), re = s(() => {
|
|
250
250
|
var t;
|
|
251
251
|
const e = l(m), r = i(o.dataSource) ? e : {
|
|
252
252
|
...e,
|
|
@@ -265,12 +265,12 @@ const Ae = {
|
|
|
265
265
|
pagination: o.pagination === !1 ? !1 : l(m).pagination,
|
|
266
266
|
scroll: l(oe)
|
|
267
267
|
};
|
|
268
|
-
}), le =
|
|
268
|
+
}), le = s(() => [f(), o.card ? null : f("wrapper"), o.adaptive ? f("adaptive") : null].filter(Boolean));
|
|
269
269
|
function ne(e, r, a) {
|
|
270
|
-
if (
|
|
270
|
+
if (H.includes(e.valueType))
|
|
271
271
|
return a;
|
|
272
272
|
const t = Ve(r);
|
|
273
|
-
return e.copyable || e.ellipsis ? u(
|
|
273
|
+
return e.copyable || e.ellipsis ? u(be.Paragraph, {
|
|
274
274
|
copyable: e.copyable ? {
|
|
275
275
|
text: t,
|
|
276
276
|
tooltip: !1
|
|
@@ -288,29 +288,29 @@ const Ae = {
|
|
|
288
288
|
var r;
|
|
289
289
|
(r = o.onLoadingChange) == null || r.call(o, e);
|
|
290
290
|
});
|
|
291
|
-
function
|
|
291
|
+
function se(e) {
|
|
292
292
|
var r, a, t;
|
|
293
293
|
(t = (a = (r = R.value) == null ? void 0 : r.apForm) == null ? void 0 : a.setFieldsValue) == null || t.call(a, e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function de() {
|
|
296
296
|
var e, r, a;
|
|
297
297
|
return (a = (r = (e = R.value) == null ? void 0 : e.apForm) == null ? void 0 : r.getFieldsValue) == null ? void 0 : a.call(r, !0);
|
|
298
298
|
}
|
|
299
|
-
return
|
|
299
|
+
return G({
|
|
300
300
|
submit: () => L(),
|
|
301
301
|
reset: () => E(),
|
|
302
|
-
setSearchFormValues:
|
|
303
|
-
getSearchFormValues:
|
|
304
|
-
dataSource:
|
|
302
|
+
setSearchFormValues: se,
|
|
303
|
+
getSearchFormValues: de,
|
|
304
|
+
dataSource: s(() => l(g).records),
|
|
305
305
|
rowSelection: {
|
|
306
|
-
selectedRows:
|
|
306
|
+
selectedRows: s(() => l(N)),
|
|
307
307
|
...C
|
|
308
308
|
}
|
|
309
309
|
}), (e, r) => (c(), y("div", {
|
|
310
310
|
class: x(le.value)
|
|
311
311
|
}, [l(i)(e.dataSource) && e.searchForm !== !1 && I.value.length > 0 ? (c(), y("div", {
|
|
312
312
|
key: 0,
|
|
313
|
-
class: x(e.card ? l(
|
|
313
|
+
class: x(e.card ? l(h)("search-wrapper") : null),
|
|
314
314
|
style: F(e.searchFormWrapperStyle)
|
|
315
315
|
}, [u(l(Te).SearchForm, S(e.searchForm || {}, {
|
|
316
316
|
ref_key: "formRef",
|
|
@@ -320,7 +320,7 @@ const Ae = {
|
|
|
320
320
|
onReset: l(E),
|
|
321
321
|
"submit-loading": l(m).loading
|
|
322
322
|
}), j({
|
|
323
|
-
default: p(() => [(c(!0), y(D, null,
|
|
323
|
+
default: p(() => [(c(!0), y(D, null, A(I.value, (a) => (c(), me(ge(a.renderNode), S({
|
|
324
324
|
key: a.dataIndex,
|
|
325
325
|
ref_for: !0
|
|
326
326
|
}, a.fieldProps || {}, {
|
|
@@ -331,10 +331,10 @@ const Ae = {
|
|
|
331
331
|
name: "extra",
|
|
332
332
|
fn: p(() => [v(e.$slots, "searchFormExtra")]),
|
|
333
333
|
key: "0"
|
|
334
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
334
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : W("", !0), _("div", {
|
|
335
335
|
ref_key: "contentRef",
|
|
336
336
|
ref: X,
|
|
337
|
-
class: x([l(
|
|
337
|
+
class: x([l(h)("table-wrapper"), e.card ? l(h)("table-wrapper-card") : null]),
|
|
338
338
|
style: F(e.tableWrapperStyle)
|
|
339
339
|
}, [v(e.$slots, "title", S({
|
|
340
340
|
selectedRows: l(N),
|
|
@@ -344,27 +344,27 @@ const Ae = {
|
|
|
344
344
|
}, re.value, {
|
|
345
345
|
"table-layout": te.value,
|
|
346
346
|
onChange: l(ae),
|
|
347
|
-
columns:
|
|
347
|
+
columns: b.value
|
|
348
348
|
}), j({
|
|
349
349
|
headerCell: p(({
|
|
350
350
|
column: a,
|
|
351
351
|
title: t
|
|
352
|
-
}) => [a.tooltip ? (c(), y("span",
|
|
352
|
+
}) => [a.tooltip ? (c(), y("span", _e, [_("span", null, ye(t), 1), u(l(Ce), {
|
|
353
353
|
title: a.tooltip,
|
|
354
354
|
placement: "bottom"
|
|
355
355
|
}, {
|
|
356
356
|
default: p(() => [u(l(ve), {
|
|
357
357
|
style: F({
|
|
358
358
|
paddingLeft: "4px",
|
|
359
|
-
color: l(
|
|
359
|
+
color: l(M).colorPrimary
|
|
360
360
|
})
|
|
361
361
|
}, null, 8, ["style"])]),
|
|
362
362
|
_: 2
|
|
363
|
-
}, 1032, ["title"])])) :
|
|
363
|
+
}, 1032, ["title"])])) : W("", !0)]),
|
|
364
364
|
_: 2
|
|
365
|
-
}, [
|
|
365
|
+
}, [A(l(q)(P, ["title", "searchFormExtra"]), (a, t) => ({
|
|
366
366
|
name: t,
|
|
367
|
-
fn: p((n) => [v(e.$slots, t, Se(
|
|
367
|
+
fn: p((n) => [v(e.$slots, t, Se(he(n || {})))])
|
|
368
368
|
}))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
|
|
369
369
|
}
|
|
370
370
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps, MenuItemProps } from 'ant-design-vue';
|
|
2
|
-
import { DropdownButtonProps } from 'ant-design-vue/
|
|
2
|
+
import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
|
|
3
3
|
import { VNodeChild } from 'vue';
|
|
4
4
|
type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
|
|
5
5
|
type MixinButton<T> = Omit<T, 'type'> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { accessCreate } from '@aplus-frontend/oss';
|
|
2
2
|
import { PropType, DefineComponent, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
3
|
-
import { MouseEventHandler } from 'ant-design-vue/
|
|
3
|
+
import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
-
import { ImagePreviewType } from 'ant-design-vue/
|
|
5
|
+
import { ImagePreviewType } from 'ant-design-vue/es/vc-image';
|
|
6
6
|
declare const _default: DefineComponent<{
|
|
7
7
|
path: StringConstructor;
|
|
8
8
|
getOssAccess: PropType<() => Promise<accessCreate>>;
|
|
@@ -2,7 +2,7 @@ import { defineComponent as b, computed as s, ref as h, watchEffect as O, openBl
|
|
|
2
2
|
import { Image as I } from "ant-design-vue";
|
|
3
3
|
import { injectLocaleToOss as M, getOssInstance as S, getSignatureUrl as U } from "./hooks/useOss.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { imageProps as x } from "ant-design-vue/
|
|
5
|
+
import { imageProps as x } from "ant-design-vue/es/image";
|
|
6
6
|
import { omit as y } from "lodash-unified";
|
|
7
7
|
import B from "./imgs/admin-fallback.jpg.mjs";
|
|
8
8
|
import L from "./imgs/aplus-fallback.jpg.mjs";
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { VNode, DefineComponent, PropType, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
3
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
5
|
+
declare const _default: DefineComponent<{
|
|
6
|
+
helpMessage: {
|
|
7
|
+
type: PropType<VNode | string | undefined>;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
placement: {
|
|
11
|
+
type: PropType<TooltipPlacement>;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
iconColor: {
|
|
15
|
+
type: PropType<string>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
iconType: {
|
|
19
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
iconSize: {
|
|
23
|
+
type: PropType<number>;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
show: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
toolTipBgColor: {
|
|
31
|
+
type: PropType<string>;
|
|
32
|
+
};
|
|
33
|
+
count: VueTypeValidableDef<any> & {
|
|
34
|
+
default: any;
|
|
35
|
+
};
|
|
36
|
+
showZero: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
overflowCount: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
dot: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: any;
|
|
47
|
+
};
|
|
48
|
+
prefixCls: StringConstructor;
|
|
49
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
50
|
+
status: {
|
|
51
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
52
|
+
};
|
|
53
|
+
size: {
|
|
54
|
+
type: PropType<"default" | "small">;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
58
|
+
text: VueTypeValidableDef<any>;
|
|
59
|
+
offset: PropType<[string | number, string | number]>;
|
|
60
|
+
numberStyle: {
|
|
61
|
+
type: PropType<CSSProperties>;
|
|
62
|
+
default: CSSProperties;
|
|
63
|
+
};
|
|
64
|
+
title: StringConstructor;
|
|
65
|
+
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
66
|
+
helpMessage: {
|
|
67
|
+
type: PropType<VNode | string | undefined>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
placement: {
|
|
71
|
+
type: PropType<TooltipPlacement>;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
iconColor: {
|
|
75
|
+
type: PropType<string>;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
iconType: {
|
|
79
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
iconSize: {
|
|
83
|
+
type: PropType<number>;
|
|
84
|
+
default: number;
|
|
85
|
+
};
|
|
86
|
+
show: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
toolTipBgColor: {
|
|
91
|
+
type: PropType<string>;
|
|
92
|
+
};
|
|
93
|
+
count: VueTypeValidableDef<any> & {
|
|
94
|
+
default: any;
|
|
95
|
+
};
|
|
96
|
+
showZero: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: any;
|
|
99
|
+
};
|
|
100
|
+
overflowCount: {
|
|
101
|
+
type: NumberConstructor;
|
|
102
|
+
default: number;
|
|
103
|
+
};
|
|
104
|
+
dot: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
default: any;
|
|
107
|
+
};
|
|
108
|
+
prefixCls: StringConstructor;
|
|
109
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
110
|
+
status: {
|
|
111
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
112
|
+
};
|
|
113
|
+
size: {
|
|
114
|
+
type: PropType<"default" | "small">;
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
118
|
+
text: VueTypeValidableDef<any>;
|
|
119
|
+
offset: PropType<[string | number, string | number]>;
|
|
120
|
+
numberStyle: {
|
|
121
|
+
type: PropType<CSSProperties>;
|
|
122
|
+
default: CSSProperties;
|
|
123
|
+
};
|
|
124
|
+
title: StringConstructor;
|
|
125
|
+
}>>, {
|
|
126
|
+
size: "small" | "default";
|
|
127
|
+
placement: TooltipPlacement;
|
|
128
|
+
iconType: "ellipsis" | "success" | "warning" | "question";
|
|
129
|
+
iconSize: number;
|
|
130
|
+
show: boolean;
|
|
131
|
+
dot: boolean;
|
|
132
|
+
helpMessage: string | VNode< RendererNode, RendererElement, {
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}> | undefined;
|
|
135
|
+
count: any;
|
|
136
|
+
showZero: boolean;
|
|
137
|
+
overflowCount: number;
|
|
138
|
+
numberStyle: CSSProperties;
|
|
139
|
+
iconColor: string;
|
|
140
|
+
}, {}>;
|
|
141
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as c, useSlots as r, computed as m, createVNode as e, mergeProps as d } from "vue";
|
|
2
|
+
import { Tooltip as f, Badge as p } from "ant-design-vue";
|
|
3
|
+
import { IconApAdLineAnnotation as A, IconApAdFillWarn as y, IconApAdFillExecution as v, IconApAdFillSuccessful as b } from "@aplus-frontend/icon";
|
|
4
|
+
import "../../config-provider/index.mjs";
|
|
5
|
+
import { ApLabelProps as g } from "./constans.mjs";
|
|
6
|
+
import { omit as T } from "lodash-unified";
|
|
7
|
+
import "./style.css";
|
|
8
|
+
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
const B = /* @__PURE__ */ c({
|
|
10
|
+
name: "ApLabel",
|
|
11
|
+
props: g(),
|
|
12
|
+
setup(l) {
|
|
13
|
+
const {
|
|
14
|
+
b: s,
|
|
15
|
+
e: i
|
|
16
|
+
} = x("ap-label"), o = r(), n = m(() => ({
|
|
17
|
+
color: l.iconColor,
|
|
18
|
+
"font-size": l.iconSize + "px",
|
|
19
|
+
"margin-left": "4px",
|
|
20
|
+
display: "inline-flex"
|
|
21
|
+
})), a = (u, t) => u ? e(f, {
|
|
22
|
+
title: u,
|
|
23
|
+
placement: t.placement || "top",
|
|
24
|
+
color: t.toolTipBgColor
|
|
25
|
+
}, {
|
|
26
|
+
default: () => [t.iconType === "question" && e(A, {
|
|
27
|
+
style: n.value
|
|
28
|
+
}, null), t.iconType === "warning" && e(y, {
|
|
29
|
+
style: n.value
|
|
30
|
+
}, null), t.iconType === "ellipsis" && e(v, {
|
|
31
|
+
style: n.value
|
|
32
|
+
}, null), t.iconType === "success" && e(b, {
|
|
33
|
+
style: n.value
|
|
34
|
+
}, null)]
|
|
35
|
+
}) : null;
|
|
36
|
+
return () => e("div", null, [l.show ? e("div", {
|
|
37
|
+
class: [s()]
|
|
38
|
+
}, [e("div", {
|
|
39
|
+
class: [i("content")]
|
|
40
|
+
}, [e(p, d(T(l, ["helpMessage", "placement", "iconColor"]), {
|
|
41
|
+
status: l.status ? l.status : "default"
|
|
42
|
+
}), null), o.default ? o.default() : a(l.helpMessage, l)]), o.custom ? e("div", {
|
|
43
|
+
class: [i("custom")]
|
|
44
|
+
}, [o.custom()]) : null]) : null]);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
B as default
|
|
49
|
+
};
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { defineComponent as n, createVNode as o, mergeProps as l, createTextVNode as m } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import "./ApLabel.
|
|
3
|
+
import f from "./ApLabel.mjs";
|
|
4
4
|
import { omit as t } from "lodash-unified";
|
|
5
|
-
import { ApLabelGroupProps as
|
|
6
|
-
import { Tag as
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import i from "./ApLabel.vue2.mjs";
|
|
5
|
+
import { ApLabelGroupProps as s } from "./constans.mjs";
|
|
6
|
+
import { Tag as c } from "ant-design-vue";
|
|
7
|
+
import { useNamespace as g } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
8
|
const {
|
|
10
|
-
b:
|
|
11
|
-
} =
|
|
9
|
+
b: p
|
|
10
|
+
} = g("ap-label-group"), x = /* @__PURE__ */ n({
|
|
12
11
|
name: "ApLabelGroup",
|
|
13
|
-
props:
|
|
12
|
+
props: s(),
|
|
14
13
|
setup(r) {
|
|
15
|
-
const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(
|
|
14
|
+
const a = (e) => (r.tagValue || r.tagValue === 0) && e.tagConfig && e.tagConfig.length > 0 ? () => e.tagConfig.filter((u) => r.tagValue === u.value).map((u) => o(c, t(u, ["text"]), {
|
|
16
15
|
default: () => [u.text]
|
|
17
16
|
})) : e.customRender ? () => o("div", null, [e.customRender(r.record)]) : null;
|
|
18
17
|
return () => o("div", {
|
|
19
|
-
class:
|
|
20
|
-
}, [r.columns ? r.columns.map((e, u) => o(
|
|
18
|
+
class: p()
|
|
19
|
+
}, [r.columns ? r.columns.map((e, u) => o(f, l({
|
|
21
20
|
key: u,
|
|
22
21
|
show: r.value === e.value
|
|
23
22
|
}, t(e, ["value", "tagConfig", "customRender"])), {
|
|
@@ -26,5 +25,5 @@ const {
|
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
x as default
|
|
30
29
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { PropType, VNode, CSSProperties } from 'vue';
|
|
2
2
|
import { ApLabelGroupItemProps } from './interface';
|
|
3
|
+
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
4
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
+
import { LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
3
6
|
export declare const ApLabelGroupProps: () => {
|
|
4
7
|
value: {
|
|
5
8
|
type: PropType<string | number | undefined>;
|
|
@@ -18,3 +21,64 @@ export declare const ApLabelGroupProps: () => {
|
|
|
18
21
|
default: null;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
24
|
+
export declare const ApLabelProps: () => {
|
|
25
|
+
helpMessage: {
|
|
26
|
+
type: PropType<VNode | string | undefined>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
placement: {
|
|
30
|
+
type: PropType<TooltipPlacement>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
iconColor: {
|
|
34
|
+
type: PropType<string>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
iconType: {
|
|
38
|
+
type: PropType<"question" | "warning" | "ellipsis" | "success">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
iconSize: {
|
|
42
|
+
type: PropType<number>;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
show: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
toolTipBgColor: {
|
|
50
|
+
type: PropType<string>;
|
|
51
|
+
};
|
|
52
|
+
count: VueTypeValidableDef<any> & {
|
|
53
|
+
default: any;
|
|
54
|
+
};
|
|
55
|
+
showZero: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: any;
|
|
58
|
+
};
|
|
59
|
+
overflowCount: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
63
|
+
dot: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: any;
|
|
66
|
+
};
|
|
67
|
+
prefixCls: StringConstructor;
|
|
68
|
+
scrollNumberPrefixCls: StringConstructor;
|
|
69
|
+
status: {
|
|
70
|
+
type: PropType<"error" | "default" | "success" | "processing" | "warning">;
|
|
71
|
+
};
|
|
72
|
+
size: {
|
|
73
|
+
type: PropType<"default" | "small">;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
color: PropType< LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
|
|
77
|
+
text: VueTypeValidableDef<any>;
|
|
78
|
+
offset: PropType<[string | number, string | number]>;
|
|
79
|
+
numberStyle: {
|
|
80
|
+
type: PropType< CSSProperties>;
|
|
81
|
+
default: CSSProperties;
|
|
82
|
+
};
|
|
83
|
+
title: StringConstructor;
|
|
84
|
+
};
|