bge-ui 1.0.25 → 1.0.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/dist/index.js +15 -5
- package/dist/style.css +9 -0
- package/dist/tooltip/index.vue.d.ts +18 -4
- package/dist/tooltip/usePopper.d.ts +2 -0
- package/package.json +1 -1
- package/src/tooltip/index.vue +21 -2
- package/src/tooltip/usePopper.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -7954,7 +7954,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
|
|
|
7954
7954
|
default: () => {
|
|
7955
7955
|
return withDirectives(h(
|
|
7956
7956
|
"div",
|
|
7957
|
-
{ class: "popper-content" },
|
|
7957
|
+
{ class: `popper-content ${options.type ? options.type : "default"} popper-content--${options.size ? options.size : "default"}` },
|
|
7958
7958
|
[
|
|
7959
7959
|
slots.default ? slots.default() : "",
|
|
7960
7960
|
h(
|
|
@@ -8034,13 +8034,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
8034
8034
|
*/
|
|
8035
8035
|
title: {
|
|
8036
8036
|
type: String,
|
|
8037
|
-
default: "详情"
|
|
8038
|
-
required: true
|
|
8037
|
+
default: "详情"
|
|
8039
8038
|
},
|
|
8040
8039
|
buttonText: {
|
|
8041
8040
|
type: String,
|
|
8042
|
-
default: "知道了"
|
|
8043
|
-
|
|
8041
|
+
default: "知道了"
|
|
8042
|
+
},
|
|
8043
|
+
type: {
|
|
8044
|
+
type: String,
|
|
8045
|
+
default: "default"
|
|
8046
|
+
// default dropdown
|
|
8047
|
+
},
|
|
8048
|
+
size: {
|
|
8049
|
+
type: String,
|
|
8050
|
+
default: "default"
|
|
8051
|
+
// default mini
|
|
8044
8052
|
},
|
|
8045
8053
|
/**
|
|
8046
8054
|
* 是否将弹出层追加到body元素下
|
|
@@ -8188,6 +8196,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
8188
8196
|
function initTooltip() {
|
|
8189
8197
|
const result = usePopper(triggerRef, {
|
|
8190
8198
|
hover: props.hover,
|
|
8199
|
+
size: props.size,
|
|
8200
|
+
type: props.type,
|
|
8191
8201
|
disableClickOutside: props.disableClickOutside,
|
|
8192
8202
|
openDelay: props.openDelay,
|
|
8193
8203
|
closeDelay: props.closeDelay,
|
package/dist/style.css
CHANGED
|
@@ -1044,6 +1044,7 @@ to {
|
|
|
1044
1044
|
.bge-popper-wrapper .popper-content {
|
|
1045
1045
|
max-width: 360px;
|
|
1046
1046
|
box-shadow: 0px 12px 40px 0px rgba(0, 0, 0, 0.08);
|
|
1047
|
+
border: solid 0.5px var(--separator-separator);
|
|
1047
1048
|
border-radius: var(--radius-small, 4px);
|
|
1048
1049
|
background: var(--bg-tooltip, #53677A);
|
|
1049
1050
|
padding: var(--layout-x-3, 12px) var(--layout-x-4, 16px);
|
|
@@ -1052,6 +1053,14 @@ to {
|
|
|
1052
1053
|
font-weight: 400;
|
|
1053
1054
|
line-height: 24px;
|
|
1054
1055
|
}
|
|
1056
|
+
.bge-popper-wrapper .popper-content.dropdown {
|
|
1057
|
+
--bg-tooltip: var(--bg-float);
|
|
1058
|
+
}
|
|
1059
|
+
.bge-popper-wrapper .popper-content.popper-content--mini {
|
|
1060
|
+
font-size: 12px;
|
|
1061
|
+
line-height: 20px;
|
|
1062
|
+
padding: var(--layout-x-2, 8px) var(--layout-x-3, 12px);
|
|
1063
|
+
}
|
|
1055
1064
|
.bge-tooltip__closeButton {
|
|
1056
1065
|
width: 100%;
|
|
1057
1066
|
margin-top: 40px;
|
|
@@ -7,12 +7,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
7
7
|
title: {
|
|
8
8
|
type: StringConstructor;
|
|
9
9
|
default: string;
|
|
10
|
-
required: true;
|
|
11
10
|
};
|
|
12
11
|
buttonText: {
|
|
13
12
|
type: StringConstructor;
|
|
14
13
|
default: string;
|
|
15
|
-
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
16
22
|
};
|
|
17
23
|
/**
|
|
18
24
|
* 是否将弹出层追加到body元素下
|
|
@@ -120,12 +126,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
120
126
|
title: {
|
|
121
127
|
type: StringConstructor;
|
|
122
128
|
default: string;
|
|
123
|
-
required: true;
|
|
124
129
|
};
|
|
125
130
|
buttonText: {
|
|
126
131
|
type: StringConstructor;
|
|
127
132
|
default: string;
|
|
128
|
-
|
|
133
|
+
};
|
|
134
|
+
type: {
|
|
135
|
+
type: StringConstructor;
|
|
136
|
+
default: string;
|
|
137
|
+
};
|
|
138
|
+
size: {
|
|
139
|
+
type: StringConstructor;
|
|
140
|
+
default: string;
|
|
129
141
|
};
|
|
130
142
|
/**
|
|
131
143
|
* 是否将弹出层追加到body元素下
|
|
@@ -223,6 +235,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
223
235
|
onOpened?: ((...args: any[]) => any) | undefined;
|
|
224
236
|
onClosed?: ((...args: any[]) => any) | undefined;
|
|
225
237
|
}, {
|
|
238
|
+
size: string;
|
|
239
|
+
type: string;
|
|
226
240
|
title: string;
|
|
227
241
|
teleported: boolean;
|
|
228
242
|
modifiers: Modifier<any, any>[];
|
|
@@ -2,6 +2,8 @@ import type { SetupContext, VNode } from 'vue';
|
|
|
2
2
|
import type { PositioningStrategy, Placement, Modifier, Options as ModifierOptions } from '@popperjs/core';
|
|
3
3
|
type Options = {
|
|
4
4
|
placement?: Placement;
|
|
5
|
+
size?: string;
|
|
6
|
+
type?: string;
|
|
5
7
|
hover?: boolean;
|
|
6
8
|
disableClickOutside?: boolean;
|
|
7
9
|
openDelay?: number;
|
package/package.json
CHANGED
package/src/tooltip/index.vue
CHANGED
|
@@ -38,12 +38,18 @@ const props = defineProps({
|
|
|
38
38
|
title: {
|
|
39
39
|
type: String,
|
|
40
40
|
default: '详情',
|
|
41
|
-
required: true,
|
|
42
41
|
},
|
|
43
42
|
buttonText: {
|
|
44
43
|
type: String,
|
|
45
44
|
default: '知道了',
|
|
46
|
-
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'default', // default dropdown
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'default', // default mini
|
|
47
53
|
},
|
|
48
54
|
/**
|
|
49
55
|
* 是否将弹出层追加到body元素下
|
|
@@ -209,6 +215,8 @@ function closeToolTip() {
|
|
|
209
215
|
function initTooltip() {
|
|
210
216
|
const result = usePopper(triggerRef, {
|
|
211
217
|
hover: props.hover,
|
|
218
|
+
size: props.size,
|
|
219
|
+
type: props.type,
|
|
212
220
|
disableClickOutside: props.disableClickOutside,
|
|
213
221
|
openDelay: props.openDelay,
|
|
214
222
|
closeDelay: props.closeDelay,
|
|
@@ -278,6 +286,7 @@ defineExpose({
|
|
|
278
286
|
.popper-content {
|
|
279
287
|
max-width: 360px;
|
|
280
288
|
box-shadow: 0px 12px 40px 0px rgba(0, 0, 0, 0.08);
|
|
289
|
+
border: solid 0.5px var(--separator-separator);
|
|
281
290
|
border-radius: var(--radius-small, 4px);
|
|
282
291
|
background: var(--bg-tooltip, #53677A);
|
|
283
292
|
padding: var(--layout-x-3, 12px) var(--layout-x-4, 16px);
|
|
@@ -285,6 +294,16 @@ defineExpose({
|
|
|
285
294
|
font-size: 14px;
|
|
286
295
|
font-weight: 400;
|
|
287
296
|
line-height: 24px;
|
|
297
|
+
|
|
298
|
+
&.dropdown {
|
|
299
|
+
--bg-tooltip: var(--bg-float);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&.popper-content--mini {
|
|
303
|
+
font-size: 12px;
|
|
304
|
+
line-height: 20px;
|
|
305
|
+
padding: var(--layout-x-2, 8px) var(--layout-x-3, 12px);
|
|
306
|
+
}
|
|
288
307
|
}
|
|
289
308
|
}
|
|
290
309
|
|
package/src/tooltip/usePopper.ts
CHANGED
|
@@ -86,6 +86,8 @@ const transformOriginMap = {
|
|
|
86
86
|
|
|
87
87
|
type Options = {
|
|
88
88
|
placement?: Placement;
|
|
89
|
+
size?: string;
|
|
90
|
+
type?: string;
|
|
89
91
|
hover?: boolean;
|
|
90
92
|
disableClickOutside?: boolean;
|
|
91
93
|
openDelay?: number;
|
|
@@ -491,7 +493,7 @@ const usePopper = function (triggerReference, suppliedOptions: Options = {}) {
|
|
|
491
493
|
{
|
|
492
494
|
default: () => {
|
|
493
495
|
return withDirectives(h('div',
|
|
494
|
-
{ class: 'popper-content' },
|
|
496
|
+
{ class: `popper-content ${options.type ? options.type : 'default'} popper-content--${options.size ? options.size : 'default'}` },
|
|
495
497
|
[
|
|
496
498
|
slots.default ? slots.default() : '',
|
|
497
499
|
h('div',
|