@aplus-frontend/ui 7.10.4 → 7.10.5
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-field/interface.d.ts +1 -1
- package/es/src/ap-field/slider/index.vue.d.ts +196 -412
- package/es/src/ap-field/slider/index.vue.mjs +50 -39
- package/es/src/business/ap-attachment/ApAttachment.d.ts +2 -8
- package/es/src/business/ap-attachment/ApAttachment.mjs +46 -40
- package/es/src/business/ap-attachment/constans.d.ts +1 -4
- package/es/src/business/ap-attachment/constans.mjs +3 -6
- package/es/src/business/ap-attachment/index.d.ts +3 -12
- package/es/src/business/ap-ladder/components/RenderValue.mjs +25 -22
- package/es/src/business/ap-ladder/utils.d.ts +1 -0
- package/es/src/business/ap-ladder/utils.mjs +10 -9
- package/es/src/business/ap-title/ApTitle.vue.d.ts +1 -1
- package/es/src/business/ap-title/index.d.ts +3 -3
- package/es/src/business/ap-title/interface.d.ts +1 -1
- package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/es/src/business/ap-upload/apUpload.vue.mjs +22 -18
- package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -123
- package/es/src/business/ap-upload/components/Picture.vue2.mjs +150 -147
- package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +130 -127
- package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/es/src/business/ap-upload/hooks/useOss.mjs +52 -51
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +11 -10
- package/es/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
- package/es/src/business/ap-upload-file/hook/useOss.mjs +19 -16
- package/es/src/business/ap-upload-file/interface.d.ts +3 -1
- package/es/src/business/ap-upload-file/utils/upload.mjs +22 -20
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/interface.d.ts +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +196 -412
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.d.ts +2 -8
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/constans.d.ts +1 -4
- package/lib/src/business/ap-attachment/constans.js +1 -1
- package/lib/src/business/ap-attachment/index.d.ts +3 -12
- package/lib/src/business/ap-ladder/components/RenderValue.js +1 -1
- package/lib/src/business/ap-ladder/utils.d.ts +1 -0
- package/lib/src/business/ap-ladder/utils.js +1 -1
- package/lib/src/business/ap-title/ApTitle.vue.d.ts +1 -1
- package/lib/src/business/ap-title/index.d.ts +3 -3
- package/lib/src/business/ap-title/interface.d.ts +1 -1
- package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
- package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
- package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
- package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
- package/lib/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
- package/lib/src/business/ap-upload-file/hook/useOss.js +1 -1
- package/lib/src/business/ap-upload-file/interface.d.ts +3 -1
- package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,65 +1,76 @@
|
|
|
1
|
-
import { defineComponent as B, useSlots as x, shallowRef as
|
|
2
|
-
import { Slider as
|
|
3
|
-
import { isNil as
|
|
1
|
+
import { defineComponent as B, useSlots as x, shallowRef as C, computed as b, unref as t, createElementBlock as g, createBlock as k, openBlock as n, Fragment as F, createTextVNode as S, toDisplayString as h, mergeProps as T, createSlots as V, renderList as _, withCtx as P, renderSlot as R, normalizeProps as N, guardReactiveProps as U } from "vue";
|
|
2
|
+
import { Slider as A } from "@aplus-frontend/antdv";
|
|
3
|
+
import { isNil as H, isArray as L, omit as $ } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
|
-
import { useControllableValue as
|
|
6
|
-
const
|
|
5
|
+
import { useControllableValue as w } from "../../hooks/useControllableValue.mjs";
|
|
6
|
+
const G = /* @__PURE__ */ B({
|
|
7
7
|
name: "ApFieldSlider",
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
mode: {},
|
|
11
11
|
class: {},
|
|
12
12
|
style: {},
|
|
13
|
-
|
|
13
|
+
range: { type: [Boolean, Object] },
|
|
14
|
+
value: {},
|
|
15
|
+
defaultValue: {},
|
|
16
|
+
onChange: {},
|
|
17
|
+
"onUpdate:value": {},
|
|
18
|
+
onAfterChange: {},
|
|
19
|
+
onChangeComplete: {},
|
|
20
|
+
handleStyle: {},
|
|
21
|
+
trackStyle: {},
|
|
14
22
|
prefixCls: {},
|
|
15
|
-
tooltipPrefixCls: {},
|
|
16
|
-
range: {},
|
|
17
23
|
reverse: { type: Boolean },
|
|
18
24
|
min: { default: 0 },
|
|
19
25
|
max: { default: 100 },
|
|
20
26
|
step: { default: 1 },
|
|
21
27
|
marks: {},
|
|
22
28
|
dots: { type: Boolean },
|
|
23
|
-
value: {},
|
|
24
|
-
defaultValue: {},
|
|
25
29
|
included: { type: Boolean, default: !0 },
|
|
26
30
|
disabled: { type: Boolean, default: void 0 },
|
|
31
|
+
keyboard: { type: Boolean },
|
|
27
32
|
vertical: { type: Boolean },
|
|
33
|
+
className: {},
|
|
34
|
+
rootClassName: {},
|
|
35
|
+
id: {},
|
|
36
|
+
tooltip: {},
|
|
37
|
+
autoFocus: { type: Boolean },
|
|
38
|
+
styles: {},
|
|
39
|
+
classNames: {},
|
|
40
|
+
onFocus: {},
|
|
41
|
+
onBlur: {},
|
|
42
|
+
tooltipPrefixCls: {},
|
|
28
43
|
tipFormatter: {},
|
|
29
|
-
tooltipOpen: { type: Boolean, default: void 0 },
|
|
30
44
|
tooltipVisible: { type: Boolean, default: void 0 },
|
|
31
|
-
tooltipPlacement: {},
|
|
32
45
|
getTooltipPopupContainer: {},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onBlur: {},
|
|
40
|
-
"onUpdate:value": {},
|
|
46
|
+
tooltipPlacement: {},
|
|
47
|
+
tabIndex: {},
|
|
48
|
+
ariaLabelForHandle: {},
|
|
49
|
+
ariaLabelledByForHandle: {},
|
|
50
|
+
ariaRequired: { type: Boolean },
|
|
51
|
+
ariaValueTextFormatterForHandle: {},
|
|
41
52
|
emptyText: { default: "--" }
|
|
42
53
|
},
|
|
43
54
|
emits: ["update:value"],
|
|
44
|
-
setup(
|
|
45
|
-
const p = x(), o =
|
|
46
|
-
const e = t(
|
|
47
|
-
return
|
|
55
|
+
setup(s, { expose: u, emit: i }) {
|
|
56
|
+
const p = x(), o = C(), a = s, d = i, { value: l, updateValue: m } = w(a, d), c = b(() => {
|
|
57
|
+
const e = t(l);
|
|
58
|
+
return H(e) ? a.emptyText : L(e) ? `${e[0]}-${e[1]}` : e;
|
|
48
59
|
});
|
|
49
|
-
function
|
|
60
|
+
function f() {
|
|
50
61
|
o.value?.focus?.();
|
|
51
62
|
}
|
|
52
|
-
function
|
|
63
|
+
function y() {
|
|
53
64
|
o.value?.blur?.();
|
|
54
65
|
}
|
|
55
|
-
return
|
|
56
|
-
focus:
|
|
57
|
-
blur:
|
|
58
|
-
}), (e,
|
|
59
|
-
h(
|
|
60
|
-
], 64)) : (n(),
|
|
66
|
+
return u({
|
|
67
|
+
focus: f,
|
|
68
|
+
blur: y
|
|
69
|
+
}), (e, j) => e.mode === "read" ? (n(), g(F, { key: 0 }, [
|
|
70
|
+
S(h(c.value), 1)
|
|
71
|
+
], 64)) : (n(), k(t(A), T(
|
|
61
72
|
{ key: 1 },
|
|
62
|
-
t(
|
|
73
|
+
t($)(a, [
|
|
63
74
|
"value",
|
|
64
75
|
"onUpdate:value",
|
|
65
76
|
"mode",
|
|
@@ -69,19 +80,19 @@ const I = /* @__PURE__ */ B({
|
|
|
69
80
|
{
|
|
70
81
|
ref_key: "sliderRef",
|
|
71
82
|
ref: o,
|
|
72
|
-
value: t(
|
|
73
|
-
"onUpdate:value": t(
|
|
83
|
+
value: t(l),
|
|
84
|
+
"onUpdate:value": t(m)
|
|
74
85
|
}
|
|
75
86
|
), V({ _: 2 }, [
|
|
76
|
-
|
|
87
|
+
_(p, (q, r) => ({
|
|
77
88
|
name: r,
|
|
78
|
-
fn:
|
|
79
|
-
|
|
89
|
+
fn: P((v) => [
|
|
90
|
+
R(e.$slots, r, N(U(v || {})))
|
|
80
91
|
])
|
|
81
92
|
}))
|
|
82
93
|
]), 1040, ["value", "onUpdate:value"]));
|
|
83
94
|
}
|
|
84
95
|
});
|
|
85
96
|
export {
|
|
86
|
-
|
|
97
|
+
G as default
|
|
87
98
|
};
|
|
@@ -31,10 +31,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
31
31
|
nameKey?: string;
|
|
32
32
|
pathKey?: string;
|
|
33
33
|
}>;
|
|
34
|
-
default:
|
|
35
|
-
nameKey: string;
|
|
36
|
-
pathKey: string;
|
|
37
|
-
};
|
|
34
|
+
default: undefined;
|
|
38
35
|
};
|
|
39
36
|
getOssAccess: {
|
|
40
37
|
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
@@ -76,10 +73,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
76
73
|
nameKey?: string;
|
|
77
74
|
pathKey?: string;
|
|
78
75
|
}>;
|
|
79
|
-
default:
|
|
80
|
-
nameKey: string;
|
|
81
|
-
pathKey: string;
|
|
82
|
-
};
|
|
76
|
+
default: undefined;
|
|
83
77
|
};
|
|
84
78
|
getOssAccess: {
|
|
85
79
|
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { LoadingOutlined as
|
|
1
|
+
import { defineComponent as U, ref as k, useSlots as W, computed as o, cloneVNode as _, toRaw as g, unref as j, createVNode as t, createTextVNode as R } from "vue";
|
|
2
|
+
import { LoadingOutlined as p } from "@ant-design/icons-vue";
|
|
3
3
|
import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
|
|
4
4
|
import { debounce as H, isArray as M } from "lodash-unified";
|
|
5
5
|
import { useToken as q } from "../../config-provider/hooks/use-token.mjs";
|
|
@@ -12,44 +12,50 @@ import X from "./style/index.mjs";
|
|
|
12
12
|
import { useNamespace as Y } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import { useGlobalConfig as T } from "../../config-provider/hooks/use-global-config.mjs";
|
|
14
14
|
import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
|
|
15
|
-
const fe = /* @__PURE__ */
|
|
15
|
+
const fe = /* @__PURE__ */ U({
|
|
16
16
|
name: "ApAttachment",
|
|
17
17
|
props: Q(),
|
|
18
18
|
setup(e, {
|
|
19
|
-
emit:
|
|
19
|
+
emit: N
|
|
20
20
|
}) {
|
|
21
21
|
const {
|
|
22
22
|
b: x,
|
|
23
23
|
e: a
|
|
24
|
-
} = Y("ap-attachment"),
|
|
25
|
-
token:
|
|
24
|
+
} = Y("ap-attachment"), y = X("ap-attachment"), r = T("apUpload"), L = T("downloadCenterTriggerConfig"), {
|
|
25
|
+
token: C
|
|
26
26
|
} = q(), {
|
|
27
27
|
lang: O,
|
|
28
|
-
t:
|
|
29
|
-
} = Z(), i = k(!1), c = k(""),
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
t: d
|
|
29
|
+
} = Z(), i = k(!1), c = k(""), f = W(), K = o(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), s = o(() => e.needName ?? (r?.value?.needName === !0 ? {
|
|
30
|
+
nameKey: "fileName",
|
|
31
|
+
pathKey: "path"
|
|
32
|
+
} : r?.value?.needName ?? {
|
|
33
|
+
nameKey: "fileName",
|
|
34
|
+
pathKey: "filePath"
|
|
35
|
+
})), v = o(() => e.attachmentList.length === 1), w = o(() => s.value ? e.attachmentList.length > 0 && s.value && s.value?.nameKey ? e.attachmentList[0][s.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), P = o(() => v.value ? w.value : d("ap.apAttachment.downloadall")), A = o(() => ({
|
|
36
|
+
"--download-main-color": C.value?.colorLink,
|
|
37
|
+
"--download-main-color-opacity": J(C.value?.colorLink, 0.6)
|
|
38
|
+
})), I = o(() => e.getOssAccess || r.value?.getOssAccess), S = o(() => {
|
|
39
|
+
const l = f.default ? f.default()[0] : null;
|
|
40
|
+
return l ? _(l, {
|
|
35
41
|
style: {
|
|
36
42
|
"font-size": "16px"
|
|
37
43
|
}
|
|
38
44
|
}) : null;
|
|
39
|
-
}),
|
|
45
|
+
}), h = H(async (l, u) => {
|
|
40
46
|
if (!e.disabled) {
|
|
41
|
-
i.value = !0,
|
|
47
|
+
i.value = !0, u && (c.value = u);
|
|
42
48
|
try {
|
|
43
|
-
const n = M(
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
49
|
+
const n = M(g(l)) ? g(l) : [g(l)];
|
|
50
|
+
if (L.value?.trigger) {
|
|
51
|
+
const m = F(s.value, n).map((b) => ({
|
|
46
52
|
objectName: b.path,
|
|
47
53
|
fileName: b.fileName
|
|
48
54
|
}));
|
|
49
|
-
|
|
55
|
+
L.value?.trigger(m), N("downloadCallback", m);
|
|
50
56
|
} else {
|
|
51
|
-
const
|
|
52
|
-
|
|
57
|
+
const m = await (await E(I.value, j(K))).downloadFile(F(e.needName, n));
|
|
58
|
+
N("downloadCallback", m);
|
|
53
59
|
}
|
|
54
60
|
} catch (n) {
|
|
55
61
|
D(!1, n);
|
|
@@ -57,56 +63,56 @@ const fe = /* @__PURE__ */ W({
|
|
|
57
63
|
i.value = !1, c.value = "";
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
|
-
}, 500),
|
|
61
|
-
class: [a("file-list"),
|
|
66
|
+
}, 500), V = (l) => l && l.length > 0 ? t("ul", {
|
|
67
|
+
class: [a("file-list"), y.value],
|
|
62
68
|
style: A.value
|
|
63
|
-
}, [l.map((
|
|
69
|
+
}, [l.map((u, n) => t("li", {
|
|
64
70
|
key: n,
|
|
65
71
|
class: [a("file-item")],
|
|
66
|
-
onClick: () =>
|
|
72
|
+
onClick: () => h(u, n + 1)
|
|
67
73
|
}, [i.value && c.value === n + 1 ? t("span", {
|
|
68
74
|
class: [a("spin")]
|
|
69
|
-
}, [t(
|
|
75
|
+
}, [t(p, {
|
|
70
76
|
spin: !0
|
|
71
|
-
}, null)]) : null,
|
|
77
|
+
}, null)]) : null, u.fileName])), t("li", {
|
|
72
78
|
class: [a("download-all")],
|
|
73
|
-
onClick: () =>
|
|
79
|
+
onClick: () => h(e.attachmentList, "all")
|
|
74
80
|
}, [i.value && c.value === "all" ? t("span", {
|
|
75
81
|
class: [a("spin")]
|
|
76
|
-
}, [t(
|
|
82
|
+
}, [t(p, {
|
|
77
83
|
spin: !0
|
|
78
|
-
}, null)]) : null,
|
|
84
|
+
}, null)]) : null, d("ap.apAttachment.downloadall")])]) : null;
|
|
79
85
|
return () => e.attachmentList?.length > 0 && t("div", {
|
|
80
|
-
class: [x(),
|
|
86
|
+
class: [x(), y.value],
|
|
81
87
|
style: [A.value]
|
|
82
88
|
}, [t(B, {
|
|
83
|
-
title:
|
|
89
|
+
title: P.value,
|
|
84
90
|
placement: e.textToolTipPlacement,
|
|
85
91
|
color: e.toolTipBgColor
|
|
86
92
|
}, {
|
|
87
93
|
default: () => [t("div", {
|
|
88
94
|
class: [a("content")],
|
|
89
|
-
onClick: () => v
|
|
95
|
+
onClick: () => h(v.value ? e.attachmentList[0] : e.attachmentList, "global")
|
|
90
96
|
}, [i.value && c.value === "global" ? t("div", {
|
|
91
97
|
class: [a("spin")]
|
|
92
|
-
}, [t(
|
|
98
|
+
}, [t(p, {
|
|
93
99
|
spin: !0
|
|
94
|
-
}, null)]) : null,
|
|
100
|
+
}, null)]) : null, f.default ? t("div", {
|
|
95
101
|
class: [a("text-render")]
|
|
96
|
-
}, [
|
|
102
|
+
}, [S.value, R(" ")]) : null, t("div", {
|
|
97
103
|
class: [a("text-inner")],
|
|
98
104
|
style: {
|
|
99
105
|
"max-width": e.maxWidth ? e.maxWidth + "px" : "auto"
|
|
100
106
|
}
|
|
101
|
-
}, [
|
|
107
|
+
}, [w.value])])]
|
|
102
108
|
}), t(G, {
|
|
103
|
-
content:
|
|
109
|
+
content: V(e.attachmentList),
|
|
104
110
|
placement: e.fileMorePopoverPlacement,
|
|
105
111
|
color: "#fff"
|
|
106
112
|
}, {
|
|
107
|
-
default: () => [!
|
|
113
|
+
default: () => [!v.value && t("div", {
|
|
108
114
|
class: [a("more")]
|
|
109
|
-
}, [
|
|
115
|
+
}, [d("ap.apAttachment.more")])]
|
|
110
116
|
})]);
|
|
111
117
|
}
|
|
112
118
|
});
|
|
@@ -30,10 +30,7 @@ export declare const ApAttachmentProps: () => {
|
|
|
30
30
|
nameKey?: string;
|
|
31
31
|
pathKey?: string;
|
|
32
32
|
}>;
|
|
33
|
-
default:
|
|
34
|
-
nameKey: string;
|
|
35
|
-
pathKey: string;
|
|
36
|
-
};
|
|
33
|
+
default: undefined;
|
|
37
34
|
};
|
|
38
35
|
getOssAccess: {
|
|
39
36
|
type: PropType<_ApAttachmentProps["getOssAccess"]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = () => ({
|
|
2
2
|
attachmentList: {
|
|
3
3
|
type: Array,
|
|
4
4
|
default: [],
|
|
@@ -25,10 +25,7 @@ const e = () => ({
|
|
|
25
25
|
},
|
|
26
26
|
needName: {
|
|
27
27
|
type: Object,
|
|
28
|
-
default:
|
|
29
|
-
nameKey: "fileName",
|
|
30
|
-
pathKey: "filePath"
|
|
31
|
-
})
|
|
28
|
+
default: void 0
|
|
32
29
|
},
|
|
33
30
|
getOssAccess: {
|
|
34
31
|
type: Function
|
|
@@ -42,5 +39,5 @@ const e = () => ({
|
|
|
42
39
|
}
|
|
43
40
|
});
|
|
44
41
|
export {
|
|
45
|
-
|
|
42
|
+
t as ApAttachmentProps
|
|
46
43
|
};
|
|
@@ -33,10 +33,7 @@ declare const ApAttachment: {
|
|
|
33
33
|
nameKey?: string;
|
|
34
34
|
pathKey?: string;
|
|
35
35
|
}>;
|
|
36
|
-
default:
|
|
37
|
-
nameKey: string;
|
|
38
|
-
pathKey: string;
|
|
39
|
-
};
|
|
36
|
+
default: undefined;
|
|
40
37
|
};
|
|
41
38
|
getOssAccess: {
|
|
42
39
|
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
@@ -96,10 +93,7 @@ declare const ApAttachment: {
|
|
|
96
93
|
nameKey?: string;
|
|
97
94
|
pathKey?: string;
|
|
98
95
|
}>;
|
|
99
|
-
default:
|
|
100
|
-
nameKey: string;
|
|
101
|
-
pathKey: string;
|
|
102
|
-
};
|
|
96
|
+
default: undefined;
|
|
103
97
|
};
|
|
104
98
|
getOssAccess: {
|
|
105
99
|
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
@@ -156,10 +150,7 @@ declare const ApAttachment: {
|
|
|
156
150
|
nameKey?: string;
|
|
157
151
|
pathKey?: string;
|
|
158
152
|
}>;
|
|
159
|
-
default:
|
|
160
|
-
nameKey: string;
|
|
161
|
-
pathKey: string;
|
|
162
|
-
};
|
|
153
|
+
default: undefined;
|
|
163
154
|
};
|
|
164
155
|
getOssAccess: {
|
|
165
156
|
type: PropType< ApAttachmentProps["getOssAccess"]>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, createVNode as e, Fragment as o } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { ApCopy as d } from "../../ap-copy/index.mjs";
|
|
4
|
+
import { isConstLabel as v, convertValue as n, renderValue as C, isVNodeOrFunction as k } from "../utils.mjs";
|
|
5
|
+
import { useNamespace as V } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const h = /* @__PURE__ */ p({
|
|
6
7
|
name: "ApLadderValues",
|
|
7
8
|
props: {
|
|
8
9
|
labelValue: {
|
|
@@ -21,24 +22,30 @@ const f = /* @__PURE__ */ c({
|
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
|
-
setup(
|
|
25
|
-
emit:
|
|
25
|
+
setup(r, {
|
|
26
|
+
emit: i
|
|
26
27
|
}) {
|
|
27
28
|
return () => {
|
|
28
29
|
const {
|
|
29
30
|
labelValue: l,
|
|
30
|
-
labelValues:
|
|
31
|
-
} =
|
|
31
|
+
labelValues: s
|
|
32
|
+
} = r, u = v(l.label) ? e(d, {
|
|
33
|
+
text: n(l.value, {
|
|
34
|
+
...l
|
|
35
|
+
})
|
|
36
|
+
}, null) : n(l.value, {
|
|
37
|
+
...l
|
|
38
|
+
}), {
|
|
32
39
|
e: a
|
|
33
|
-
} =
|
|
34
|
-
|
|
40
|
+
} = V("ap-ladder"), c = (t) => {
|
|
41
|
+
i("handleClick", t);
|
|
35
42
|
};
|
|
36
|
-
return e(
|
|
43
|
+
return e(o, null, [e("span", {
|
|
37
44
|
class: a("value-group-value"),
|
|
38
45
|
title: String(n(l.value, {
|
|
39
46
|
...l
|
|
40
47
|
}))
|
|
41
|
-
}, [
|
|
48
|
+
}, [k(l.value) ? C(l.value) : l.link ? e("a", {
|
|
42
49
|
href: l.link,
|
|
43
50
|
target: "_blank",
|
|
44
51
|
class: a("value-group-link"),
|
|
@@ -46,23 +53,19 @@ const f = /* @__PURE__ */ c({
|
|
|
46
53
|
style: l.linkColor ? {
|
|
47
54
|
color: l.linkColor
|
|
48
55
|
} : null,
|
|
49
|
-
onClick: (
|
|
50
|
-
|
|
56
|
+
onClick: (t) => {
|
|
57
|
+
t.preventDefault(), c(l);
|
|
51
58
|
}
|
|
52
|
-
}, [
|
|
53
|
-
...l
|
|
54
|
-
})]) : e(t, null, [e("span", {
|
|
59
|
+
}, [u]) : e(o, null, [e("span", {
|
|
55
60
|
class: [l.handleValueClick ? a("value-group-link") : null],
|
|
56
61
|
title: String(l.value),
|
|
57
62
|
style: l.valueColor ? {
|
|
58
63
|
color: l.valueColor
|
|
59
64
|
} : null,
|
|
60
65
|
onClick: () => {
|
|
61
|
-
l.handleValueClick && l.handleValueClick(
|
|
66
|
+
l.handleValueClick && l.handleValueClick(s);
|
|
62
67
|
}
|
|
63
|
-
}, [
|
|
64
|
-
...l
|
|
65
|
-
})]), l.unit && e("span", {
|
|
68
|
+
}, [u]), l.unit && e("span", {
|
|
66
69
|
class: a("value-group-unit"),
|
|
67
70
|
title: String(n(l.value, {
|
|
68
71
|
...l
|
|
@@ -75,5 +78,5 @@ const f = /* @__PURE__ */ c({
|
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
h as default
|
|
79
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isVNode as
|
|
1
|
+
import { isVNode as n, h as e } from "vue";
|
|
2
2
|
import { locales as o } from "./interface.mjs";
|
|
3
|
-
const
|
|
3
|
+
const s = (r) => r == null || typeof r == "string" && r.trim() === "", y = (r, t = {}) => typeof r == "string" || typeof r == "number" ? String(r) + JSON.stringify(t) : "complex-value", d = (r, t = {
|
|
4
4
|
rawValue: !0,
|
|
5
5
|
precision: 2,
|
|
6
6
|
thousand: !0,
|
|
@@ -24,8 +24,8 @@ const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t
|
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
if (t.thousand) {
|
|
27
|
-
const [
|
|
28
|
-
return `${
|
|
27
|
+
const [c, i] = r.toFixed(t.precision ? t.precision : 2).split(".");
|
|
28
|
+
return `${c.replace(
|
|
29
29
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
30
30
|
`$1${t.thousandSeparator ? t.thousandSeparator : ","}`
|
|
31
31
|
)}.${i}`;
|
|
@@ -33,11 +33,12 @@ const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t
|
|
|
33
33
|
return r.toFixed(t.precision ? t.precision : 2);
|
|
34
34
|
}
|
|
35
35
|
return r;
|
|
36
|
-
},
|
|
36
|
+
}, p = (r) => n(r) || typeof r == "function", a = (r) => n(r) ? e(r) : typeof r == "function" ? e(r()) : null, l = (r) => ["ASIN", "MSKU", "aSKU", "SKU"].includes(r);
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
s as
|
|
38
|
+
d as convertValue,
|
|
39
|
+
y as createMemoizeKey,
|
|
40
|
+
l as isConstLabel,
|
|
41
|
+
s as isNull,
|
|
42
|
+
p as isVNodeOrFunction,
|
|
42
43
|
a as renderValue
|
|
43
44
|
};
|
|
@@ -14,7 +14,7 @@ declare const __VLS_component: DefineComponent<ApTitleProps, {}, {}, {}, {}, Com
|
|
|
14
14
|
title: string;
|
|
15
15
|
placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
16
16
|
trigger: "hover" | "focus" | "click" | "contextmenu";
|
|
17
|
-
helpMessage:
|
|
17
|
+
helpMessage: any;
|
|
18
18
|
helpIconColor: string;
|
|
19
19
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -6,7 +6,7 @@ declare const ApTitle: {
|
|
|
6
6
|
title: string;
|
|
7
7
|
placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
8
8
|
trigger: "hover" | "focus" | "click" | "contextmenu";
|
|
9
|
-
helpMessage:
|
|
9
|
+
helpMessage: any;
|
|
10
10
|
helpIconColor: string;
|
|
11
11
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
12
12
|
P: {};
|
|
@@ -19,7 +19,7 @@ declare const ApTitle: {
|
|
|
19
19
|
title: string;
|
|
20
20
|
placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
21
21
|
trigger: "hover" | "focus" | "click" | "contextmenu";
|
|
22
|
-
helpMessage:
|
|
22
|
+
helpMessage: any;
|
|
23
23
|
helpIconColor: string;
|
|
24
24
|
}>;
|
|
25
25
|
__isFragment?: never;
|
|
@@ -29,7 +29,7 @@ declare const ApTitle: {
|
|
|
29
29
|
title: string;
|
|
30
30
|
placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
31
31
|
trigger: "hover" | "focus" | "click" | "contextmenu";
|
|
32
|
-
helpMessage:
|
|
32
|
+
helpMessage: any;
|
|
33
33
|
helpIconColor: string;
|
|
34
34
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
35
35
|
$slots: {
|
|
@@ -89,6 +89,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
89
89
|
type: StringConstructor;
|
|
90
90
|
default: string;
|
|
91
91
|
};
|
|
92
|
+
bucket: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
92
96
|
}>, {
|
|
93
97
|
done: ComputedRef<boolean>;
|
|
94
98
|
clear: typeof clear;
|
|
@@ -172,6 +176,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
172
176
|
type: StringConstructor;
|
|
173
177
|
default: string;
|
|
174
178
|
};
|
|
179
|
+
bucket: {
|
|
180
|
+
type: StringConstructor;
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
175
183
|
}>> & Readonly<{
|
|
176
184
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
177
185
|
}>, {
|
|
@@ -187,6 +195,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
187
195
|
beforeUpload: BeforeUpload;
|
|
188
196
|
onRemove: Function;
|
|
189
197
|
customRequest: CustomRequest;
|
|
198
|
+
bucket: string;
|
|
190
199
|
dirName: string;
|
|
191
200
|
maxSizeErrorMsg: string;
|
|
192
201
|
acceptErrorMsg: string;
|