@aplus-frontend/ui 0.5.26 → 0.5.28
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-grid/editable/form-item.vue.mjs +20 -18
- package/es/src/ap-grid/editable/index.vue.mjs +22 -20
- package/es/src/ap-grid/index.vue.mjs +32 -30
- package/es/src/ap-grid/interface.d.ts +1 -1
- 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/es/src/business/hooks/usePageListApGrid.mjs +11 -11
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- 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/lib/src/business/hooks/usePageListApGrid.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
|
@@ -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
|
+
};
|
|
@@ -1,39 +1,157 @@
|
|
|
1
|
-
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
|
-
import {
|
|
1
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNode, ComponentOptionsMixin, PublicProps, RendererNode, RendererElement, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
|
|
2
|
+
import { ApLadderLabelValue } from './interface';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApLadder: {
|
|
5
|
-
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<
|
|
6
|
-
layout:
|
|
5
|
+
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
6
|
+
layout: {
|
|
7
|
+
type: PropType<"vertical" | "horizontal">;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
labelValues: {
|
|
11
|
+
type: PropType< ApLadderLabelValue[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
tooltip: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
labelAlign: {
|
|
19
|
+
type: PropType<"left" | "right">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
major: {
|
|
23
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
minor: {
|
|
27
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
28
|
+
default: null;
|
|
29
|
+
};
|
|
30
|
+
majorColor: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
minorColor: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
39
|
+
layout: "horizontal" | "vertical";
|
|
40
|
+
tooltip: boolean;
|
|
41
|
+
major: string | number | VNode<RendererNode, RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}> | (() => VNode);
|
|
44
|
+
minor: string | number | VNode<RendererNode, RendererElement, {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}> | (() => VNode);
|
|
7
47
|
labelAlign: "left" | "right";
|
|
8
|
-
labelValues:
|
|
48
|
+
labelValues: ApLadderLabelValue[];
|
|
9
49
|
majorColor: string;
|
|
10
50
|
minorColor: string;
|
|
11
|
-
},
|
|
51
|
+
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
12
52
|
P: {};
|
|
13
53
|
B: {};
|
|
14
54
|
D: {};
|
|
15
55
|
C: {};
|
|
16
56
|
M: {};
|
|
17
57
|
Defaults: {};
|
|
18
|
-
}, Readonly<
|
|
19
|
-
layout:
|
|
58
|
+
}, Readonly< ExtractPropTypes<{
|
|
59
|
+
layout: {
|
|
60
|
+
type: PropType<"vertical" | "horizontal">;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
labelValues: {
|
|
64
|
+
type: PropType< ApLadderLabelValue[]>;
|
|
65
|
+
default: () => never[];
|
|
66
|
+
};
|
|
67
|
+
tooltip: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
labelAlign: {
|
|
72
|
+
type: PropType<"left" | "right">;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
major: {
|
|
76
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
77
|
+
default: null;
|
|
78
|
+
};
|
|
79
|
+
minor: {
|
|
80
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
81
|
+
default: null;
|
|
82
|
+
};
|
|
83
|
+
majorColor: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
minorColor: {
|
|
88
|
+
type: StringConstructor;
|
|
89
|
+
default: string;
|
|
90
|
+
};
|
|
91
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
92
|
+
layout: "horizontal" | "vertical";
|
|
93
|
+
tooltip: boolean;
|
|
94
|
+
major: string | number | VNode<RendererNode, RendererElement, {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
}> | (() => VNode);
|
|
97
|
+
minor: string | number | VNode<RendererNode, RendererElement, {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
}> | (() => VNode);
|
|
20
100
|
labelAlign: "left" | "right";
|
|
21
|
-
labelValues:
|
|
101
|
+
labelValues: ApLadderLabelValue[];
|
|
22
102
|
majorColor: string;
|
|
23
103
|
minorColor: string;
|
|
24
104
|
}>;
|
|
25
105
|
__isFragment?: never;
|
|
26
106
|
__isTeleport?: never;
|
|
27
107
|
__isSuspense?: never;
|
|
28
|
-
} & ComponentOptionsBase<Readonly<
|
|
29
|
-
layout:
|
|
108
|
+
} & ComponentOptionsBase<Readonly< ExtractPropTypes<{
|
|
109
|
+
layout: {
|
|
110
|
+
type: PropType<"vertical" | "horizontal">;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
labelValues: {
|
|
114
|
+
type: PropType< ApLadderLabelValue[]>;
|
|
115
|
+
default: () => never[];
|
|
116
|
+
};
|
|
117
|
+
tooltip: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
labelAlign: {
|
|
122
|
+
type: PropType<"left" | "right">;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
major: {
|
|
126
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
127
|
+
default: null;
|
|
128
|
+
};
|
|
129
|
+
minor: {
|
|
130
|
+
type: PropType<string | number | VNode | (() => VNode)>;
|
|
131
|
+
default: null;
|
|
132
|
+
};
|
|
133
|
+
majorColor: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
137
|
+
minorColor: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
142
|
+
layout: "horizontal" | "vertical";
|
|
143
|
+
tooltip: boolean;
|
|
144
|
+
major: string | number | VNode<RendererNode, RendererElement, {
|
|
145
|
+
[key: string]: any;
|
|
146
|
+
}> | (() => VNode);
|
|
147
|
+
minor: string | number | VNode<RendererNode, RendererElement, {
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}> | (() => VNode);
|
|
30
150
|
labelAlign: "left" | "right";
|
|
31
|
-
labelValues:
|
|
151
|
+
labelValues: ApLadderLabelValue[];
|
|
32
152
|
majorColor: string;
|
|
33
153
|
minorColor: string;
|
|
34
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
35
|
-
$slots: Readonly< ApLadderSlots> & ApLadderSlots;
|
|
36
|
-
}) & ( Plugin & (new (...args: any[]) => {
|
|
154
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
|
|
37
155
|
$props: {
|
|
38
156
|
onClick?: () => void;
|
|
39
157
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { withInstall as o } from "@aplus-frontend/utils";
|
|
2
|
-
import "./ApLadder.
|
|
3
|
-
import { locales as
|
|
4
|
-
|
|
5
|
-
const i = o(r);
|
|
2
|
+
import r from "./ApLadder.mjs";
|
|
3
|
+
import { locales as d } from "./interface.mjs";
|
|
4
|
+
const e = o(r);
|
|
6
5
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
e as ApLadder,
|
|
7
|
+
d as locales
|
|
9
8
|
};
|
|
@@ -5,3 +5,7 @@ export declare const createMemoizeKey: (value: any, options?: any) => string;
|
|
|
5
5
|
export declare const convertValue: (value: string | number | (() => VNode) | VNode | null | undefined, options?: ConvertValueOptions) => string | number | VNode< RendererNode, RendererElement, {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}> | (() => VNode) | null | undefined;
|
|
8
|
+
export declare const isVNodeOrFunction: (value: any) => boolean;
|
|
9
|
+
export declare const renderValue: (value: any) => VNode< RendererNode, RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}> | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { isVNode as c, h as e } from "vue";
|
|
2
|
+
import { locales as o } from "./interface.mjs";
|
|
3
|
+
const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t = {}) => typeof r == "string" || typeof r == "number" ? String(r) + JSON.stringify(t) : "complex-value", p = (r, t = {
|
|
3
4
|
rawValue: !0,
|
|
4
5
|
precision: 2,
|
|
5
6
|
thousand: !0,
|
|
@@ -9,32 +10,34 @@ const o = (r) => r == null || typeof r == "string" && r.trim() === "", u = (r, e
|
|
|
9
10
|
}) => {
|
|
10
11
|
if (Object.prototype.toString.call(r) === "[object Null]" || Object.prototype.toString.call(r) === "[object Undefined]" || Object.prototype.toString.call(r) === "[object Object]" || Object.prototype.toString.call(r) === "[object Function]" || r === "")
|
|
11
12
|
return "--";
|
|
12
|
-
if (
|
|
13
|
+
if (t.rawValue)
|
|
13
14
|
return r;
|
|
14
15
|
if (typeof r == "number") {
|
|
15
|
-
if (
|
|
16
|
-
return `${r.toFixed(
|
|
17
|
-
if (
|
|
16
|
+
if (t.percent)
|
|
17
|
+
return `${r.toFixed(t.precision)}%`;
|
|
18
|
+
if (t.currency)
|
|
18
19
|
return r.toLocaleString(
|
|
19
|
-
|
|
20
|
+
o[t.currency ? t.currency : "CNY"],
|
|
20
21
|
{
|
|
21
22
|
style: "currency",
|
|
22
|
-
currency:
|
|
23
|
+
currency: t.currency ? t.currency : "CNY"
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
|
-
if (
|
|
26
|
-
const [
|
|
27
|
-
return `${
|
|
26
|
+
if (t.thousand) {
|
|
27
|
+
const [n, i] = r.toFixed(t.precision ? t.precision : 2).split(".");
|
|
28
|
+
return `${n.replace(
|
|
28
29
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
29
|
-
`$1${
|
|
30
|
-
)}.${
|
|
30
|
+
`$1${t.thousandSeparator ? t.thousandSeparator : ","}`
|
|
31
|
+
)}.${i}`;
|
|
31
32
|
}
|
|
32
|
-
return r.toFixed(
|
|
33
|
+
return r.toFixed(t.precision ? t.precision : 2);
|
|
33
34
|
}
|
|
34
35
|
return r;
|
|
35
|
-
};
|
|
36
|
+
}, s = (r) => c(r) || typeof r == "function", a = (r) => c(r) ? e(r) : typeof r == "function" ? e(r()) : null;
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
p as convertValue,
|
|
39
|
+
d as createMemoizeKey,
|
|
40
|
+
y as isNull,
|
|
41
|
+
s as isVNodeOrFunction,
|
|
42
|
+
a as renderValue
|
|
40
43
|
};
|