@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,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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@aplus-frontend/utils"),t=require("./ApLadder.js"),r=require("./interface.js"),l=e.withInstall(t.default);exports.locales=r.locales;exports.ApLadder=l;
|
|
@@ -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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("./interface.js"),o=r=>r==null||typeof r=="string"&&r.trim()==="",u=(r,e={})=>typeof r=="string"||typeof r=="number"?String(r)+JSON.stringify(e):"complex-value",f=(r,e={rawValue:!0,precision:2,thousand:!0,thousandSeparator:",",currency:"CNY",percent:!1})=>{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==="")return"--";if(e.rawValue)return r;if(typeof r=="number"){if(e.percent)return`${r.toFixed(e.precision)}%`;if(e.currency)return r.toLocaleString(i.locales[e.currency?e.currency:"CNY"],{style:"currency",currency:e.currency?e.currency:"CNY"});if(e.thousand){const[n,c]=r.toFixed(e.precision?e.precision:2).split(".");return`${n.replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${e.thousandSeparator?e.thousandSeparator:","}`)}.${c}`}return r.toFixed(e.precision?e.precision:2)}return r},y=r=>t.isVNode(r)||typeof r=="function",d=r=>t.isVNode(r)?t.h(r):typeof r=="function"?t.h(r()):null;exports.convertValue=f;exports.createMemoizeKey=u;exports.isNull=o;exports.isVNodeOrFunction=y;exports.renderValue=d;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.27",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
67
67
|
"vuedraggable": "^4.1.0",
|
|
68
68
|
"vxe-pc-ui": "4.5.0",
|
|
69
|
-
"vxe-table": "4.
|
|
69
|
+
"vxe-table": "4.11.29",
|
|
70
70
|
"@aplus-frontend/hooks": "1.0.7",
|
|
71
71
|
"@aplus-frontend/utils": "1.0.55"
|
|
72
72
|
},
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ApLadderLabelValue, ApLadderProps, ApLadderSlots } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
attrs: Partial<{}>;
|
|
5
|
-
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
|
|
11
|
-
layout: "vertical" | "horizontal";
|
|
12
|
-
labelAlign: "left" | "right";
|
|
13
|
-
labelValues: Array<ApLadderLabelValue>;
|
|
14
|
-
majorColor: string;
|
|
15
|
-
minorColor: string;
|
|
16
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
-
new (): {
|
|
21
|
-
$slots: S;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, useSlots as V, computed as t, withMemo as h, createElementBlock as _, openBlock as n, normalizeClass as j, unref as l, createBlock as a, createCommentVNode as M, createSlots as i, withCtx as m, renderSlot as s } from "vue";
|
|
2
|
-
import { memoize as A } from "lodash-unified";
|
|
3
|
-
import "../../config-provider/index.mjs";
|
|
4
|
-
import "./components/SimpleMode.vue.mjs";
|
|
5
|
-
import "./components/ValueGroupMode.vue.mjs";
|
|
6
|
-
import { isNull as S, createMemoizeKey as $ } from "./utils.mjs";
|
|
7
|
-
import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
-
import { useGlobalConfig as L } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
|
-
import z from "./components/SimpleMode.vue2.mjs";
|
|
10
|
-
import B from "./components/ValueGroupMode.vue2.mjs";
|
|
11
|
-
const P = /* @__PURE__ */ g({
|
|
12
|
-
name: "ApLadder",
|
|
13
|
-
__name: "ApLadder",
|
|
14
|
-
props: {
|
|
15
|
-
major: {},
|
|
16
|
-
minor: {},
|
|
17
|
-
majorColor: { default: "" },
|
|
18
|
-
minorColor: { default: "" },
|
|
19
|
-
layout: { default: "vertical" },
|
|
20
|
-
labelValues: { default: () => [] },
|
|
21
|
-
labelAlign: { default: "left" }
|
|
22
|
-
},
|
|
23
|
-
setup(u) {
|
|
24
|
-
const r = V(), o = u, { b: c, m: p } = w("ap-ladder"), f = L("uiMode", "aplus"), d = t(
|
|
25
|
-
() => o.labelValues === void 0 || o.labelValues.length === 0
|
|
26
|
-
), k = t(() => o.labelValues.length > 0), b = t(() => o.labelAlign), v = A((e) => S(e) ? "" : typeof e == "number" ? e.toString() : typeof e == "string" ? e : "", $), y = (e) => {
|
|
27
|
-
e.link && window.open(e.link, "_blank"), typeof e.handleClickLink == "function" && e.handleClickLink();
|
|
28
|
-
};
|
|
29
|
-
return (e, C) => h([e.labelValues, e.major, e.minor], () => (n(), _("div", {
|
|
30
|
-
class: j([l(c)(), `${l(p)(l(f))}`])
|
|
31
|
-
}, [
|
|
32
|
-
d.value ? (n(), a(z, {
|
|
33
|
-
key: 0,
|
|
34
|
-
major: o.major,
|
|
35
|
-
minor: o.minor,
|
|
36
|
-
layout: o.layout,
|
|
37
|
-
"convert-value": l(v)
|
|
38
|
-
}, i({ _: 2 }, [
|
|
39
|
-
r.title ? {
|
|
40
|
-
name: "title",
|
|
41
|
-
fn: m(() => [
|
|
42
|
-
s(e.$slots, "title")
|
|
43
|
-
]),
|
|
44
|
-
key: "0"
|
|
45
|
-
} : void 0
|
|
46
|
-
]), 1032, ["major", "minor", "layout", "convert-value"])) : k.value ? (n(), a(B, {
|
|
47
|
-
key: 1,
|
|
48
|
-
"label-values": o.labelValues || {},
|
|
49
|
-
"label-align": b.value,
|
|
50
|
-
onHandleClick: y
|
|
51
|
-
}, i({ _: 2 }, [
|
|
52
|
-
r.title ? {
|
|
53
|
-
name: "title",
|
|
54
|
-
fn: m(() => [
|
|
55
|
-
s(e.$slots, "title")
|
|
56
|
-
]),
|
|
57
|
-
key: "0"
|
|
58
|
-
} : void 0
|
|
59
|
-
]), 1032, ["label-values", "label-align"])) : M("", !0)
|
|
60
|
-
], 2)), C, 0);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
P as default
|
|
65
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
title?(_: {}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {};
|
|
8
|
-
rootEl: HTMLDivElement;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
12
|
-
major: {
|
|
13
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
14
|
-
default: null;
|
|
15
|
-
};
|
|
16
|
-
minor: {
|
|
17
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
18
|
-
default: null;
|
|
19
|
-
};
|
|
20
|
-
layout: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
25
|
-
major: {
|
|
26
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
27
|
-
default: null;
|
|
28
|
-
};
|
|
29
|
-
minor: {
|
|
30
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
31
|
-
default: null;
|
|
32
|
-
};
|
|
33
|
-
layout: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
}>> & Readonly<{}>, {
|
|
38
|
-
layout: string;
|
|
39
|
-
major: string | number | Function | Record<string, any>;
|
|
40
|
-
minor: string | number | Function | Record<string, any>;
|
|
41
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
42
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
-
export default _default;
|
|
44
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
-
new (): {
|
|
46
|
-
$slots: S;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, createElementBlock as r, openBlock as m, normalizeClass as a, unref as t, renderSlot as u, createCommentVNode as j, createElementVNode as l, toDisplayString as n } from "vue";
|
|
2
|
-
import "../../../config-provider/index.mjs";
|
|
3
|
-
import { useNamespace as S } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
4
|
-
const f = ["title"], y = ["title"], g = ["title"], b = ["title"], N = /* @__PURE__ */ d({
|
|
5
|
-
name: "ApLadderSimpleMode",
|
|
6
|
-
__name: "SimpleMode",
|
|
7
|
-
props: {
|
|
8
|
-
major: {
|
|
9
|
-
type: [String, Number, Function, Object],
|
|
10
|
-
default: null
|
|
11
|
-
},
|
|
12
|
-
minor: {
|
|
13
|
-
type: [String, Number, Function, Object],
|
|
14
|
-
default: null
|
|
15
|
-
},
|
|
16
|
-
layout: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "vertical"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
setup(e) {
|
|
22
|
-
const { b: o, e: i, m: s } = S("ap-ladder");
|
|
23
|
-
return (c, p) => (m(), r("div", {
|
|
24
|
-
class: a([t(o)("simple-mode")])
|
|
25
|
-
}, [
|
|
26
|
-
e.layout === "vertical" ? (m(), r("div", {
|
|
27
|
-
key: 0,
|
|
28
|
-
class: a([t(o)("base"), t(s)("vertical")])
|
|
29
|
-
}, [
|
|
30
|
-
l("span", {
|
|
31
|
-
class: a([t(i)("major")]),
|
|
32
|
-
title: String(e.major)
|
|
33
|
-
}, n(e.major), 11, f),
|
|
34
|
-
l("span", {
|
|
35
|
-
class: a([t(i)("minor")]),
|
|
36
|
-
title: String(e.major)
|
|
37
|
-
}, n(e.minor), 11, y)
|
|
38
|
-
], 2)) : (m(), r("div", {
|
|
39
|
-
key: 1,
|
|
40
|
-
class: a([t(o)("base"), t(s)("horizontal")])
|
|
41
|
-
}, [
|
|
42
|
-
l("span", {
|
|
43
|
-
class: a([t(i)("major")]),
|
|
44
|
-
title: String(e.major)
|
|
45
|
-
}, n(e.major), 11, g),
|
|
46
|
-
l("span", {
|
|
47
|
-
class: a([t(i)("minor")]),
|
|
48
|
-
title: String(e.major)
|
|
49
|
-
}, n(e.minor), 11, b)
|
|
50
|
-
], 2)),
|
|
51
|
-
c.$slots.title ? u(c.$slots, "title", { key: 2 }) : j("", !0)
|
|
52
|
-
], 2));
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
export {
|
|
56
|
-
N as default
|
|
57
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ApLadderLabelValue } from '../interface';
|
|
2
|
-
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
attrs: Partial<{}>;
|
|
5
|
-
slots: {
|
|
6
|
-
title?(_: {}): any;
|
|
7
|
-
};
|
|
8
|
-
refs: {};
|
|
9
|
-
rootEl: HTMLDivElement;
|
|
10
|
-
};
|
|
11
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
-
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
13
|
-
labelValues: {
|
|
14
|
-
type: () => ApLadderLabelValue[];
|
|
15
|
-
default: () => never[];
|
|
16
|
-
};
|
|
17
|
-
labelAlign: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
22
|
-
handleClick: (...args: any[]) => void;
|
|
23
|
-
"update:valueRefs": (...args: any[]) => void;
|
|
24
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
25
|
-
labelValues: {
|
|
26
|
-
type: () => ApLadderLabelValue[];
|
|
27
|
-
default: () => never[];
|
|
28
|
-
};
|
|
29
|
-
labelAlign: {
|
|
30
|
-
type: StringConstructor;
|
|
31
|
-
default: string;
|
|
32
|
-
};
|
|
33
|
-
}>> & Readonly<{
|
|
34
|
-
onHandleClick?: ((...args: any[]) => any) | undefined;
|
|
35
|
-
"onUpdate:valueRefs"?: ((...args: any[]) => any) | undefined;
|
|
36
|
-
}>, {
|
|
37
|
-
labelAlign: string;
|
|
38
|
-
labelValues: ApLadderLabelValue[];
|
|
39
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
40
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
-
export default _default;
|
|
42
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
-
new (): {
|
|
44
|
-
$slots: S;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { defineComponent as A, isVNode as v, h as k, createElementBlock as r, openBlock as i, normalizeClass as l, unref as e, Fragment as m, renderList as N, createCommentVNode as u, createElementVNode as p, renderSlot as $, normalizeStyle as c, toDisplayString as a, createBlock as B, withModifiers as L } from "vue";
|
|
2
|
-
import "../../../config-provider/index.mjs";
|
|
3
|
-
import { convertValue as d } from "../utils.mjs";
|
|
4
|
-
import { useNamespace as M } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
5
|
-
const z = ["title"], E = ["title"], F = ["href", "title", "onClick"], G = ["title", "onClick"], R = ["title"], x = /* @__PURE__ */ A({
|
|
6
|
-
name: "ApLadderValueGroupMode",
|
|
7
|
-
__name: "ValueGroupMode",
|
|
8
|
-
props: {
|
|
9
|
-
labelValues: {
|
|
10
|
-
type: Array,
|
|
11
|
-
default: () => []
|
|
12
|
-
},
|
|
13
|
-
labelAlign: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:valueRefs", "handleClick"],
|
|
19
|
-
setup(s, { emit: g }) {
|
|
20
|
-
const C = g, { e: o } = M("ap-ladder"), f = (n) => v(n) || typeof n == "function", y = (n) => v(n.value) ? k(n.value) : typeof n.value == "function" ? k(n.value()) : null, h = (n) => {
|
|
21
|
-
C("handleClick", n);
|
|
22
|
-
};
|
|
23
|
-
return (n, w) => (i(), r("div", {
|
|
24
|
-
class: l(e(o)("value-group-mode"))
|
|
25
|
-
}, [
|
|
26
|
-
(i(!0), r(m, null, N(s.labelValues, (t, S) => (i(), r("div", {
|
|
27
|
-
key: S,
|
|
28
|
-
class: l([
|
|
29
|
-
e(o)("value-group-item"),
|
|
30
|
-
t.label === "" && e(o)("value-group-value-end")
|
|
31
|
-
])
|
|
32
|
-
}, [
|
|
33
|
-
t.label ? (i(), r("span", {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: l([
|
|
36
|
-
e(o)("value-group-label"),
|
|
37
|
-
s.labelAlign ? e(o)(`value-group-label-${s.labelAlign}`) : null
|
|
38
|
-
]),
|
|
39
|
-
style: c(t.labelColor ? { color: t.labelColor } : null),
|
|
40
|
-
title: String(t.label)
|
|
41
|
-
}, a(t.label), 15, z)) : u("", !0),
|
|
42
|
-
t.label ? (i(), r("span", {
|
|
43
|
-
key: 1,
|
|
44
|
-
class: l(e(o)("value-group-label-semicolon"))
|
|
45
|
-
}, ":", 2)) : u("", !0),
|
|
46
|
-
p("span", {
|
|
47
|
-
class: l(e(o)("value-group-value")),
|
|
48
|
-
title: String(e(d)(t.value, { ...t }))
|
|
49
|
-
}, [
|
|
50
|
-
f(t.value) ? (i(), B(y, {
|
|
51
|
-
key: 0,
|
|
52
|
-
value: t.value
|
|
53
|
-
}, null, 8, ["value"])) : t.link ? (i(), r("a", {
|
|
54
|
-
key: 1,
|
|
55
|
-
href: t.link,
|
|
56
|
-
target: "_blank",
|
|
57
|
-
class: l(e(o)("value-group-link")),
|
|
58
|
-
title: String(t.value),
|
|
59
|
-
style: c(t.linkColor ? { color: t.linkColor } : null),
|
|
60
|
-
onClick: L((_) => h(t), ["prevent"])
|
|
61
|
-
}, a(e(d)(t.value, { ...t })), 15, F)) : (i(), r(m, { key: 2 }, [
|
|
62
|
-
p("span", {
|
|
63
|
-
class: l([
|
|
64
|
-
t.handleValueClick ? e(o)("value-group-link") : null
|
|
65
|
-
]),
|
|
66
|
-
title: String(t.value),
|
|
67
|
-
style: c(
|
|
68
|
-
t.valueColor ? { color: t.valueColor } : null
|
|
69
|
-
),
|
|
70
|
-
onClick: (_) => t.handleValueClick && t.handleValueClick(s.labelValues)
|
|
71
|
-
}, a(e(d)(t.value, { ...t })), 15, G),
|
|
72
|
-
t.unit ? (i(), r("span", {
|
|
73
|
-
key: 0,
|
|
74
|
-
class: l(e(o)("value-group-unit")),
|
|
75
|
-
title: String(e(d)(t.value, { ...t })),
|
|
76
|
-
style: c(
|
|
77
|
-
t.unitColor ? { color: t.unitColor } : null
|
|
78
|
-
)
|
|
79
|
-
}, a(t.unit), 15, R)) : u("", !0)
|
|
80
|
-
], 64))
|
|
81
|
-
], 10, E),
|
|
82
|
-
n.$slots.title ? $(n.$slots, "title", { key: 2 }) : u("", !0)
|
|
83
|
-
], 2))), 128))
|
|
84
|
-
], 2));
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
export {
|
|
88
|
-
x as default
|
|
89
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ApLadderLabelValue, ApLadderProps, ApLadderSlots } from './interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare function __VLS_template(): {
|
|
4
|
-
attrs: Partial<{}>;
|
|
5
|
-
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApLadderProps> & Readonly<{}>, {
|
|
11
|
-
layout: "vertical" | "horizontal";
|
|
12
|
-
labelAlign: "left" | "right";
|
|
13
|
-
labelValues: Array<ApLadderLabelValue>;
|
|
14
|
-
majorColor: string;
|
|
15
|
-
minorColor: string;
|
|
16
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
-
export default _default;
|
|
19
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
-
new (): {
|
|
21
|
-
$slots: S;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ApLadder.vue2.js");exports.default=e.default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("lodash-unified");require("../../config-provider/index.js");require("./components/SimpleMode.vue.js");require("./components/ValueGroupMode.vue.js");const n=require("./utils.js"),_=require("../../config-provider/hooks/use-namespace.js"),b=require("../../config-provider/hooks/use-global-config.js"),g=require("./components/SimpleMode.vue2.js"),y=require("./components/ValueGroupMode.vue2.js"),C=e.defineComponent({name:"ApLadder",__name:"ApLadder",props:{major:{},minor:{},majorColor:{default:""},minorColor:{default:""},layout:{default:"vertical"},labelValues:{default:()=>[]},labelAlign:{default:"left"}},setup(r){const o=e.useSlots(),t=r,{b:a,m:u}=_.useNamespace("ap-ladder"),i=b.useGlobalConfig("uiMode","aplus"),s=e.computed(()=>t.labelValues===void 0||t.labelValues.length===0),c=e.computed(()=>t.labelValues.length>0),d=e.computed(()=>t.labelAlign),m=l=>n.isNull(l)?"":typeof l=="number"?l.toString():typeof l=="string"?l:"",p=v.memoize(m,n.createMemoizeKey),f=l=>{l.link&&window.open(l.link,"_blank"),typeof l.handleClickLink=="function"&&l.handleClickLink()};return(l,k)=>e.withMemo([l.labelValues,l.major,l.minor],()=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(a)(),`${e.unref(u)(e.unref(i))}`])},[s.value?(e.openBlock(),e.createBlock(g.default,{key:0,major:t.major,minor:t.minor,layout:t.layout,"convert-value":e.unref(p)},e.createSlots({_:2},[o.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"title")]),key:"0"}:void 0]),1032,["major","minor","layout","convert-value"])):c.value?(e.openBlock(),e.createBlock(y.default,{key:1,"label-values":t.labelValues||{},"label-align":d.value,onHandleClick:f},e.createSlots({_:2},[o.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"title")]),key:"0"}:void 0]),1032,["label-values","label-align"])):e.createCommentVNode("",!0)],2)),k,0)}});exports.default=C;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare function __VLS_template(): {
|
|
3
|
-
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
title?(_: {}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {};
|
|
8
|
-
rootEl: HTMLDivElement;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
12
|
-
major: {
|
|
13
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
14
|
-
default: null;
|
|
15
|
-
};
|
|
16
|
-
minor: {
|
|
17
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
18
|
-
default: null;
|
|
19
|
-
};
|
|
20
|
-
layout: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
25
|
-
major: {
|
|
26
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
27
|
-
default: null;
|
|
28
|
-
};
|
|
29
|
-
minor: {
|
|
30
|
-
type: (NumberConstructor | ObjectConstructor | StringConstructor | FunctionConstructor)[];
|
|
31
|
-
default: null;
|
|
32
|
-
};
|
|
33
|
-
layout: {
|
|
34
|
-
type: StringConstructor;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
}>> & Readonly<{}>, {
|
|
38
|
-
layout: string;
|
|
39
|
-
major: string | number | Function | Record<string, any>;
|
|
40
|
-
minor: string | number | Function | Record<string, any>;
|
|
41
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
42
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
|
-
export default _default;
|
|
44
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
-
new (): {
|
|
46
|
-
$slots: S;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./SimpleMode.vue2.js");exports.default=e.default;
|