@aplus-frontend/ui 0.4.10 → 0.4.12
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/index.mjs +42 -36
- package/es/src/ap-field/date/index.vue.mjs +98 -65
- package/es/src/ap-field/date-range/index.vue.mjs +107 -71
- package/es/src/ap-field/hooks/use-date-timezone.d.ts +7 -0
- package/es/src/ap-field/hooks/use-date-timezone.mjs +10 -0
- package/es/src/ap-field/hooks/use-default-presets.d.ts +10 -6
- package/es/src/ap-field/hooks/use-default-presets.mjs +24 -13
- package/es/src/ap-field/interface.d.ts +8 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +8 -2
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +95 -90
- package/es/src/business/ap-ladder/index.d.ts +4 -1
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.mjs +35 -0
- package/es/src/config-provider/hooks/use-locale.mjs +7 -7
- package/es/src/full-screen/index.d.ts +3 -0
- package/es/src/full-screen/index.mjs +2 -0
- package/es/src/full-screen/index.vue.d.ts +43 -0
- package/es/src/full-screen/index.vue.mjs +85 -0
- package/es/src/full-screen/index.vue2.mjs +4 -0
- package/es/src/full-screen/interface.d.ts +50 -0
- package/es/src/full-screen/interface.mjs +1 -0
- package/es/src/full-screen/style/css.d.ts +0 -0
- package/es/src/full-screen/style/css.js +1 -0
- package/es/src/full-screen/style/index.d.ts +0 -0
- package/es/src/full-screen/style/index.js +1 -0
- package/es/src/hooks/index.d.ts +1 -0
- package/es/src/hooks/index.mjs +6 -4
- package/es/src/hooks/useFullScreen.d.ts +8 -0
- package/es/src/hooks/useFullScreen.mjs +51 -0
- package/es/src/index.d.ts +2 -0
- package/es/src/index.mjs +243 -237
- package/es/src/path-map.mjs +3 -1
- package/es/src/portal/index.d.ts +3 -0
- package/es/src/portal/index.mjs +2 -0
- package/es/src/portal/index.vue.d.ts +18 -0
- package/es/src/portal/index.vue.mjs +21 -0
- package/es/src/portal/index.vue2.mjs +4 -0
- package/es/src/portal/interface.d.ts +2 -0
- package/es/src/portal/interface.mjs +1 -0
- package/es/src/portal/style/css.d.ts +1 -0
- package/es/src/portal/style/css.js +1 -0
- package/es/src/portal/style/index.d.ts +1 -0
- package/es/src/portal/style/index.js +1 -0
- package/es/src/utils/data-range-persets.d.ts +23 -40
- package/es/src/utils/data-range-persets.mjs +95 -102
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-date-timezone.d.ts +7 -0
- package/lib/src/ap-field/hooks/use-date-timezone.js +1 -0
- package/lib/src/ap-field/hooks/use-default-presets.d.ts +10 -6
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
- package/lib/src/ap-field/interface.d.ts +8 -2
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +8 -2
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +4 -1
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.js +1 -0
- package/lib/src/config-provider/hooks/use-locale.js +1 -1
- package/lib/src/full-screen/index.d.ts +3 -0
- package/lib/src/full-screen/index.js +1 -0
- package/lib/src/full-screen/index.vue.d.ts +43 -0
- package/lib/src/full-screen/index.vue.js +1 -0
- package/lib/src/full-screen/index.vue2.js +1 -0
- package/lib/src/full-screen/interface.d.ts +50 -0
- package/lib/src/full-screen/interface.js +1 -0
- package/lib/src/full-screen/style/css.cjs +1 -0
- package/lib/src/full-screen/style/css.d.ts +0 -0
- package/lib/src/full-screen/style/index.cjs +1 -0
- package/lib/src/full-screen/style/index.d.ts +0 -0
- package/lib/src/hooks/index.d.ts +1 -0
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/hooks/useFullScreen.d.ts +8 -0
- package/lib/src/hooks/useFullScreen.js +1 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/portal/index.d.ts +3 -0
- package/lib/src/portal/index.js +1 -0
- package/lib/src/portal/index.vue.d.ts +18 -0
- package/lib/src/portal/index.vue.js +1 -0
- package/lib/src/portal/index.vue2.js +1 -0
- package/lib/src/portal/interface.d.ts +2 -0
- package/lib/src/portal/interface.js +1 -0
- package/lib/src/portal/style/css.cjs +1 -0
- package/lib/src/portal/style/css.d.ts +1 -0
- package/lib/src/portal/style/index.cjs +1 -0
- package/lib/src/portal/style/index.d.ts +1 -0
- package/lib/src/utils/data-range-persets.d.ts +23 -40
- package/lib/src/utils/data-range-persets.js +1 -1
- package/package.json +3 -3
- package/theme/ap-form/ap-form-item.css +5 -1
- package/theme/ap-form/ap-form-item.less +8 -1
- package/theme/ap-form/index.css +22 -1
- package/theme/ap-form/item-text-group.css +14 -0
- package/theme/ap-form/item-text-group.less +11 -1
- package/theme/ap-form/item-text.css +14 -0
- package/theme/ap-form/search-form.css +8 -1
- package/theme/ap-form/search-form.less +5 -0
- package/theme/ap-table/ap-table.css +22 -1
- package/theme/ap-table-modal/index.css +22 -1
- package/theme/editable-table/index.css +22 -1
- package/theme/full-screen/index.css +6 -0
- package/theme/full-screen/index.less +12 -0
- package/theme/index.css +28 -1
- package/theme/index.less +1 -0
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
1
2
|
import { ApFieldDateRangeProps, BasicApFieldProps } from '../interface';
|
|
2
3
|
import { Dayjs } from 'dayjs';
|
|
3
|
-
import {
|
|
4
|
+
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
4
5
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
5
6
|
export declare const useDefaultPresets: (props: BasicApFieldProps<{
|
|
6
7
|
presets?: ApFieldDateRangeProps["presets"];
|
|
7
|
-
timezone?:
|
|
8
|
-
}>) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
timezone?: Ref<ZoneAlias | undefined>;
|
|
9
|
+
}>) => {
|
|
10
|
+
presets: ComputedRef<{
|
|
11
|
+
label: VueNode;
|
|
12
|
+
value: Dayjs[];
|
|
13
|
+
}[] | undefined>;
|
|
14
|
+
changeCurrentDate: () => void;
|
|
15
|
+
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { presetsDefault as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { ref as s, computed as i } from "vue";
|
|
2
|
+
import { presetsDefault as v } from "../../utils/data-range-persets.mjs";
|
|
3
|
+
import m from "dayjs";
|
|
4
|
+
import "../../config-provider/index.mjs";
|
|
5
|
+
import { useLocale as D } from "../../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
const j = (e) => {
|
|
7
|
+
const u = s(m().valueOf()), { t: f } = D();
|
|
8
|
+
return {
|
|
9
|
+
presets: i(() => {
|
|
10
|
+
var a, t, l;
|
|
11
|
+
return e.presets === !0 ? v((a = e == null ? void 0 : e.timezone) == null ? void 0 : a.value, u.value, f) : (l = (t = e == null ? void 0 : e.presets) == null ? void 0 : t.map) == null ? void 0 : l.call(t, (r) => {
|
|
12
|
+
var n;
|
|
13
|
+
return {
|
|
14
|
+
label: r.label,
|
|
15
|
+
value: (n = r == null ? void 0 : r.value) == null ? void 0 : n.filter((c) => c !== null)
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
}),
|
|
19
|
+
changeCurrentDate: () => {
|
|
20
|
+
u.value = m().valueOf();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
13
24
|
export {
|
|
14
|
-
|
|
25
|
+
j as useDefaultPresets
|
|
15
26
|
};
|
|
@@ -49,7 +49,10 @@ export type ApFieldDateProps = BasicApFieldProps<Omit<DatePickerProps, 'mode' |
|
|
|
49
49
|
/**
|
|
50
50
|
* 指定时区,指定后value会变为特定时区下的timestamp
|
|
51
51
|
*/
|
|
52
|
-
timezone?: ZoneAlias
|
|
52
|
+
timezone?: ZoneAlias | {
|
|
53
|
+
label?: string;
|
|
54
|
+
value: ZoneAlias;
|
|
55
|
+
}[];
|
|
53
56
|
};
|
|
54
57
|
export type ApFieldNumberProps = BasicApFieldProps<InputNumberProps> & {
|
|
55
58
|
emptyText?: string;
|
|
@@ -99,7 +102,10 @@ export type ApFieldDateRangeProps = BasicApFieldProps<Omit<RangePickerProps, 'va
|
|
|
99
102
|
/**
|
|
100
103
|
* 指定时区,指定后value会变为特定时区下的timestamp
|
|
101
104
|
*/
|
|
102
|
-
timezone?: ZoneAlias
|
|
105
|
+
timezone?: ZoneAlias | {
|
|
106
|
+
label?: string;
|
|
107
|
+
value: ZoneAlias;
|
|
108
|
+
}[];
|
|
103
109
|
/**
|
|
104
110
|
* 只读模式下的分隔符(比插槽优先级更高)
|
|
105
111
|
*/
|
|
@@ -9,7 +9,10 @@ import { AlignType, BuildInPlacements } from '@aplus-frontend/antdv/es/vc-trigge
|
|
|
9
9
|
declare function __VLS_template(): {
|
|
10
10
|
attrs: Partial<{}>;
|
|
11
11
|
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
12
|
-
refs: {
|
|
12
|
+
refs: {
|
|
13
|
+
wrapperRef: HTMLDivElement;
|
|
14
|
+
valueRefs: HTMLSpanElement;
|
|
15
|
+
};
|
|
13
16
|
rootEl: HTMLDivElement;
|
|
14
17
|
};
|
|
15
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -92,7 +95,10 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
|
|
|
92
95
|
unitStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
93
96
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
94
97
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
95
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
98
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
99
|
+
wrapperRef: HTMLDivElement;
|
|
100
|
+
valueRefs: HTMLSpanElement;
|
|
101
|
+
}, HTMLDivElement>;
|
|
96
102
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
97
103
|
export default _default;
|
|
98
104
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Q, useSlots as U, ref as N, computed as h, unref as o, openBlock as l, createElementBlock as r, normalizeClass as a, createBlock as y, normalizeProps as E, mergeProps as C, createSlots as R, withCtx as c, Fragment as k, createElementVNode as m, normalizeStyle as p, toDisplayString as n, renderSlot as T, createCommentVNode as S, renderList as D, createTextVNode as X, isVNode as V, resolveDynamicComponent as b, createVNode as v } from "vue";
|
|
2
2
|
import { Tooltip as j } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { locales as
|
|
4
|
+
import { locales as Y } from "./interface.mjs";
|
|
5
5
|
import "./HelpMessageIcon.vue.mjs";
|
|
6
|
+
import { useWatchEllipsis as Z, ellipsisElementCls as A } from "./useWatchEllipsis.mjs";
|
|
6
7
|
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
8
|
import { useGlobalConfig as ee } from "../../config-provider/hooks/use-global-config.mjs";
|
|
8
|
-
import
|
|
9
|
-
const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = ["onClick"],
|
|
9
|
+
import M from "./HelpMessageIcon.vue2.mjs";
|
|
10
|
+
const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = ["onClick"], ne = { key: 0 }, se = { key: 1 }, Se = /* @__PURE__ */ Q({
|
|
10
11
|
name: "ApLadder",
|
|
11
12
|
__name: "ApLadder",
|
|
12
13
|
props: {
|
|
@@ -44,12 +45,18 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
44
45
|
tooltipLabelStyles: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
45
46
|
tooltipValueStyles: { type: [Boolean, null, String, Object, Array], default: void 0 }
|
|
46
47
|
},
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
48
|
+
setup(F) {
|
|
49
|
+
const P = U(), i = F, { b: z, e: s, m: G } = x("ap-ladder"), W = ee("uiMode", "aplus"), g = N([]), w = N(), H = Z(w);
|
|
50
|
+
function I(t) {
|
|
51
|
+
var f;
|
|
52
|
+
const u = (f = g.value) == null ? void 0 : f[t];
|
|
53
|
+
return u ? getComputedStyle(u).color : void 0;
|
|
54
|
+
}
|
|
55
|
+
const q = h(() => i.labelValues.length === 0), J = h(() => i.labelValues.length > 0), B = h(() => i.majorColor ? {
|
|
49
56
|
color: `${i.majorColor}`
|
|
50
|
-
} : {}),
|
|
57
|
+
} : {}), $ = h(() => i.minorColor ? {
|
|
51
58
|
color: `${i.minorColor}`
|
|
52
|
-
} : {}),
|
|
59
|
+
} : {}), _ = (t) => t == null || typeof t == "string" && t.trim() === "", d = (t, u = {}) => {
|
|
53
60
|
const e = {
|
|
54
61
|
rawValue: u.rawValue,
|
|
55
62
|
precision: u.precision === void 0 ? 2 : u.precision,
|
|
@@ -62,7 +69,7 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
62
69
|
return "--";
|
|
63
70
|
if (typeof t == "boolean")
|
|
64
71
|
return t;
|
|
65
|
-
if (
|
|
72
|
+
if (_(t))
|
|
66
73
|
return "--";
|
|
67
74
|
if (e.rawValue)
|
|
68
75
|
return t;
|
|
@@ -70,166 +77,164 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
70
77
|
if (e.percent)
|
|
71
78
|
return `${t.toFixed(e.precision)}%`;
|
|
72
79
|
if (e.currency)
|
|
73
|
-
return t.toLocaleString(
|
|
80
|
+
return t.toLocaleString(Y[e.currency], {
|
|
74
81
|
style: "currency",
|
|
75
82
|
currency: e.currency
|
|
76
83
|
});
|
|
77
84
|
if (e.thousand) {
|
|
78
|
-
const [
|
|
79
|
-
return `${
|
|
85
|
+
const [f, L] = t.toFixed(e.precision).split(".");
|
|
86
|
+
return `${f.replace(
|
|
80
87
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
81
88
|
`$1${e.thousandSeparator}`
|
|
82
|
-
)}.${
|
|
89
|
+
)}.${L}`;
|
|
83
90
|
}
|
|
84
91
|
return t.toFixed(e.precision);
|
|
85
92
|
}
|
|
86
93
|
return t;
|
|
87
|
-
},
|
|
88
|
-
const t = document.getElementById($);
|
|
89
|
-
if (!t)
|
|
90
|
-
return;
|
|
91
|
-
const u = t.querySelectorAll(`.${I}`);
|
|
92
|
-
new ResizeObserver((p) => {
|
|
93
|
-
p.forEach((v) => {
|
|
94
|
-
v.target === t && (h.value = !1, u.forEach((_) => {
|
|
95
|
-
_.clientWidth < _.scrollWidth && (h.value = !0);
|
|
96
|
-
}));
|
|
97
|
-
});
|
|
98
|
-
}).observe(t), h.value = !1, u.forEach((p) => {
|
|
99
|
-
p.clientWidth < p.scrollWidth && (h.value = !0);
|
|
100
|
-
});
|
|
101
|
-
}, L = g(() => M.title ? !0 : i.tooltip && o(h)), J = (t) => {
|
|
94
|
+
}, O = h(() => P.title ? !0 : i.tooltip && o(H)), K = (t) => {
|
|
102
95
|
t.link && window.open(t.link, "_blank"), typeof t.handleClickLink == "function" && t.handleClickLink();
|
|
103
96
|
};
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class: a([o(F)(), `${o(W)(o(G))}`])
|
|
97
|
+
return (t, u) => (l(), r("div", {
|
|
98
|
+
ref_key: "wrapperRef",
|
|
99
|
+
ref: w,
|
|
100
|
+
class: a([o(z)(), `${o(G)(o(W))}`])
|
|
109
101
|
}, [
|
|
110
|
-
q.value ? (l(), y(o(j), E(C({ key: 0 }, { ...i.tooltipProps })),
|
|
111
|
-
default:
|
|
112
|
-
!
|
|
102
|
+
q.value ? (l(), y(o(j), E(C({ key: 0 }, { ...i.tooltipProps })), R({
|
|
103
|
+
default: c(() => [
|
|
104
|
+
!_(t.major) || !_(t.minor) ? (l(), r(k, { key: 0 }, [
|
|
113
105
|
i.layout === "vertical" ? (l(), r(k, { key: 0 }, [
|
|
114
106
|
m("div", {
|
|
115
|
-
class: a([o(s)("major"), o(s)("ellipsis")]),
|
|
116
|
-
style:
|
|
117
|
-
}, n(
|
|
107
|
+
class: a([o(s)("major"), o(s)("ellipsis"), o(A)]),
|
|
108
|
+
style: p([t.majorStyles, B.value])
|
|
109
|
+
}, n(d(t.major)), 7),
|
|
118
110
|
m("div", {
|
|
119
|
-
class: a([o(s)("minor"), o(s)("ellipsis")]),
|
|
120
|
-
style:
|
|
121
|
-
}, n(
|
|
111
|
+
class: a([o(s)("minor"), o(s)("ellipsis"), o(A)]),
|
|
112
|
+
style: p([t.minorStyles, $.value])
|
|
113
|
+
}, n(d(t.minor)), 7)
|
|
122
114
|
], 64)) : (l(), r("div", {
|
|
123
115
|
key: 1,
|
|
124
|
-
class: a(o(s)("ellipsis"))
|
|
116
|
+
class: a([o(s)("ellipsis"), o(A)])
|
|
125
117
|
}, [
|
|
126
118
|
m("span", {
|
|
127
119
|
class: a([o(s)("major")]),
|
|
128
|
-
style:
|
|
129
|
-
}, n(
|
|
120
|
+
style: p([t.majorStyles, B.value])
|
|
121
|
+
}, n(d(t.major)), 7),
|
|
130
122
|
m("span", {
|
|
131
123
|
class: a([o(s)("minor")]),
|
|
132
|
-
style:
|
|
133
|
-
}, n(
|
|
124
|
+
style: p([t.minorStyles, $.value])
|
|
125
|
+
}, n(d(t.minor)), 7)
|
|
134
126
|
], 2))
|
|
135
127
|
], 64)) : (l(), r("div", te, n("--")))
|
|
136
128
|
]),
|
|
137
129
|
_: 2
|
|
138
130
|
}, [
|
|
139
|
-
|
|
131
|
+
O.value ? {
|
|
140
132
|
name: "title",
|
|
141
|
-
fn:
|
|
142
|
-
|
|
133
|
+
fn: c(() => [
|
|
134
|
+
P.title ? T(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
143
135
|
i.tooltipProps.title ? (l(), r("div", le, n(i.tooltipProps.title), 1)) : (l(), r("div", oe, [
|
|
144
|
-
m("div", null, n(
|
|
145
|
-
m("div", null, n(
|
|
136
|
+
m("div", null, n(d(t.major)), 1),
|
|
137
|
+
m("div", null, n(d(t.minor)), 1)
|
|
146
138
|
]))
|
|
147
139
|
], 64))
|
|
148
140
|
]),
|
|
149
141
|
key: "0"
|
|
150
142
|
} : void 0
|
|
151
143
|
]), 1040)) : S("", !0),
|
|
152
|
-
|
|
153
|
-
default:
|
|
154
|
-
(l(!0), r(k, null,
|
|
155
|
-
key:
|
|
144
|
+
J.value ? (l(), y(o(j), E(C({ key: 1 }, { ...i.tooltipProps })), R({
|
|
145
|
+
default: c(() => [
|
|
146
|
+
(l(!0), r(k, null, D(i.labelValues, (e, f) => (l(), r("div", {
|
|
147
|
+
key: f,
|
|
156
148
|
class: a([o(s)("cross-bar")])
|
|
157
149
|
}, [
|
|
158
150
|
m("div", {
|
|
159
|
-
class: a([o(s)("ellipsis")])
|
|
151
|
+
class: a([o(s)("ellipsis"), o(A)]),
|
|
152
|
+
style: p({ color: I(f) })
|
|
160
153
|
}, [
|
|
161
154
|
m("span", {
|
|
162
155
|
class: a(o(s)("label")),
|
|
163
|
-
style:
|
|
156
|
+
style: p([
|
|
164
157
|
t.labelStyles,
|
|
165
158
|
e.labelStyles,
|
|
166
159
|
e.labelColor ? { color: e.labelColor } : void 0,
|
|
167
160
|
{ textAlign: e.labelAlign || t.labelAlign }
|
|
168
161
|
])
|
|
169
162
|
}, [
|
|
170
|
-
|
|
163
|
+
X(n(e.label), 1),
|
|
171
164
|
e.label ? (l(), r("span", re, ":")) : S("", !0)
|
|
172
165
|
], 6),
|
|
173
|
-
|
|
166
|
+
V(e.value) ? (l(), y(b(e.value), {
|
|
174
167
|
key: 0,
|
|
168
|
+
ref_for: !0,
|
|
169
|
+
ref_key: "valueRefs",
|
|
170
|
+
ref: g,
|
|
175
171
|
style: { display: "inline-block" }
|
|
176
|
-
})) : typeof e.value == "function" ? (l(), y(b(e.value()), {
|
|
172
|
+
}, null, 512)) : typeof e.value == "function" ? (l(), y(b(e.value()), {
|
|
177
173
|
key: 1,
|
|
174
|
+
ref_for: !0,
|
|
175
|
+
ref_key: "valueRefs",
|
|
176
|
+
ref: g,
|
|
178
177
|
style: { display: "inline-block" }
|
|
179
|
-
})) : (l(), r(k, { key: 2 }, [
|
|
180
|
-
|
|
178
|
+
}, null, 512)) : (l(), r(k, { key: 2 }, [
|
|
179
|
+
_(e.link) ? (l(), r("span", {
|
|
181
180
|
key: 1,
|
|
181
|
+
ref_for: !0,
|
|
182
|
+
ref_key: "valueRefs",
|
|
183
|
+
ref: g,
|
|
182
184
|
class: a(o(s)("value")),
|
|
183
|
-
style:
|
|
185
|
+
style: p([
|
|
184
186
|
t.valueStyles,
|
|
185
187
|
e.valueStyles,
|
|
186
188
|
e.valueColor ? { color: e.valueColor } : void 0
|
|
187
189
|
])
|
|
188
|
-
}, n(
|
|
190
|
+
}, n(d(e.value, { ...e })), 7)) : (l(), r("span", {
|
|
189
191
|
key: 0,
|
|
192
|
+
ref_for: !0,
|
|
193
|
+
ref_key: "valueRefs",
|
|
194
|
+
ref: g,
|
|
190
195
|
class: a(o(s)("link")),
|
|
191
|
-
style:
|
|
196
|
+
style: p([
|
|
192
197
|
t.linkStyles,
|
|
193
198
|
e.linkStyles,
|
|
194
199
|
e.linkColor ? { color: e.linkColor } : void 0
|
|
195
200
|
]),
|
|
196
|
-
onClick: (
|
|
197
|
-
}, n(
|
|
201
|
+
onClick: (L) => K(e)
|
|
202
|
+
}, n(d(e.value, { ...e })), 15, ie))
|
|
198
203
|
], 64)),
|
|
199
204
|
e.unit ? (l(), r("span", {
|
|
200
205
|
key: 3,
|
|
201
206
|
class: a(o(s)("unit")),
|
|
202
|
-
style:
|
|
207
|
+
style: p([
|
|
203
208
|
t.unitStyles,
|
|
204
209
|
e.unitStyles,
|
|
205
210
|
e.unitColor ? { color: e.unitColor } : void 0
|
|
206
211
|
])
|
|
207
212
|
}, n(e.unit), 7)) : S("", !0)
|
|
208
|
-
],
|
|
213
|
+
], 6),
|
|
209
214
|
e.helpMessage ? (l(), r("div", {
|
|
210
215
|
key: 0,
|
|
211
216
|
class: a([o(s)("help-message")])
|
|
212
217
|
}, [
|
|
213
|
-
|
|
218
|
+
V(e.helpMessage) ? (l(), y(o(j), C({
|
|
214
219
|
key: 0,
|
|
215
220
|
ref_for: !0
|
|
216
221
|
}, { ...e.helpMessageTooltipProps }), {
|
|
217
|
-
title:
|
|
222
|
+
title: c(() => [
|
|
218
223
|
(l(), y(b(e.helpMessage)))
|
|
219
224
|
]),
|
|
220
|
-
default:
|
|
221
|
-
|
|
225
|
+
default: c(() => [
|
|
226
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
222
227
|
]),
|
|
223
228
|
_: 2
|
|
224
229
|
}, 1040)) : typeof e.helpMessage == "function" ? (l(), y(o(j), C({
|
|
225
230
|
key: 1,
|
|
226
231
|
ref_for: !0
|
|
227
232
|
}, { ...e.helpMessageTooltipProps }), {
|
|
228
|
-
title:
|
|
233
|
+
title: c(() => [
|
|
229
234
|
(l(), y(b(e.helpMessage())))
|
|
230
235
|
]),
|
|
231
|
-
default:
|
|
232
|
-
|
|
236
|
+
default: c(() => [
|
|
237
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
233
238
|
]),
|
|
234
239
|
_: 2
|
|
235
240
|
}, 1040)) : (l(), y(o(j), C({
|
|
@@ -239,8 +244,8 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
239
244
|
placement: "bottom",
|
|
240
245
|
title: e.helpMessage
|
|
241
246
|
}), {
|
|
242
|
-
default:
|
|
243
|
-
|
|
247
|
+
default: c(() => [
|
|
248
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
244
249
|
]),
|
|
245
250
|
_: 2
|
|
246
251
|
}, 1040, ["title"]))
|
|
@@ -249,20 +254,20 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
249
254
|
]),
|
|
250
255
|
_: 2
|
|
251
256
|
}, [
|
|
252
|
-
|
|
257
|
+
O.value ? {
|
|
253
258
|
name: "title",
|
|
254
|
-
fn:
|
|
255
|
-
|
|
256
|
-
i.tooltipProps.title ? (l(), r("div",
|
|
257
|
-
(l(!0), r(k, null,
|
|
258
|
-
key:
|
|
259
|
+
fn: c(() => [
|
|
260
|
+
P.title ? T(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
261
|
+
i.tooltipProps.title ? (l(), r("div", ne, n(i.tooltipProps.title), 1)) : (l(), r("div", se, [
|
|
262
|
+
(l(!0), r(k, null, D(i.labelValues, (e, f) => (l(), r("div", {
|
|
263
|
+
key: f,
|
|
259
264
|
style: { "word-break": "break-all" }
|
|
260
265
|
}, [
|
|
261
266
|
e.label ? (l(), r("span", {
|
|
262
267
|
key: 0,
|
|
263
|
-
style:
|
|
268
|
+
style: p([t.tooltipLabelStyles, e.tooltipLabelStyles])
|
|
264
269
|
}, n(e.label) + ":", 5)) : S("", !0),
|
|
265
|
-
|
|
270
|
+
V(e.value) ? (l(), y(b(e.value), {
|
|
266
271
|
key: 1,
|
|
267
272
|
style: { display: "inline-block" }
|
|
268
273
|
})) : typeof e.value == "function" ? (l(), y(b(e.value()), {
|
|
@@ -270,8 +275,8 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
270
275
|
style: { display: "inline-block" }
|
|
271
276
|
})) : (l(), r("span", {
|
|
272
277
|
key: 3,
|
|
273
|
-
style:
|
|
274
|
-
}, n(
|
|
278
|
+
style: p([t.tooltipValueStyles, e.tooltipValueStyles])
|
|
279
|
+
}, n(d(e.value, { ...e })), 5))
|
|
275
280
|
]))), 128))
|
|
276
281
|
]))
|
|
277
282
|
], 64))
|
|
@@ -283,5 +288,5 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
283
288
|
}
|
|
284
289
|
});
|
|
285
290
|
export {
|
|
286
|
-
|
|
291
|
+
Se as default
|
|
287
292
|
};
|
|
@@ -87,7 +87,10 @@ declare const ApLadder: {
|
|
|
87
87
|
unitStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
88
88
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
89
89
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
90
|
-
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
90
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
91
|
+
wrapperRef: HTMLDivElement;
|
|
92
|
+
valueRefs: HTMLSpanElement;
|
|
93
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
91
94
|
P: {};
|
|
92
95
|
B: {};
|
|
93
96
|
D: {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { isClient as a } from "@vueuse/core";
|
|
2
|
+
import { ref as c, watch as n } from "vue";
|
|
3
|
+
const r = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
let l;
|
|
5
|
+
const p = "ap-ladder-is-ellipsised";
|
|
6
|
+
function o(i) {
|
|
7
|
+
const t = i.querySelectorAll(`.${p}`);
|
|
8
|
+
let e = !1;
|
|
9
|
+
return t.forEach((s) => {
|
|
10
|
+
s.clientWidth < s.scrollWidth && (e = !0);
|
|
11
|
+
}), e;
|
|
12
|
+
}
|
|
13
|
+
a && (l = new ResizeObserver((i) => {
|
|
14
|
+
for (const t of i) {
|
|
15
|
+
const e = t.target;
|
|
16
|
+
if (r.has(e)) {
|
|
17
|
+
const s = o(e);
|
|
18
|
+
r.get(e).value = s;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
const h = (i) => {
|
|
23
|
+
const t = c(!1);
|
|
24
|
+
return n(
|
|
25
|
+
() => i.value,
|
|
26
|
+
(e, s) => {
|
|
27
|
+
e && l.observe(e), s && l.unobserve(s), e && r.set(e, t), s && r.delete(s), e && (t.value = o(e));
|
|
28
|
+
},
|
|
29
|
+
{ flush: "post", immediate: !0 }
|
|
30
|
+
), t;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
p as ellipsisElementCls,
|
|
34
|
+
h as useWatchEllipsis
|
|
35
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { unref as o, computed as
|
|
2
|
-
import { get as
|
|
1
|
+
import { unref as o, computed as s, isRef as m, ref as c, inject as u } from "vue";
|
|
2
|
+
import { get as a } from "lodash-unified";
|
|
3
3
|
import "../../locale/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
const f = (e) => (t, r) => i(t, r, o(e)), i = (e, t, r) =>
|
|
4
|
+
import l from "../../locale/lang/zh-cn.mjs";
|
|
5
|
+
const f = (e) => (t, r) => i(t, r, o(e)), i = (e, t, r) => a(r, e, e).replace(
|
|
6
6
|
/\{(\w+)\}/g,
|
|
7
7
|
(b, n) => `${(t == null ? void 0 : t[n]) ?? `{${n}}`}`
|
|
8
8
|
), x = (e) => {
|
|
9
|
-
const t =
|
|
9
|
+
const t = s(() => o(e).name), r = m(e) ? e : c(e);
|
|
10
10
|
return {
|
|
11
11
|
lang: t,
|
|
12
12
|
locale: r,
|
|
13
13
|
t: f(e)
|
|
14
14
|
};
|
|
15
15
|
}, C = Symbol("localeContextKey"), K = (e) => {
|
|
16
|
-
const t = e ||
|
|
17
|
-
return x(
|
|
16
|
+
const t = e || u(C, c());
|
|
17
|
+
return x(s(() => (t == null ? void 0 : t.value) || l));
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
x as buildLocaleContext,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FullScreenMode, FullScreenProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare function enter(mode: FullScreenMode, force?: boolean): Promise<void>;
|
|
4
|
+
declare function exit(force?: boolean): Promise<void>;
|
|
5
|
+
declare function toggle(mode: FullScreenMode, force?: boolean): Promise<void>;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {
|
|
10
|
+
full: boolean;
|
|
11
|
+
enter: typeof enter;
|
|
12
|
+
exit: typeof exit;
|
|
13
|
+
toggle: typeof toggle;
|
|
14
|
+
mode: FullScreenMode | undefined;
|
|
15
|
+
portalRoot: HTMLDivElement | undefined;
|
|
16
|
+
}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {
|
|
19
|
+
target: unknown;
|
|
20
|
+
portalRootRef: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
rootEl: any;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: DefineComponent<FullScreenProps, {
|
|
26
|
+
target: ComputedRef<HTMLElement | null | undefined>;
|
|
27
|
+
portalRoot: ComputedRef<HTMLDivElement | undefined>;
|
|
28
|
+
full: ComputedRef<boolean>;
|
|
29
|
+
mode: ComputedRef<FullScreenMode | undefined>;
|
|
30
|
+
enter: typeof enter;
|
|
31
|
+
exit: typeof exit;
|
|
32
|
+
toggle: typeof toggle;
|
|
33
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FullScreenProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
34
|
+
target: unknown;
|
|
35
|
+
portalRootRef: HTMLDivElement;
|
|
36
|
+
}, any>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|