@aplus-frontend/ui 0.4.9 → 0.4.11
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 +98 -70
- 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 +3 -2
- package/es/src/ap-field/hooks/use-default-presets.mjs +8 -8
- package/es/src/ap-field/interface.d.ts +8 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +6 -2
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +118 -95
- package/es/src/business/ap-ladder/index.d.ts +3 -1
- 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 +84 -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 +50 -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/scroll-view/hooks/use-scroll-back.d.ts +26 -0
- package/es/src/scroll-view/hooks/use-scroll-back.mjs +37 -0
- package/es/src/scroll-view/hooks/use-scroll-smooth.d.ts +26 -0
- package/es/src/scroll-view/hooks/use-scroll-smooth.mjs +50 -0
- package/es/src/scroll-view/index.vue.d.ts +12 -3
- package/es/src/scroll-view/index.vue.mjs +172 -120
- package/es/src/scroll-view/interface.d.ts +40 -0
- package/es/src/scroll-view/utils/index.d.ts +11 -0
- package/es/src/scroll-view/utils/index.mjs +18 -0
- 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 +3 -2
- 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 +6 -2
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +3 -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/scroll-view/hooks/use-scroll-back.d.ts +26 -0
- package/lib/src/scroll-view/hooks/use-scroll-back.js +1 -0
- package/lib/src/scroll-view/hooks/use-scroll-smooth.d.ts +26 -0
- package/lib/src/scroll-view/hooks/use-scroll-smooth.js +1 -0
- package/lib/src/scroll-view/index.vue.d.ts +12 -3
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/scroll-view/interface.d.ts +40 -0
- package/lib/src/scroll-view/utils/index.d.ts +11 -0
- package/lib/src/scroll-view/utils/index.js +1 -0
- package/package.json +3 -3
- package/theme/ap-form/ap-form-item.css +4 -0
- package/theme/ap-form/ap-form-item.less +7 -0
- package/theme/ap-form/index.css +18 -0
- 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 +4 -0
- package/theme/ap-table/ap-table.css +18 -0
- package/theme/ap-table-modal/index.css +18 -0
- package/theme/editable-table/index.css +18 -0
- package/theme/full-screen/index.css +6 -0
- package/theme/full-screen/index.less +12 -0
- package/theme/index.css +24 -0
- package/theme/index.less +1 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { presetsDefault as
|
|
3
|
-
const b = (e) =>
|
|
4
|
-
var
|
|
5
|
-
return e.presets === !0 ?
|
|
6
|
-
var
|
|
1
|
+
import { computed as f } from "vue";
|
|
2
|
+
import { presetsDefault as n } from "../../utils/data-range-persets.mjs";
|
|
3
|
+
const b = (e) => f(() => {
|
|
4
|
+
var u, l, a;
|
|
5
|
+
return e.presets === !0 ? n((u = e == null ? void 0 : e.timezone) == null ? void 0 : u.value) : (a = (l = e == null ? void 0 : e.presets) == null ? void 0 : l.map) == null ? void 0 : a.call(l, (t) => {
|
|
6
|
+
var m;
|
|
7
7
|
return {
|
|
8
|
-
label:
|
|
9
|
-
value: (
|
|
8
|
+
label: t.label,
|
|
9
|
+
value: (m = t == null ? void 0 : t.value) == null ? void 0 : m.filter((r) => r !== null)
|
|
10
10
|
};
|
|
11
11
|
});
|
|
12
12
|
});
|
|
@@ -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,9 @@ 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
|
+
valueRefs: HTMLSpanElement;
|
|
14
|
+
};
|
|
13
15
|
rootEl: HTMLDivElement;
|
|
14
16
|
};
|
|
15
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
@@ -92,7 +94,9 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
|
|
|
92
94
|
unitStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
93
95
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
94
96
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
95
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
97
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
98
|
+
valueRefs: HTMLSpanElement;
|
|
99
|
+
}, HTMLDivElement>;
|
|
96
100
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
97
101
|
export default _default;
|
|
98
102
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as Y, useSlots as Z, ref as R, useTemplateRef as x, computed as C, unref as o, onMounted as ee, onUnmounted as te, openBlock as l, createElementBlock as r, normalizeClass as y, createBlock as p, normalizeProps as T, mergeProps as j, createSlots as z, withCtx as f, Fragment as k, createElementVNode as m, normalizeStyle as d, toDisplayString as i, renderSlot as W, createCommentVNode as S, renderList as D, createTextVNode as le, isVNode as V, resolveDynamicComponent as b, createVNode as $ } from "vue";
|
|
2
|
+
import { Tooltip as v } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { locales as
|
|
4
|
+
import { locales as oe } from "./interface.mjs";
|
|
5
5
|
import "./HelpMessageIcon.vue.mjs";
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
import { useGlobalConfig as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
6
|
+
import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
import { useGlobalConfig as se } from "../../config-provider/hooks/use-global-config.mjs";
|
|
8
|
+
import B from "./HelpMessageIcon.vue2.mjs";
|
|
9
|
+
const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = ["onClick"], pe = { key: 0 }, de = { key: 1 }, Ce = /* @__PURE__ */ Y({
|
|
10
10
|
name: "ApLadder",
|
|
11
11
|
__name: "ApLadder",
|
|
12
12
|
props: {
|
|
@@ -44,19 +44,25 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
44
44
|
tooltipLabelStyles: { type: [Boolean, null, String, Object, Array], default: void 0 },
|
|
45
45
|
tooltipValueStyles: { type: [Boolean, null, String, Object, Array], default: void 0 }
|
|
46
46
|
},
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
setup(F) {
|
|
48
|
+
const P = Z(), s = F, { b: G, e: n, m: I } = re("ap-ladder"), q = se("uiMode", "aplus"), O = `ap-ladder-${Math.floor(Math.random() * 1e7)}`, H = n("ellipsis"), h = R(!1), _ = R(), g = x("valueRefs");
|
|
49
|
+
function U(t) {
|
|
50
|
+
var u;
|
|
51
|
+
const a = (u = g.value) == null ? void 0 : u[t];
|
|
52
|
+
return a ? getComputedStyle(a).color : void 0;
|
|
53
|
+
}
|
|
54
|
+
const J = C(() => s.labelValues.length === 0), K = C(() => s.labelValues.length > 0), w = C(() => s.majorColor ? {
|
|
55
|
+
color: `${s.majorColor}`
|
|
56
|
+
} : {}), E = C(() => s.minorColor ? {
|
|
57
|
+
color: `${s.minorColor}`
|
|
58
|
+
} : {}), A = (t) => t == null || typeof t == "string" && t.trim() === "", c = (t, a = {}) => {
|
|
53
59
|
const e = {
|
|
54
|
-
rawValue:
|
|
55
|
-
precision:
|
|
56
|
-
thousand:
|
|
57
|
-
thousandSeparator:
|
|
58
|
-
currency:
|
|
59
|
-
percent:
|
|
60
|
+
rawValue: a.rawValue,
|
|
61
|
+
precision: a.precision === void 0 ? 2 : a.precision,
|
|
62
|
+
thousand: a.thousand,
|
|
63
|
+
thousandSeparator: a.thousandSeparator || ",",
|
|
64
|
+
currency: a.currency,
|
|
65
|
+
percent: a.percent
|
|
60
66
|
};
|
|
61
67
|
if (t === null || typeof t == "object" || typeof t == "function" || typeof t > "u")
|
|
62
68
|
return "--";
|
|
@@ -70,96 +76,101 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
70
76
|
if (e.percent)
|
|
71
77
|
return `${t.toFixed(e.precision)}%`;
|
|
72
78
|
if (e.currency)
|
|
73
|
-
return t.toLocaleString(
|
|
79
|
+
return t.toLocaleString(oe[e.currency], {
|
|
74
80
|
style: "currency",
|
|
75
81
|
currency: e.currency
|
|
76
82
|
});
|
|
77
83
|
if (e.thousand) {
|
|
78
|
-
const [
|
|
79
|
-
return `${
|
|
84
|
+
const [u, M] = t.toFixed(e.precision).split(".");
|
|
85
|
+
return `${u.replace(
|
|
80
86
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
81
87
|
`$1${e.thousandSeparator}`
|
|
82
|
-
)}.${
|
|
88
|
+
)}.${M}`;
|
|
83
89
|
}
|
|
84
90
|
return t.toFixed(e.precision);
|
|
85
91
|
}
|
|
86
92
|
return t;
|
|
87
|
-
},
|
|
88
|
-
|
|
93
|
+
}, Q = () => {
|
|
94
|
+
var e;
|
|
95
|
+
const t = document.getElementById(O);
|
|
89
96
|
if (!t)
|
|
90
97
|
return;
|
|
91
|
-
const
|
|
92
|
-
new ResizeObserver((
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
98
|
+
const a = t.querySelectorAll(`.${H}`);
|
|
99
|
+
_.value = new ResizeObserver((u) => {
|
|
100
|
+
u.forEach((M) => {
|
|
101
|
+
M.target === t && (h.value = !1, a.forEach((N) => {
|
|
102
|
+
N.clientWidth < N.scrollWidth && (h.value = !0);
|
|
96
103
|
}));
|
|
97
104
|
});
|
|
98
|
-
}).observe(t), h.value = !1,
|
|
99
|
-
|
|
105
|
+
}), (e = o(_)) == null || e.observe(t), h.value = !1, a.forEach((u) => {
|
|
106
|
+
u.clientWidth < u.scrollWidth && (h.value = !0);
|
|
100
107
|
});
|
|
101
|
-
}, L =
|
|
108
|
+
}, L = C(() => P.title ? !0 : s.tooltip && o(h)), X = (t) => {
|
|
102
109
|
t.link && window.open(t.link, "_blank"), typeof t.handleClickLink == "function" && t.handleClickLink();
|
|
103
110
|
};
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
}), (
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
return ee(() => {
|
|
112
|
+
Q();
|
|
113
|
+
}), te(() => {
|
|
114
|
+
var t;
|
|
115
|
+
o(_) && ((t = o(_)) == null || t.disconnect());
|
|
116
|
+
}), (t, a) => (l(), r("div", {
|
|
117
|
+
id: O,
|
|
118
|
+
class: y([o(G)(), `${o(I)(o(q))}`])
|
|
109
119
|
}, [
|
|
110
|
-
|
|
120
|
+
J.value ? (l(), p(o(v), T(j({ key: 0 }, { ...s.tooltipProps })), z({
|
|
111
121
|
default: f(() => [
|
|
112
122
|
!A(t.major) || !A(t.minor) ? (l(), r(k, { key: 0 }, [
|
|
113
|
-
|
|
123
|
+
s.layout === "vertical" ? (l(), r(k, { key: 0 }, [
|
|
114
124
|
m("div", {
|
|
115
|
-
class:
|
|
116
|
-
style: d([t.majorStyles,
|
|
117
|
-
},
|
|
125
|
+
class: y([o(n)("major"), o(n)("ellipsis")]),
|
|
126
|
+
style: d([t.majorStyles, w.value])
|
|
127
|
+
}, i(c(t.major)), 7),
|
|
118
128
|
m("div", {
|
|
119
|
-
class:
|
|
120
|
-
style: d([t.minorStyles,
|
|
121
|
-
},
|
|
129
|
+
class: y([o(n)("minor"), o(n)("ellipsis")]),
|
|
130
|
+
style: d([t.minorStyles, E.value])
|
|
131
|
+
}, i(c(t.minor)), 7)
|
|
122
132
|
], 64)) : (l(), r("div", {
|
|
123
133
|
key: 1,
|
|
124
|
-
class:
|
|
134
|
+
class: y(o(n)("ellipsis"))
|
|
125
135
|
}, [
|
|
126
136
|
m("span", {
|
|
127
|
-
class:
|
|
128
|
-
style: d([t.majorStyles,
|
|
129
|
-
},
|
|
137
|
+
class: y([o(n)("major")]),
|
|
138
|
+
style: d([t.majorStyles, w.value])
|
|
139
|
+
}, i(c(t.major)), 7),
|
|
130
140
|
m("span", {
|
|
131
|
-
class:
|
|
132
|
-
style: d([t.minorStyles,
|
|
133
|
-
},
|
|
141
|
+
class: y([o(n)("minor")]),
|
|
142
|
+
style: d([t.minorStyles, E.value])
|
|
143
|
+
}, i(c(t.minor)), 7)
|
|
134
144
|
], 2))
|
|
135
|
-
], 64)) : (l(), r("div",
|
|
145
|
+
], 64)) : (l(), r("div", ne, i("--")))
|
|
136
146
|
]),
|
|
137
147
|
_: 2
|
|
138
148
|
}, [
|
|
139
149
|
L.value ? {
|
|
140
150
|
name: "title",
|
|
141
151
|
fn: f(() => [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
m("div", null,
|
|
145
|
-
m("div", null,
|
|
152
|
+
P.title ? W(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
153
|
+
s.tooltipProps.title ? (l(), r("div", ie, i(s.tooltipProps.title), 1)) : (l(), r("div", ae, [
|
|
154
|
+
m("div", null, i(c(t.major)), 1),
|
|
155
|
+
m("div", null, i(c(t.minor)), 1)
|
|
146
156
|
]))
|
|
147
157
|
], 64))
|
|
148
158
|
]),
|
|
149
159
|
key: "0"
|
|
150
160
|
} : void 0
|
|
151
161
|
]), 1040)) : S("", !0),
|
|
152
|
-
|
|
162
|
+
K.value ? (l(), p(o(v), T(j({ key: 1 }, { ...s.tooltipProps })), z({
|
|
153
163
|
default: f(() => [
|
|
154
|
-
(l(!0), r(k, null,
|
|
155
|
-
key:
|
|
156
|
-
class:
|
|
164
|
+
(l(!0), r(k, null, D(s.labelValues, (e, u) => (l(), r("div", {
|
|
165
|
+
key: u,
|
|
166
|
+
class: y([o(n)("cross-bar")])
|
|
157
167
|
}, [
|
|
158
168
|
m("div", {
|
|
159
|
-
class:
|
|
169
|
+
class: y([o(n)("ellipsis")]),
|
|
170
|
+
style: d({ color: U(u) })
|
|
160
171
|
}, [
|
|
161
172
|
m("span", {
|
|
162
|
-
class:
|
|
173
|
+
class: y(o(n)("label")),
|
|
163
174
|
style: d([
|
|
164
175
|
t.labelStyles,
|
|
165
176
|
e.labelStyles,
|
|
@@ -167,72 +178,84 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
167
178
|
{ textAlign: e.labelAlign || t.labelAlign }
|
|
168
179
|
])
|
|
169
180
|
}, [
|
|
170
|
-
|
|
171
|
-
e.label ? (l(), r("span",
|
|
181
|
+
le(i(e.label), 1),
|
|
182
|
+
e.label ? (l(), r("span", ue, ":")) : S("", !0)
|
|
172
183
|
], 6),
|
|
173
|
-
|
|
184
|
+
V(e.value) ? (l(), p(b(e.value), {
|
|
174
185
|
key: 0,
|
|
186
|
+
ref_for: !0,
|
|
187
|
+
ref_key: "valueRefs",
|
|
188
|
+
ref: g,
|
|
175
189
|
style: { display: "inline-block" }
|
|
176
|
-
})) : typeof e.value == "function" ? (l(),
|
|
190
|
+
}, null, 512)) : typeof e.value == "function" ? (l(), p(b(e.value()), {
|
|
177
191
|
key: 1,
|
|
192
|
+
ref_for: !0,
|
|
193
|
+
ref_key: "valueRefs",
|
|
194
|
+
ref: g,
|
|
178
195
|
style: { display: "inline-block" }
|
|
179
|
-
})) : (l(), r(k, { key: 2 }, [
|
|
196
|
+
}, null, 512)) : (l(), r(k, { key: 2 }, [
|
|
180
197
|
A(e.link) ? (l(), r("span", {
|
|
181
198
|
key: 1,
|
|
182
|
-
|
|
199
|
+
ref_for: !0,
|
|
200
|
+
ref_key: "valueRefs",
|
|
201
|
+
ref: g,
|
|
202
|
+
class: y(o(n)("value")),
|
|
183
203
|
style: d([
|
|
184
204
|
t.valueStyles,
|
|
185
205
|
e.valueStyles,
|
|
186
206
|
e.valueColor ? { color: e.valueColor } : void 0
|
|
187
207
|
])
|
|
188
|
-
},
|
|
208
|
+
}, i(c(e.value, { ...e })), 7)) : (l(), r("span", {
|
|
189
209
|
key: 0,
|
|
190
|
-
|
|
210
|
+
ref_for: !0,
|
|
211
|
+
ref_key: "valueRefs",
|
|
212
|
+
ref: g,
|
|
213
|
+
class: y(o(n)("link")),
|
|
191
214
|
style: d([
|
|
192
215
|
t.linkStyles,
|
|
193
216
|
e.linkStyles,
|
|
194
217
|
e.linkColor ? { color: e.linkColor } : void 0
|
|
195
218
|
]),
|
|
196
|
-
onClick: (
|
|
197
|
-
},
|
|
219
|
+
onClick: (M) => X(e)
|
|
220
|
+
}, i(c(e.value, { ...e })), 15, ye))
|
|
198
221
|
], 64)),
|
|
199
222
|
e.unit ? (l(), r("span", {
|
|
200
223
|
key: 3,
|
|
201
|
-
class:
|
|
224
|
+
class: y(o(n)("unit")),
|
|
202
225
|
style: d([
|
|
203
226
|
t.unitStyles,
|
|
204
227
|
e.unitStyles,
|
|
205
228
|
e.unitColor ? { color: e.unitColor } : void 0
|
|
206
229
|
])
|
|
207
|
-
},
|
|
208
|
-
],
|
|
230
|
+
}, i(e.unit), 7)) : S("", !0)
|
|
231
|
+
], 6),
|
|
209
232
|
e.helpMessage ? (l(), r("div", {
|
|
210
233
|
key: 0,
|
|
211
|
-
class:
|
|
234
|
+
class: y([o(n)("help-message")])
|
|
212
235
|
}, [
|
|
213
|
-
|
|
236
|
+
V(e.helpMessage) ? (l(), p(o(v), j({
|
|
214
237
|
key: 0,
|
|
215
238
|
ref_for: !0
|
|
216
239
|
}, { ...e.helpMessageTooltipProps }), {
|
|
217
240
|
title: f(() => [
|
|
218
|
-
(l(),
|
|
241
|
+
(l(), p(b(e.helpMessage)))
|
|
219
242
|
]),
|
|
220
243
|
default: f(() => [
|
|
221
|
-
|
|
244
|
+
$(B, { lv: e }, null, 8, ["lv"])
|
|
222
245
|
]),
|
|
223
246
|
_: 2
|
|
224
|
-
}, 1040)) : typeof e.helpMessage == "function" ? (l(),
|
|
247
|
+
}, 1040)) : typeof e.helpMessage == "function" ? (l(), p(o(v), j({
|
|
225
248
|
key: 1,
|
|
226
249
|
ref_for: !0
|
|
227
250
|
}, { ...e.helpMessageTooltipProps }), {
|
|
228
251
|
title: f(() => [
|
|
229
|
-
(l(),
|
|
252
|
+
(l(), p(b(e.helpMessage())))
|
|
230
253
|
]),
|
|
231
254
|
default: f(() => [
|
|
232
|
-
|
|
255
|
+
$(B, { lv: e }, null, 8, ["lv"])
|
|
233
256
|
]),
|
|
234
257
|
_: 2
|
|
235
|
-
}, 1040)) : (l(),
|
|
258
|
+
}, 1040)) : (l(), p(o(v), j({
|
|
236
259
|
key: 2,
|
|
237
260
|
ref_for: !0
|
|
238
261
|
}, { ...e.helpMessageTooltipProps }, {
|
|
@@ -240,7 +263,7 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
240
263
|
title: e.helpMessage
|
|
241
264
|
}), {
|
|
242
265
|
default: f(() => [
|
|
243
|
-
|
|
266
|
+
$(B, { lv: e }, null, 8, ["lv"])
|
|
244
267
|
]),
|
|
245
268
|
_: 2
|
|
246
269
|
}, 1040, ["title"]))
|
|
@@ -252,26 +275,26 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
252
275
|
L.value ? {
|
|
253
276
|
name: "title",
|
|
254
277
|
fn: f(() => [
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
(l(!0), r(k, null,
|
|
258
|
-
key:
|
|
278
|
+
P.title ? W(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
279
|
+
s.tooltipProps.title ? (l(), r("div", pe, i(s.tooltipProps.title), 1)) : (l(), r("div", de, [
|
|
280
|
+
(l(!0), r(k, null, D(s.labelValues, (e, u) => (l(), r("div", {
|
|
281
|
+
key: u,
|
|
259
282
|
style: { "word-break": "break-all" }
|
|
260
283
|
}, [
|
|
261
284
|
e.label ? (l(), r("span", {
|
|
262
285
|
key: 0,
|
|
263
286
|
style: d([t.tooltipLabelStyles, e.tooltipLabelStyles])
|
|
264
|
-
},
|
|
265
|
-
|
|
287
|
+
}, i(e.label) + ":", 5)) : S("", !0),
|
|
288
|
+
V(e.value) ? (l(), p(b(e.value), {
|
|
266
289
|
key: 1,
|
|
267
290
|
style: { display: "inline-block" }
|
|
268
|
-
})) : typeof e.value == "function" ? (l(),
|
|
291
|
+
})) : typeof e.value == "function" ? (l(), p(b(e.value()), {
|
|
269
292
|
key: 2,
|
|
270
293
|
style: { display: "inline-block" }
|
|
271
294
|
})) : (l(), r("span", {
|
|
272
295
|
key: 3,
|
|
273
296
|
style: d([t.tooltipValueStyles, e.tooltipValueStyles])
|
|
274
|
-
},
|
|
297
|
+
}, i(c(e.value, { ...e })), 5))
|
|
275
298
|
]))), 128))
|
|
276
299
|
]))
|
|
277
300
|
], 64))
|
|
@@ -283,5 +306,5 @@ const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = [
|
|
|
283
306
|
}
|
|
284
307
|
});
|
|
285
308
|
export {
|
|
286
|
-
|
|
309
|
+
Ce as default
|
|
287
310
|
};
|
|
@@ -87,7 +87,9 @@ 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
|
+
valueRefs: HTMLSpanElement;
|
|
92
|
+
}, HTMLDivElement, ComponentProvideOptions, {
|
|
91
93
|
P: {};
|
|
92
94
|
B: {};
|
|
93
95
|
D: {};
|
|
@@ -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
|
+
protalRootRef: 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
|
+
protalRootRef: 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
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { defineComponent as k, ref as u, watch as E, unref as a, computed as n, openBlock as m, createBlock as d, withCtx as v, resolveDynamicComponent as z, mergeProps as C, renderSlot as F, createElementVNode as N, normalizeClass as S } from "vue";
|
|
2
|
+
import "../hooks/index.mjs";
|
|
3
|
+
import "../portal/index.mjs";
|
|
4
|
+
import "../config-provider/index.mjs";
|
|
5
|
+
import { useScrollLock as h } from "@vueuse/core";
|
|
6
|
+
import { useFullScreen as I } from "../hooks/useFullScreen.mjs";
|
|
7
|
+
import { useNamespace as $ } from "../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import B from "../portal/index.vue.mjs";
|
|
9
|
+
const H = /* @__PURE__ */ k({
|
|
10
|
+
name: "FullScreen",
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
wrapperElementName: { default: "div" },
|
|
14
|
+
zIndex: { default: 2147483647 }
|
|
15
|
+
},
|
|
16
|
+
setup(L, { expose: w }) {
|
|
17
|
+
const {
|
|
18
|
+
target: i,
|
|
19
|
+
full: b,
|
|
20
|
+
enter: y,
|
|
21
|
+
exit: _
|
|
22
|
+
} = I(), { b: x, bm: g, be: R } = $("full-screen"), t = u(!1), l = u(), f = h(document.body), p = u();
|
|
23
|
+
E(
|
|
24
|
+
() => a(b),
|
|
25
|
+
(e) => {
|
|
26
|
+
e || (t.value = !1, l.value = void 0);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
async function r(e, o = !1) {
|
|
30
|
+
await s(), t.value = !0, l.value = e, e === "browser" ? y(o) : f.value = !0;
|
|
31
|
+
}
|
|
32
|
+
async function s(e = !1) {
|
|
33
|
+
t.value = !1, l.value === "browser" ? await _(e) : f.value = !1, l.value = void 0;
|
|
34
|
+
}
|
|
35
|
+
async function c(e, o = !1) {
|
|
36
|
+
t.value ? l.value !== e ? await r(e, o) : await s(o) : await r(e, o);
|
|
37
|
+
}
|
|
38
|
+
return w({
|
|
39
|
+
target: n(() => a(i)),
|
|
40
|
+
portalRoot: n(() => a(p)),
|
|
41
|
+
full: n(() => a(t)),
|
|
42
|
+
mode: n(() => a(l)),
|
|
43
|
+
enter: r,
|
|
44
|
+
exit: s,
|
|
45
|
+
toggle: c
|
|
46
|
+
}), (e, o) => (m(), d(a(B), {
|
|
47
|
+
to: "body",
|
|
48
|
+
disabled: l.value !== "window"
|
|
49
|
+
}, {
|
|
50
|
+
default: v(() => [
|
|
51
|
+
(m(), d(z(e.wrapperElementName), C({
|
|
52
|
+
ref_key: "target",
|
|
53
|
+
ref: i
|
|
54
|
+
}, e.$attrs, {
|
|
55
|
+
class: [
|
|
56
|
+
a(x)("wrapper"),
|
|
57
|
+
t.value && l.value === "window" ? a(g)("wrapper", "full") : null
|
|
58
|
+
],
|
|
59
|
+
style: { zIndex: t.value && l.value === "window" ? e.zIndex : "unset" }
|
|
60
|
+
}), {
|
|
61
|
+
default: v(() => [
|
|
62
|
+
F(e.$slots, "default", {
|
|
63
|
+
full: t.value,
|
|
64
|
+
enter: r,
|
|
65
|
+
exit: s,
|
|
66
|
+
toggle: c,
|
|
67
|
+
mode: l.value,
|
|
68
|
+
portalRoot: p.value
|
|
69
|
+
}),
|
|
70
|
+
N("div", {
|
|
71
|
+
ref: "protalRootRef",
|
|
72
|
+
class: S(a(R)("wrapper", "portal-root"))
|
|
73
|
+
}, null, 2)
|
|
74
|
+
]),
|
|
75
|
+
_: 3
|
|
76
|
+
}, 16, ["class", "style"]))
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}, 8, ["disabled"]));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
H as default
|
|
84
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export type FullScreenMode = 'browser' | 'window';
|
|
3
|
+
export type FullScreenProps = {
|
|
4
|
+
/**
|
|
5
|
+
* 容器元素标签名
|
|
6
|
+
*/
|
|
7
|
+
wrapperElementName?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 全屏状态下的css zIndex 默认为2^31 - 1
|
|
10
|
+
*/
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
};
|
|
13
|
+
export type FullScreenExpose = {
|
|
14
|
+
/**
|
|
15
|
+
* 全屏的目标元素
|
|
16
|
+
*/
|
|
17
|
+
target: ComputedRef<HTMLElement>;
|
|
18
|
+
/**
|
|
19
|
+
* 目标元素内用于渲染全局组件的容器
|
|
20
|
+
*/
|
|
21
|
+
portalRoot: ComputedRef<HTMLDivElement>;
|
|
22
|
+
/**
|
|
23
|
+
* 当前是否全屏
|
|
24
|
+
*/
|
|
25
|
+
full: ComputedRef<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* 当前的全屏模式
|
|
28
|
+
*/
|
|
29
|
+
mode: ComputedRef<FullScreenMode>;
|
|
30
|
+
/**
|
|
31
|
+
* 进入全屏
|
|
32
|
+
* @param mode 全屏模式 窗口全屏/浏览器全屏
|
|
33
|
+
* @param force
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
enter: (mode: FullScreenMode, force?: boolean) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* 退出全屏
|
|
39
|
+
* @param force
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
exit: (force?: boolean) => Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* 切换全屏状态
|
|
45
|
+
* @param mode 全屏模式
|
|
46
|
+
* @param force
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
toggle: (mode: FullScreenMode, force?: boolean) => Promise<void>;
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui/theme/full-screen/index.css';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@aplus-frontend/ui/theme/full-screen/index.less';
|