@aplus-frontend/ui 0.5.26 → 0.5.27
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-table/utils.mjs +17 -17
- package/es/src/business/ap-ladder/ApLadder.d.ts +83 -0
- package/es/src/business/ap-ladder/ApLadder.mjs +42 -0
- package/es/src/business/ap-ladder/components/RenderValue.d.ts +34 -0
- package/es/src/business/ap-ladder/components/RenderValue.mjs +79 -0
- package/es/src/business/ap-ladder/components/SimpleMode.d.ts +37 -0
- package/es/src/business/ap-ladder/components/SimpleMode.mjs +42 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.d.ts +28 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.mjs +49 -0
- package/es/src/business/ap-ladder/constans.d.ts +50 -0
- package/es/src/business/ap-ladder/constans.mjs +51 -0
- package/es/src/business/ap-ladder/index.d.ts +133 -15
- package/es/src/business/ap-ladder/index.mjs +5 -6
- package/es/src/business/ap-ladder/utils.d.ts +4 -0
- package/es/src/business/ap-ladder/utils.mjs +21 -18
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.d.ts +83 -0
- package/lib/src/business/ap-ladder/ApLadder.js +1 -0
- package/lib/src/business/ap-ladder/components/RenderValue.d.ts +34 -0
- package/lib/src/business/ap-ladder/components/RenderValue.js +1 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.d.ts +37 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.js +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.d.ts +28 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.js +1 -0
- package/lib/src/business/ap-ladder/constans.d.ts +50 -0
- package/lib/src/business/ap-ladder/constans.js +1 -0
- package/lib/src/business/ap-ladder/index.d.ts +133 -15
- package/lib/src/business/ap-ladder/index.js +1 -1
- package/lib/src/business/ap-ladder/utils.d.ts +4 -0
- package/lib/src/business/ap-ladder/utils.js +1 -1
- package/package.json +2 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +0 -23
- package/es/src/business/ap-ladder/ApLadder.vue.mjs +0 -4
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +0 -65
- package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +0 -48
- package/es/src/business/ap-ladder/components/SimpleMode.vue.mjs +0 -4
- package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +0 -57
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +0 -46
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.mjs +0 -4
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +0 -89
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +0 -2
- package/es/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +0 -3
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +0 -23
- package/lib/src/business/ap-ladder/ApLadder.vue.js +0 -1
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +0 -1
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +0 -48
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.js +0 -1
- package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +0 -1
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +0 -46
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.js +0 -1
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +0 -1
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +0 -2
- package/lib/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +0 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isVNode as E, createVNode as l, mergeProps as b, cloneVNode as j, Fragment as O } from "vue";
|
|
2
|
-
import { isObject as p, isArray as
|
|
2
|
+
import { isObject as p, isArray as a, isUndefined as g, isFunction as T, omit as C, isBoolean as F, isString as N, isEqual as S, sortBy as d, isPlainObject as m, every as v, isEmpty as I } from "lodash-unified";
|
|
3
3
|
import { apTableRenderItemMap as P, apTableFormItemMap as V } from "./constants.mjs";
|
|
4
|
-
import { isType as
|
|
4
|
+
import { isType as x } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
6
|
+
import { Tooltip as _ } from "@aplus-frontend/antdv";
|
|
7
|
+
import { QuestionCircleOutlined as w } from "@ant-design/icons-vue";
|
|
8
8
|
import "./components/dynamic-component/index.vue.mjs";
|
|
9
9
|
import y from "./components/dynamic-component/index.vue2.mjs";
|
|
10
10
|
import A from "../ap-form/item/index.vue.mjs";
|
|
@@ -28,7 +28,7 @@ const q = (t, e, n) => {
|
|
|
28
28
|
}
|
|
29
29
|
case "multiple":
|
|
30
30
|
case "multipleNumber":
|
|
31
|
-
return
|
|
31
|
+
return a(e) ? e : [e];
|
|
32
32
|
case "boolean":
|
|
33
33
|
return e;
|
|
34
34
|
case "object":
|
|
@@ -38,7 +38,7 @@ const q = (t, e, n) => {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
function H(t) {
|
|
41
|
-
return
|
|
41
|
+
return a(t) ? t.join(".") : t;
|
|
42
42
|
}
|
|
43
43
|
function W(t) {
|
|
44
44
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
@@ -147,7 +147,7 @@ function it(t, e) {
|
|
|
147
147
|
}), n;
|
|
148
148
|
}
|
|
149
149
|
function st(t) {
|
|
150
|
-
if (!
|
|
150
|
+
if (!x("Object")(t))
|
|
151
151
|
return t;
|
|
152
152
|
try {
|
|
153
153
|
return JSON.stringify(t);
|
|
@@ -165,19 +165,19 @@ function ut(t, e, n, o) {
|
|
|
165
165
|
const u = N(t.title) ? l("span", {
|
|
166
166
|
class: e,
|
|
167
167
|
title: t.title
|
|
168
|
-
}, [t.title]) : t.title,
|
|
169
|
-
return
|
|
168
|
+
}, [t.title]) : t.title, f = t.tooltip ? T(t.tooltip) ? t.tooltip(t) : l(O, null, [t.tooltip]) : null;
|
|
169
|
+
return f ? l("span", {
|
|
170
170
|
style: {
|
|
171
171
|
display: "inline-flex",
|
|
172
172
|
alignItems: "center",
|
|
173
173
|
maxWidth: "100%"
|
|
174
174
|
}
|
|
175
|
-
}, [u, l(
|
|
176
|
-
title:
|
|
175
|
+
}, [u, l(_, {
|
|
176
|
+
title: f,
|
|
177
177
|
placement: "bottom",
|
|
178
|
-
getPopupContainer: (c) => c.closest(".ant-table") || c.closest(".ant-modal") || document.body
|
|
178
|
+
getPopupContainer: (c) => c.closest(".ant-table") || c.closest(".ant-modal") || c.closest(".vxe-table") || document.body
|
|
179
179
|
}, {
|
|
180
|
-
default: () => [l(
|
|
180
|
+
default: () => [l(w, {
|
|
181
181
|
style: {
|
|
182
182
|
padding: "4px",
|
|
183
183
|
color: o,
|
|
@@ -196,22 +196,22 @@ function lt(t, e) {
|
|
|
196
196
|
return o(t), n;
|
|
197
197
|
}
|
|
198
198
|
function ct(t, e) {
|
|
199
|
-
if (
|
|
199
|
+
if (a(t) && a(e))
|
|
200
200
|
return S(d(t), d(e));
|
|
201
201
|
if (m(t) && m(e)) {
|
|
202
|
-
const n = (o) =>
|
|
202
|
+
const n = (o) => v(o, (i) => i == null) || I(o);
|
|
203
203
|
if (n(t) && n(e))
|
|
204
204
|
return !0;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function at(t) {
|
|
208
208
|
if (t !== !1)
|
|
209
209
|
return t;
|
|
210
210
|
}
|
|
211
211
|
export {
|
|
212
212
|
ot as apColumnToColumn,
|
|
213
213
|
H as dataIndexToStr,
|
|
214
|
-
|
|
214
|
+
at as falseToUndefined,
|
|
215
215
|
q as formatParamsValueType,
|
|
216
216
|
M as getColumnOrder,
|
|
217
217
|
B as getFieldProps,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ApLadderLabelValue } from './interface';
|
|
2
|
+
import { DefineComponent, ExtractPropTypes, PropType, VNode, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
+
layout: {
|
|
5
|
+
type: PropType<"vertical" | "horizontal">;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
labelValues: {
|
|
9
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
tooltip: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
labelAlign: {
|
|
17
|
+
type: PropType<"left" | "right">;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
major: {
|
|
21
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
minor: {
|
|
25
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
majorColor: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
minorColor: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
37
|
+
layout: {
|
|
38
|
+
type: PropType<"vertical" | "horizontal">;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
labelValues: {
|
|
42
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
43
|
+
default: () => never[];
|
|
44
|
+
};
|
|
45
|
+
tooltip: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
labelAlign: {
|
|
50
|
+
type: PropType<"left" | "right">;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
major: {
|
|
54
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
55
|
+
default: null;
|
|
56
|
+
};
|
|
57
|
+
minor: {
|
|
58
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
59
|
+
default: null;
|
|
60
|
+
};
|
|
61
|
+
majorColor: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
minorColor: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
}>> & Readonly<{}>, {
|
|
70
|
+
layout: "horizontal" | "vertical";
|
|
71
|
+
tooltip: boolean;
|
|
72
|
+
major: string | number | VNode<RendererNode, RendererElement, {
|
|
73
|
+
[key: string]: any;
|
|
74
|
+
}> | (() => VNode);
|
|
75
|
+
minor: string | number | VNode<RendererNode, RendererElement, {
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}> | (() => VNode);
|
|
78
|
+
labelAlign: "left" | "right";
|
|
79
|
+
labelValues: ApLadderLabelValue[];
|
|
80
|
+
majorColor: string;
|
|
81
|
+
minorColor: string;
|
|
82
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
83
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as p, computed as i, createVNode as o } from "vue";
|
|
2
|
+
import "../../config-provider/index.mjs";
|
|
3
|
+
import k from "./components/SimpleMode.mjs";
|
|
4
|
+
import b from "./components/ValueGroupMode.mjs";
|
|
5
|
+
import { ApLadderProps as g } from "./constans.mjs";
|
|
6
|
+
import { useNamespace as s } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
import { useGlobalConfig as A } from "../../config-provider/hooks/use-global-config.mjs";
|
|
8
|
+
const G = /* @__PURE__ */ p({
|
|
9
|
+
name: "ApLadder",
|
|
10
|
+
props: g(),
|
|
11
|
+
setup(e, {
|
|
12
|
+
slots: n
|
|
13
|
+
}) {
|
|
14
|
+
const {
|
|
15
|
+
b: a,
|
|
16
|
+
m: d
|
|
17
|
+
} = s("ap-ladder"), u = A("uiMode", "aplus"), r = i(() => e.labelValues === void 0 || e.labelValues.length === 0), m = i(() => e.labelValues.length > 0), c = i(() => e.labelAlign), f = (l) => {
|
|
18
|
+
l.link && window.open(l.link, "_blank"), typeof l.handleClickLink == "function" && l.handleClickLink();
|
|
19
|
+
}, t = () => {
|
|
20
|
+
var l;
|
|
21
|
+
return ((l = n.title) == null ? void 0 : l.call(n)) || null;
|
|
22
|
+
};
|
|
23
|
+
return () => o("div", {
|
|
24
|
+
class: [a(), `${d(u.value)}`]
|
|
25
|
+
}, [r.value ? o(k, {
|
|
26
|
+
major: e.major,
|
|
27
|
+
minor: e.minor,
|
|
28
|
+
layout: e.layout
|
|
29
|
+
}, {
|
|
30
|
+
title: n.title ? t : void 0
|
|
31
|
+
}) : m.value ? o(b, {
|
|
32
|
+
labelValues: e.labelValues || [],
|
|
33
|
+
labelAlign: c.value,
|
|
34
|
+
onHandleClick: f
|
|
35
|
+
}, {
|
|
36
|
+
title: n.title ? t : void 0
|
|
37
|
+
}) : null]);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
G as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { ApLadderLabelValue } from '../interface';
|
|
3
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
+
labelValue: {
|
|
5
|
+
type: PropType<ApLadderLabelValue>;
|
|
6
|
+
default: () => void;
|
|
7
|
+
};
|
|
8
|
+
labelValues: {
|
|
9
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
10
|
+
default: () => void;
|
|
11
|
+
};
|
|
12
|
+
onHandleClick: {
|
|
13
|
+
type: PropType<(labelValue: ApLadderLabelValue) => void>;
|
|
14
|
+
default: () => void;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
17
|
+
labelValue: {
|
|
18
|
+
type: PropType<ApLadderLabelValue>;
|
|
19
|
+
default: () => void;
|
|
20
|
+
};
|
|
21
|
+
labelValues: {
|
|
22
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
23
|
+
default: () => void;
|
|
24
|
+
};
|
|
25
|
+
onHandleClick: {
|
|
26
|
+
type: PropType<(labelValue: ApLadderLabelValue) => void>;
|
|
27
|
+
default: () => void;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
30
|
+
labelValue: ApLadderLabelValue;
|
|
31
|
+
labelValues: ApLadderLabelValue[];
|
|
32
|
+
onHandleClick: (labelValue: ApLadderLabelValue) => void;
|
|
33
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent as c, createVNode as e, Fragment as t } from "vue";
|
|
2
|
+
import { convertValue as n, renderValue as p, isVNodeOrFunction as d } from "../utils.mjs";
|
|
3
|
+
import "../../../config-provider/index.mjs";
|
|
4
|
+
import { useNamespace as v } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const f = /* @__PURE__ */ c({
|
|
6
|
+
name: "ApLadderValues",
|
|
7
|
+
props: {
|
|
8
|
+
labelValue: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => {
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
labelValues: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => {
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
onHandleClick: {
|
|
19
|
+
type: Function,
|
|
20
|
+
default: () => {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(o, {
|
|
25
|
+
emit: r
|
|
26
|
+
}) {
|
|
27
|
+
return () => {
|
|
28
|
+
const {
|
|
29
|
+
labelValue: l,
|
|
30
|
+
labelValues: i
|
|
31
|
+
} = o, {
|
|
32
|
+
e: a
|
|
33
|
+
} = v("ap-ladder"), s = (u) => {
|
|
34
|
+
r("handleClick", u);
|
|
35
|
+
};
|
|
36
|
+
return e(t, null, [e("span", {
|
|
37
|
+
class: a("value-group-value"),
|
|
38
|
+
title: String(n(l.value, {
|
|
39
|
+
...l
|
|
40
|
+
}))
|
|
41
|
+
}, [d(l.value) ? p(l.value) : l.link ? e("a", {
|
|
42
|
+
href: l.link,
|
|
43
|
+
target: "_blank",
|
|
44
|
+
class: a("value-group-link"),
|
|
45
|
+
title: String(l.value),
|
|
46
|
+
style: l.linkColor ? {
|
|
47
|
+
color: l.linkColor
|
|
48
|
+
} : null,
|
|
49
|
+
onClick: (u) => {
|
|
50
|
+
u.preventDefault(), s(l);
|
|
51
|
+
}
|
|
52
|
+
}, [n(l.value, {
|
|
53
|
+
...l
|
|
54
|
+
})]) : e(t, null, [e("span", {
|
|
55
|
+
class: [l.handleValueClick ? a("value-group-link") : null],
|
|
56
|
+
title: String(l.value),
|
|
57
|
+
style: l.valueColor ? {
|
|
58
|
+
color: l.valueColor
|
|
59
|
+
} : null,
|
|
60
|
+
onClick: () => {
|
|
61
|
+
l.handleValueClick && l.handleValueClick(i);
|
|
62
|
+
}
|
|
63
|
+
}, [n(l.value, {
|
|
64
|
+
...l
|
|
65
|
+
})]), l.unit && e("span", {
|
|
66
|
+
class: a("value-group-unit"),
|
|
67
|
+
title: String(n(l.value, {
|
|
68
|
+
...l
|
|
69
|
+
})),
|
|
70
|
+
style: l.unitColor ? {
|
|
71
|
+
color: l.unitColor
|
|
72
|
+
} : null
|
|
73
|
+
}, [l.unit])])])]);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
f as default
|
|
79
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DefineComponent, ExtractPropTypes, PropType, VNode, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
major: {
|
|
4
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
5
|
+
default: null;
|
|
6
|
+
};
|
|
7
|
+
minor: {
|
|
8
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
9
|
+
default: null;
|
|
10
|
+
};
|
|
11
|
+
layout: {
|
|
12
|
+
type: PropType<"vertical" | "horizontal">;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
16
|
+
major: {
|
|
17
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
18
|
+
default: null;
|
|
19
|
+
};
|
|
20
|
+
minor: {
|
|
21
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
layout: {
|
|
25
|
+
type: PropType<"vertical" | "horizontal">;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
}>> & Readonly<{}>, {
|
|
29
|
+
layout: "horizontal" | "vertical";
|
|
30
|
+
major: string | number | VNode<RendererNode, RendererElement, {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}> | (() => VNode);
|
|
33
|
+
minor: string | number | VNode<RendererNode, RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}> | (() => VNode);
|
|
36
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as r, createVNode as e } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import { ApLadderSimpleModeProps as l } from "../constans.mjs";
|
|
4
|
+
import { isVNodeOrFunction as n } from "../utils.mjs";
|
|
5
|
+
import { useNamespace as s } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
6
|
+
const v = /* @__PURE__ */ r({
|
|
7
|
+
name: "ApLadderSimpleMode",
|
|
8
|
+
props: l(),
|
|
9
|
+
setup(a, {
|
|
10
|
+
slots: o
|
|
11
|
+
}) {
|
|
12
|
+
const {
|
|
13
|
+
b: i,
|
|
14
|
+
e: m,
|
|
15
|
+
m: t
|
|
16
|
+
} = s("ap-ladder");
|
|
17
|
+
return () => e("div", {
|
|
18
|
+
class: [i("simple-mode")]
|
|
19
|
+
}, [a.layout === "vertical" ? e("div", {
|
|
20
|
+
class: [i("base"), t("vertical")]
|
|
21
|
+
}, [e("span", {
|
|
22
|
+
class: [m("major")],
|
|
23
|
+
title: a.major
|
|
24
|
+
}, [a.major]), n(a.minor) ? e("span", {
|
|
25
|
+
class: [m("minor")]
|
|
26
|
+
}, [a.minor]) : e("span", {
|
|
27
|
+
class: [m("minor")],
|
|
28
|
+
title: a.major
|
|
29
|
+
}, [a.minor])]) : e("div", {
|
|
30
|
+
class: [i("base"), t("horizontal")]
|
|
31
|
+
}, [e("span", {
|
|
32
|
+
class: [m("major")],
|
|
33
|
+
title: a.major
|
|
34
|
+
}, [a.major]), e("span", {
|
|
35
|
+
class: [m("minor")],
|
|
36
|
+
title: a.major
|
|
37
|
+
}, [a.minor])]), o.title && o.title()]);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
v as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { ApLadderLabelValue } from '../interface';
|
|
3
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
+
labelValues: {
|
|
5
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
labelAlign: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("handleClick" | "update:valueRefs")[], "handleClick" | "update:valueRefs", PublicProps, Readonly< ExtractPropTypes<{
|
|
13
|
+
labelValues: {
|
|
14
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
15
|
+
default: () => never[];
|
|
16
|
+
};
|
|
17
|
+
labelAlign: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
onHandleClick?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
"onUpdate:valueRefs"?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
labelAlign: string;
|
|
26
|
+
labelValues: ApLadderLabelValue[];
|
|
27
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as i, createVNode as a, createTextVNode as d } from "vue";
|
|
2
|
+
import "../../../config-provider/index.mjs";
|
|
3
|
+
import s from "./RenderValue.mjs";
|
|
4
|
+
import { useNamespace as p } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
+
const v = /* @__PURE__ */ i({
|
|
6
|
+
name: "ApLadderValueGroupMode",
|
|
7
|
+
props: {
|
|
8
|
+
labelValues: {
|
|
9
|
+
type: Array,
|
|
10
|
+
default: () => []
|
|
11
|
+
},
|
|
12
|
+
labelAlign: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ""
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:valueRefs", "handleClick"],
|
|
18
|
+
setup(o, {
|
|
19
|
+
emit: r,
|
|
20
|
+
slots: t
|
|
21
|
+
}) {
|
|
22
|
+
const {
|
|
23
|
+
e: l
|
|
24
|
+
} = p("ap-ladder"), n = (e) => {
|
|
25
|
+
r("handleClick", e);
|
|
26
|
+
};
|
|
27
|
+
return () => a("div", {
|
|
28
|
+
class: l("value-group-mode")
|
|
29
|
+
}, [o.labelValues.map((e, u) => a("div", {
|
|
30
|
+
key: u,
|
|
31
|
+
class: [l("value-group-item"), e.label === "" && l("value-group-value-end")]
|
|
32
|
+
}, [e.label && a("span", {
|
|
33
|
+
class: [l("value-group-label"), o.labelAlign ? l(`value-group-label-${o.labelAlign}`) : null],
|
|
34
|
+
style: e.labelColor ? {
|
|
35
|
+
color: e.labelColor
|
|
36
|
+
} : null,
|
|
37
|
+
title: String(e.label)
|
|
38
|
+
}, [e.label]), e.label && a("span", {
|
|
39
|
+
class: l("value-group-label-semicolon")
|
|
40
|
+
}, [d(":")]), a(s, {
|
|
41
|
+
labelValue: e,
|
|
42
|
+
labelValues: o.labelValues,
|
|
43
|
+
onHandleClick: n
|
|
44
|
+
}, null), t.title && t.title()]))]);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
v as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { ApLadderLabelValue } from './interface';
|
|
3
|
+
export declare const ApLadderProps: () => {
|
|
4
|
+
layout: {
|
|
5
|
+
type: PropType<"vertical" | "horizontal">;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
labelValues: {
|
|
9
|
+
type: PropType<ApLadderLabelValue[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
tooltip: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
labelAlign: {
|
|
17
|
+
type: PropType<"left" | "right">;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
major: {
|
|
21
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
minor: {
|
|
25
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
majorColor: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
minorColor: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const ApLadderSimpleModeProps: () => {
|
|
38
|
+
major: {
|
|
39
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
40
|
+
default: null;
|
|
41
|
+
};
|
|
42
|
+
minor: {
|
|
43
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
44
|
+
default: null;
|
|
45
|
+
};
|
|
46
|
+
layout: {
|
|
47
|
+
type: PropType<"vertical" | "horizontal">;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const t = () => ({
|
|
2
|
+
layout: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: "vertical"
|
|
5
|
+
},
|
|
6
|
+
labelValues: {
|
|
7
|
+
type: Array,
|
|
8
|
+
default: () => []
|
|
9
|
+
},
|
|
10
|
+
tooltip: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
labelAlign: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "left"
|
|
17
|
+
},
|
|
18
|
+
major: {
|
|
19
|
+
type: [String, Number, Object, Function],
|
|
20
|
+
default: null
|
|
21
|
+
},
|
|
22
|
+
minor: {
|
|
23
|
+
type: [String, Number, Object, Function],
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
majorColor: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
minorColor: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
}
|
|
34
|
+
}), e = () => ({
|
|
35
|
+
major: {
|
|
36
|
+
type: [String, Number, Object, Function],
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
minor: {
|
|
40
|
+
type: [String, Number, Object, Function],
|
|
41
|
+
default: null
|
|
42
|
+
},
|
|
43
|
+
layout: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "vertical"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
t as ApLadderProps,
|
|
50
|
+
e as ApLadderSimpleModeProps
|
|
51
|
+
};
|