@das-fed/ui 6.4.0-dev.83 → 6.4.0-dev.85
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/package.json +5 -5
- package/packages/components/alert/index.d.ts +9 -9
- package/packages/components/alert/src/index.vue.d.ts +1 -1
- package/packages/components/autocomplete/index.d.ts +9 -9
- package/packages/components/autocomplete/src/index.vue.d.ts +1 -1
- package/packages/components/text-tooltip/index.js +414 -414
- package/packages/components/text-tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/index.d.ts +11 -2
- package/packages/components/tooltip/index.js +74 -68
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/src/index.vue.d.ts +1 -0
- package/packages/components/tooltip/src/type.d.ts +15 -2
- package/packages/components/tooltip/style.css +1 -1
- package/packages/components/tooltip/style.css.gz +0 -0
|
Binary file
|
|
@@ -5,6 +5,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
5
5
|
$props: {
|
|
6
6
|
readonly selfPopperClass?: string | undefined;
|
|
7
7
|
readonly effect?: ("dark" | "light") | undefined;
|
|
8
|
+
readonly placement?: ("top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end") | undefined;
|
|
8
9
|
readonly customClass?: string | undefined;
|
|
9
10
|
readonly content?: string | undefined;
|
|
10
11
|
readonly disabled?: boolean | undefined;
|
|
@@ -43,6 +44,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
43
44
|
text: string;
|
|
44
45
|
selfPopperClass: string;
|
|
45
46
|
effect: "dark" | "light";
|
|
47
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
46
48
|
customClass: string;
|
|
47
49
|
content: string;
|
|
48
50
|
row: number | string;
|
|
@@ -74,6 +76,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
74
76
|
text: string;
|
|
75
77
|
selfPopperClass: string;
|
|
76
78
|
effect: "dark" | "light";
|
|
79
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
77
80
|
customClass: string;
|
|
78
81
|
content: string;
|
|
79
82
|
row: number | string;
|
|
@@ -83,7 +86,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
83
86
|
}> & Omit<Readonly<import("./src/type.js").Props> & Readonly<{
|
|
84
87
|
onShow?: ((event?: Event | undefined) => any) | undefined;
|
|
85
88
|
onHide?: ((event?: Event | undefined) => any) | undefined;
|
|
86
|
-
}>, "$tooltipRef" | ("disabled" | "text" | "selfPopperClass" | "effect" | "customClass" | "content" | "row" | "textWidth" | "textHtml" | "isMaxheight")> & import("vue").ShallowUnwrapRef<{
|
|
89
|
+
}>, "$tooltipRef" | ("disabled" | "text" | "selfPopperClass" | "effect" | "placement" | "customClass" | "content" | "row" | "textWidth" | "textHtml" | "isMaxheight")> & import("vue").ShallowUnwrapRef<{
|
|
87
90
|
$tooltipRef: import("vue").Ref<any, any>;
|
|
88
91
|
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
89
92
|
$slots: {
|
|
@@ -96,6 +99,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
96
99
|
$props: {
|
|
97
100
|
readonly selfPopperClass?: string | undefined;
|
|
98
101
|
readonly effect?: ("dark" | "light") | undefined;
|
|
102
|
+
readonly placement?: ("top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end") | undefined;
|
|
99
103
|
readonly customClass?: string | undefined;
|
|
100
104
|
readonly content?: string | undefined;
|
|
101
105
|
readonly disabled?: boolean | undefined;
|
|
@@ -134,6 +138,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
134
138
|
text: string;
|
|
135
139
|
selfPopperClass: string;
|
|
136
140
|
effect: "dark" | "light";
|
|
141
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
137
142
|
customClass: string;
|
|
138
143
|
content: string;
|
|
139
144
|
row: number | string;
|
|
@@ -165,6 +170,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
165
170
|
text: string;
|
|
166
171
|
selfPopperClass: string;
|
|
167
172
|
effect: "dark" | "light";
|
|
173
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
168
174
|
customClass: string;
|
|
169
175
|
content: string;
|
|
170
176
|
row: number | string;
|
|
@@ -174,7 +180,7 @@ declare const DasTooltipRef: () => import("vue").Ref<({
|
|
|
174
180
|
}> & Omit<Readonly<import("./src/type.js").Props> & Readonly<{
|
|
175
181
|
onShow?: ((event?: Event | undefined) => any) | undefined;
|
|
176
182
|
onHide?: ((event?: Event | undefined) => any) | undefined;
|
|
177
|
-
}>, "$tooltipRef" | ("disabled" | "text" | "selfPopperClass" | "effect" | "customClass" | "content" | "row" | "textWidth" | "textHtml" | "isMaxheight")> & import("vue").ShallowUnwrapRef<{
|
|
183
|
+
}>, "$tooltipRef" | ("disabled" | "text" | "selfPopperClass" | "effect" | "placement" | "customClass" | "content" | "row" | "textWidth" | "textHtml" | "isMaxheight")> & import("vue").ShallowUnwrapRef<{
|
|
178
184
|
$tooltipRef: import("vue").Ref<any, any>;
|
|
179
185
|
}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
180
186
|
$slots: {
|
|
@@ -196,6 +202,7 @@ declare const DasTooltip: import("@das-fed/utils").SFCWithInstall<{
|
|
|
196
202
|
text: string;
|
|
197
203
|
selfPopperClass: string;
|
|
198
204
|
effect: "dark" | "light";
|
|
205
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
199
206
|
customClass: string;
|
|
200
207
|
content: string;
|
|
201
208
|
row: number | string;
|
|
@@ -219,6 +226,7 @@ declare const DasTooltip: import("@das-fed/utils").SFCWithInstall<{
|
|
|
219
226
|
text: string;
|
|
220
227
|
selfPopperClass: string;
|
|
221
228
|
effect: "dark" | "light";
|
|
229
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
222
230
|
customClass: string;
|
|
223
231
|
content: string;
|
|
224
232
|
row: number | string;
|
|
@@ -242,6 +250,7 @@ declare const DasTooltip: import("@das-fed/utils").SFCWithInstall<{
|
|
|
242
250
|
text: string;
|
|
243
251
|
selfPopperClass: string;
|
|
244
252
|
effect: "dark" | "light";
|
|
253
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
245
254
|
customClass: string;
|
|
246
255
|
content: string;
|
|
247
256
|
row: number | string;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/tooltip/style.css';
|
|
2
|
-
import { defineComponent as S, useCssVars as E, ref as
|
|
3
|
-
import { setThemeRule as
|
|
4
|
-
import { setI18nRule as
|
|
5
|
-
import { withInstall as
|
|
6
|
-
import {
|
|
7
|
-
import { ElTooltip as
|
|
2
|
+
import { defineComponent as S, useCssVars as E, ref as m, computed as c, onMounted as N, onBeforeMount as L, openBlock as s, createBlock as V, unref as x, mergeProps as _, withCtx as u, createVNode as D, createElementVNode as P, normalizeClass as b, renderSlot as k, createElementBlock as p, Fragment as z, createTextVNode as I, toDisplayString as T, createCommentVNode as $, normalizeStyle as W, nextTick as q } from "vue";
|
|
3
|
+
import { setThemeRule as F } from "@das-fed/web/packages/theme/index";
|
|
4
|
+
import { setI18nRule as X, t as Y } from "@das-fed/web/packages/i18n/index";
|
|
5
|
+
import { withInstall as O } from "@das-fed/utils/with-install/index";
|
|
6
|
+
import { DasScrollbar as j } from "@das-fed/ui/packages/components/scrollbar/index";
|
|
7
|
+
import { ElTooltip as A } from "element-plus";
|
|
8
8
|
import "element-plus/es/components/tooltip/style/css";
|
|
9
9
|
import "@das-fed/ui/packages/global/theme";
|
|
10
|
-
const
|
|
10
|
+
const G = ["innerHTML"], J = { key: 1 }, K = /* @__PURE__ */ S({
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
13
13
|
selfPopperClass: { default: "" },
|
|
14
14
|
effect: { default: "light" },
|
|
15
|
+
placement: { default: "top" },
|
|
15
16
|
customClass: { default: "" },
|
|
16
17
|
content: { default: "" },
|
|
17
18
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -22,88 +23,93 @@ const A = ["innerHTML"], G = { key: 1 }, J = /* @__PURE__ */ S({
|
|
|
22
23
|
isMaxheight: { type: Boolean, default: !0 }
|
|
23
24
|
},
|
|
24
25
|
emits: ["show", "hide"],
|
|
25
|
-
setup(
|
|
26
|
+
setup(n, { expose: d, emit: i }) {
|
|
26
27
|
E((e) => ({
|
|
27
|
-
"
|
|
28
|
+
"4b1c8854": M.value
|
|
28
29
|
}));
|
|
29
|
-
const o =
|
|
30
|
-
|
|
30
|
+
const o = n, a = i, h = m(), w = m(!1), M = c(() => Number(o.row)), B = c(() => o.disabled ?? (o.text ? !w.value : !1)), g = c(() => o.content || o.text), H = (e) => {
|
|
31
|
+
w.value = e.target.scrollHeight > e.target.clientHeight;
|
|
31
32
|
}, R = (e) => {
|
|
32
33
|
a("show", e), window.addEventListener("wheel", f);
|
|
33
|
-
},
|
|
34
|
+
}, v = (e) => {
|
|
34
35
|
a("hide", e), window.removeEventListener("wheel", f);
|
|
35
36
|
}, f = (e) => {
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
const t =
|
|
37
|
+
const l = document.querySelector('[id^="el-popper-container"]');
|
|
38
|
+
if (!l) return;
|
|
39
|
+
const t = l.querySelector(".das-ui-tooltip-popper");
|
|
39
40
|
if (!t) return;
|
|
40
|
-
const
|
|
41
|
-
t &&
|
|
42
|
-
|
|
41
|
+
const y = e.clientX, C = e.clientY, r = t == null ? void 0 : t.getBoundingClientRect();
|
|
42
|
+
t && y >= r.left && y <= r.right && C >= r.top && C <= r.bottom || (t.style.display = "none", t.style.opacity = "0", q(() => {
|
|
43
|
+
v();
|
|
43
44
|
}));
|
|
44
45
|
};
|
|
45
|
-
return
|
|
46
|
-
}),
|
|
46
|
+
return N(() => {
|
|
47
|
+
}), L(() => {
|
|
47
48
|
window.removeEventListener("wheel", f);
|
|
48
49
|
}), d({
|
|
49
|
-
$tooltipRef:
|
|
50
|
-
}), (e,
|
|
50
|
+
$tooltipRef: h
|
|
51
|
+
}), (e, l) => (s(), V(x(A), _({
|
|
51
52
|
ref_key: "$tooltipRef",
|
|
52
|
-
ref:
|
|
53
|
+
ref: h,
|
|
53
54
|
class: "das-ui-tooltip",
|
|
54
55
|
disabled: B.value,
|
|
55
56
|
effect: e.effect,
|
|
57
|
+
placement: e.placement,
|
|
56
58
|
"popper-class": `das-ui-tooltip-popper ${e.isMaxheight ? "max-height" : ""} ${e.selfPopperClass}`,
|
|
57
59
|
"hide-after": 100,
|
|
58
60
|
"show-after": 100,
|
|
59
61
|
onShow: R,
|
|
60
|
-
onHide:
|
|
62
|
+
onHide: v
|
|
61
63
|
}, e.$attrs), {
|
|
62
|
-
content:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
v.value && !e.$slots.content ? (s(), l(
|
|
71
|
-
z,
|
|
72
|
-
{ key: 0 },
|
|
64
|
+
content: u(() => [
|
|
65
|
+
D(x(j), null, {
|
|
66
|
+
default: u(() => [
|
|
67
|
+
P(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
class: b({ "max-height": e.isMaxheight, "das-popper-content": !0 })
|
|
71
|
+
},
|
|
73
72
|
[
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
k(e.$slots, "content", {}, void 0, !0),
|
|
74
|
+
g.value && !e.$slots.content ? (s(), p(
|
|
75
|
+
z,
|
|
76
|
+
{ key: 0 },
|
|
77
|
+
[
|
|
78
|
+
I(
|
|
79
|
+
T(g.value),
|
|
80
|
+
1
|
|
81
|
+
/* TEXT */
|
|
82
|
+
)
|
|
83
|
+
],
|
|
84
|
+
64
|
|
85
|
+
/* STABLE_FRAGMENT */
|
|
86
|
+
)) : $("v-if", !0)
|
|
79
87
|
],
|
|
80
|
-
|
|
81
|
-
/*
|
|
82
|
-
)
|
|
83
|
-
],
|
|
84
|
-
|
|
85
|
-
/*
|
|
86
|
-
)
|
|
87
|
-
[C(O)]
|
|
88
|
-
])
|
|
88
|
+
2
|
|
89
|
+
/* CLASS */
|
|
90
|
+
)
|
|
91
|
+
]),
|
|
92
|
+
_: 3
|
|
93
|
+
/* FORWARDED */
|
|
94
|
+
})
|
|
89
95
|
]),
|
|
90
|
-
default:
|
|
96
|
+
default: u(() => [
|
|
91
97
|
k(e.$slots, "default", {}, () => [
|
|
92
|
-
e.text ? (s(),
|
|
98
|
+
e.text ? (s(), p(
|
|
93
99
|
"div",
|
|
94
100
|
{
|
|
95
101
|
key: 0,
|
|
96
|
-
onMouseenter:
|
|
102
|
+
onMouseenter: l[0] || (l[0] = (t) => H(t)),
|
|
97
103
|
class: b(`das-tooltip-text-wrap ${e.customClass}`),
|
|
98
|
-
style:
|
|
104
|
+
style: W({ width: o.textWidth })
|
|
99
105
|
},
|
|
100
106
|
[
|
|
101
|
-
e.textHtml ? (s(),
|
|
107
|
+
e.textHtml ? (s(), p("div", {
|
|
102
108
|
key: 0,
|
|
103
109
|
innerHTML: e.text
|
|
104
|
-
}, null, 8,
|
|
110
|
+
}, null, 8, G)) : (s(), p(
|
|
105
111
|
"div",
|
|
106
|
-
|
|
112
|
+
J,
|
|
107
113
|
T(e.text),
|
|
108
114
|
1
|
|
109
115
|
/* TEXT */
|
|
@@ -116,23 +122,23 @@ const A = ["innerHTML"], G = { key: 1 }, J = /* @__PURE__ */ S({
|
|
|
116
122
|
]),
|
|
117
123
|
_: 3
|
|
118
124
|
/* FORWARDED */
|
|
119
|
-
}, 16, ["disabled", "effect", "popper-class"]));
|
|
125
|
+
}, 16, ["disabled", "effect", "placement", "popper-class"]));
|
|
120
126
|
}
|
|
121
|
-
}),
|
|
122
|
-
const
|
|
127
|
+
}), Q = (n, d) => {
|
|
128
|
+
const i = n.__vccOpts || n;
|
|
123
129
|
for (const [o, a] of d)
|
|
124
|
-
|
|
125
|
-
return
|
|
126
|
-
},
|
|
130
|
+
i[o] = a;
|
|
131
|
+
return i;
|
|
132
|
+
}, U = /* @__PURE__ */ Q(K, [["__scopeId", "data-v-49a01a3a"]]), Z = {
|
|
127
133
|
"--das-ui-tooltip-font-normal": "#212121",
|
|
128
134
|
"--das-ui-tooltip-font-light": "#fff",
|
|
129
135
|
"--das-ui-tooltip-bgff-color": "#fff"
|
|
130
|
-
},
|
|
136
|
+
}, ee = { 文字提示: { "zh-CN": "文字提示", en: "Text Prompt", _appCode: "framework" } };
|
|
137
|
+
X(ee);
|
|
131
138
|
F(Z);
|
|
132
|
-
|
|
133
|
-
const ae = () => u(null), pe = Y(Q), de = { name: `Tooltip ${X("文字提示")}` };
|
|
139
|
+
const pe = () => m(null), de = O(U), fe = { name: `Tooltip ${Y("文字提示")}` };
|
|
134
140
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
de as DasTooltip,
|
|
142
|
+
pe as DasTooltipRef,
|
|
143
|
+
fe as default
|
|
138
144
|
};
|
|
Binary file
|
|
@@ -5897,6 +5897,7 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {
|
|
|
5897
5897
|
text: string;
|
|
5898
5898
|
selfPopperClass: string;
|
|
5899
5899
|
effect: "dark" | "light";
|
|
5900
|
+
placement: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
5900
5901
|
customClass: string;
|
|
5901
5902
|
content: string;
|
|
5902
5903
|
row: number | string;
|
|
@@ -7,6 +7,21 @@ export interface Props {
|
|
|
7
7
|
effect?: 'dark' | 'light'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
placement?:
|
|
11
|
+
| 'top'
|
|
12
|
+
| 'top-start'
|
|
13
|
+
| 'top-end'
|
|
14
|
+
| 'bottom'
|
|
15
|
+
| 'bottom-start'
|
|
16
|
+
| 'bottom-end'
|
|
17
|
+
| 'left'
|
|
18
|
+
| 'left-start'
|
|
19
|
+
| 'left-end'
|
|
20
|
+
| 'right'
|
|
21
|
+
| 'right-start'
|
|
22
|
+
| 'right-end'
|
|
23
|
+
|
|
24
|
+
|
|
10
25
|
customClass?: string
|
|
11
26
|
|
|
12
27
|
|
|
@@ -29,8 +44,6 @@ export interface Props {
|
|
|
29
44
|
|
|
30
45
|
|
|
31
46
|
isMaxheight?: boolean
|
|
32
|
-
|
|
33
|
-
content?: string
|
|
34
47
|
}
|
|
35
48
|
export interface Emits {
|
|
36
49
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-ui-tooltip-popper.el-popper{max-width:360px;box-shadow:0 4px 10px #0003;border:none;font-size:var(--das-ui-font-size-sm);padding:0;border-radius:unset}.das-ui-tooltip-popper.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-3px!important}.das-ui-tooltip-popper.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-3px!important}.das-ui-tooltip-popper.el-popper .das-popper-content{padding:7px 12px}.das-ui-tooltip-popper.el-popper .max-height{max-height:
|
|
1
|
+
.das-ui-tooltip-popper.el-popper{max-width:360px;box-shadow:0 4px 10px #0003;border:none;font-size:var(--das-ui-font-size-sm);padding:0;border-radius:unset}.das-ui-tooltip-popper.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-3px!important}.das-ui-tooltip-popper.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-3px!important}.das-ui-tooltip-popper.el-popper .das-popper-content{padding:7px 12px}.das-ui-tooltip-popper.el-popper .max-height{max-height:29px}.das-ui-tooltip-popper.el-popper.is-light{color:var(--das-ui-color-normal);background-color:var(--das-ui-tooltip-bgff-color)}.das-ui-tooltip-popper.el-popper.is-light:after{position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;content:"";background:var(--das-ui-tooltip-bgff-color);border-radius:2px}.das-ui-tooltip-popper.el-popper.is-light .el-popper__arrow:before{height:8px;width:8px;background-color:var(--das-ui-tooltip-bgff-color);border-color:var(--das-ui-tooltip-bgff-color);border-radius:0!important}.das-ui-tooltip-popper.el-popper.is-light[data-popper-placement^=top] .el-popper__arrow:before{box-shadow:3px 3px 5px #00000026}.das-ui-tooltip-popper.el-popper.is-light[data-popper-placement^=bottom] .el-popper__arrow:before{box-shadow:-2px -2px 5px #0000001a}.das-ui-tooltip-popper.el-popper.is-light[data-popper-placement^=left] .el-popper__arrow:before{box-shadow:3px 0 6px #0000001f,0 -2px 6px #cc95951f}.das-ui-tooltip-popper.el-popper.is-light[data-popper-placement^=right] .el-popper__arrow:before{box-shadow:0 3px 6px #0000001a,-2px 0 6px #0000001a}.das-tooltip-text-wrap[data-v-49a01a3a]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--4b1c8854)}
|
|
Binary file
|