bge-ui 1.3.2 → 1.3.3
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/dialog/index.vue.d.ts +0 -6
- package/dist/index.js +8 -5
- package/dist/tooltip/index.vue.d.ts +9 -0
- package/dist/tooltip/usePopper.d.ts +1 -0
- package/package.json +1 -1
- package/src/dialog/index.vue +3 -4
- package/src/slider/index.vue +1 -1
- package/src/tooltip/index.vue +5 -1
- package/src/tooltip/usePopper.ts +2 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
-
/**
|
|
3
|
-
* 是否将弹出层追加到body元素下
|
|
4
|
-
*/
|
|
5
2
|
customClass: {
|
|
6
3
|
type: StringConstructor;
|
|
7
4
|
default: string;
|
|
@@ -30,9 +27,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
30
27
|
"update:visible": (...args: any[]) => void;
|
|
31
28
|
close: (...args: any[]) => void;
|
|
32
29
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
-
/**
|
|
34
|
-
* 是否将弹出层追加到body元素下
|
|
35
|
-
*/
|
|
36
30
|
customClass: {
|
|
37
31
|
type: StringConstructor;
|
|
38
32
|
default: string;
|
package/dist/index.js
CHANGED
|
@@ -6444,9 +6444,6 @@ const _hoisted_3$3 = ["onClick"];
|
|
|
6444
6444
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
6445
6445
|
__name: "index",
|
|
6446
6446
|
props: {
|
|
6447
|
-
/**
|
|
6448
|
-
* 是否将弹出层追加到body元素下
|
|
6449
|
-
*/
|
|
6450
6447
|
customClass: {
|
|
6451
6448
|
type: String,
|
|
6452
6449
|
default: ""
|
|
@@ -8119,7 +8116,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
|
|
|
8119
8116
|
h(
|
|
8120
8117
|
"div",
|
|
8121
8118
|
{
|
|
8122
|
-
class:
|
|
8119
|
+
class: `bge-popper-wrapper ${options.customClass}`,
|
|
8123
8120
|
ref: tooltipReference,
|
|
8124
8121
|
style: createTooltipStyle.value,
|
|
8125
8122
|
onMouseleave: () => {
|
|
@@ -8263,6 +8260,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
8263
8260
|
type: String,
|
|
8264
8261
|
default: "详情"
|
|
8265
8262
|
},
|
|
8263
|
+
customClass: {
|
|
8264
|
+
type: String,
|
|
8265
|
+
default: ""
|
|
8266
|
+
},
|
|
8266
8267
|
buttonText: {
|
|
8267
8268
|
type: String,
|
|
8268
8269
|
default: "知道了"
|
|
@@ -8424,6 +8425,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
8424
8425
|
animation: props.animation,
|
|
8425
8426
|
placement: props.placement,
|
|
8426
8427
|
interactive: props.interactive,
|
|
8428
|
+
customClass: props.customClass,
|
|
8427
8429
|
animationDuration: props.animationDuration,
|
|
8428
8430
|
onTransition: (transition, element) => {
|
|
8429
8431
|
emits("transition", transition, element);
|
|
@@ -10672,7 +10674,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
10672
10674
|
ref_key: "tooltip",
|
|
10673
10675
|
ref: tooltip,
|
|
10674
10676
|
placement: "top",
|
|
10675
|
-
size: "mini"
|
|
10677
|
+
size: "mini",
|
|
10678
|
+
class: "asdasd"
|
|
10676
10679
|
}, {
|
|
10677
10680
|
content: withCtx(() => [
|
|
10678
10681
|
createTextVNode(toDisplayString(__props.formatTooltip ? __props.formatTooltip(__props.modelValue) : `${__props.modelValue}%`), 1)
|
|
@@ -8,6 +8,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
8
8
|
type: StringConstructor;
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
|
+
customClass: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
11
15
|
buttonText: {
|
|
12
16
|
type: StringConstructor;
|
|
13
17
|
default: string;
|
|
@@ -120,6 +124,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
120
124
|
type: StringConstructor;
|
|
121
125
|
default: string;
|
|
122
126
|
};
|
|
127
|
+
customClass: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: string;
|
|
130
|
+
};
|
|
123
131
|
buttonText: {
|
|
124
132
|
type: StringConstructor;
|
|
125
133
|
default: string;
|
|
@@ -224,6 +232,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
224
232
|
size: string;
|
|
225
233
|
type: string;
|
|
226
234
|
title: string;
|
|
235
|
+
customClass: string;
|
|
227
236
|
teleported: boolean;
|
|
228
237
|
animation: string;
|
|
229
238
|
animationDuration: number | unknown[];
|
|
@@ -2,6 +2,7 @@ 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
|
+
customClass?: String;
|
|
5
6
|
size?: string;
|
|
6
7
|
type?: string;
|
|
7
8
|
hover?: boolean;
|
package/package.json
CHANGED
package/src/dialog/index.vue
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
<div class="bge-dialog" :style="`height:${height}px`" >
|
|
5
5
|
<div class="bge-dailog__wrapper">
|
|
6
6
|
<div class="bge-dialog__header">
|
|
7
|
-
<template v-if="title">
|
|
7
|
+
<template v-if="title">
|
|
8
|
+
{{ title }}
|
|
9
|
+
</template>
|
|
8
10
|
<slot v-else name="header" />
|
|
9
11
|
<span class="bge-dialog__close" @click.stop="close">
|
|
10
12
|
<MonoClose></MonoClose>
|
|
@@ -22,9 +24,6 @@
|
|
|
22
24
|
import { ref, watch } from 'vue';
|
|
23
25
|
|
|
24
26
|
const props = defineProps({
|
|
25
|
-
/**
|
|
26
|
-
* 是否将弹出层追加到body元素下
|
|
27
|
-
*/
|
|
28
27
|
customClass: {
|
|
29
28
|
type: String,
|
|
30
29
|
default: ''
|
package/src/slider/index.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@touchstart="onButtonDown"
|
|
7
7
|
@mousedown="onButtonDown"
|
|
8
8
|
>
|
|
9
|
-
<ui-tooltip v-if="showToolTip" ref="tooltip" placement="top" size="mini"
|
|
9
|
+
<ui-tooltip v-if="showToolTip" ref="tooltip" placement="top" size="mini" class="asdasd">
|
|
10
10
|
<template #content>
|
|
11
11
|
{{ formatTooltip ? formatTooltip(modelValue) : `${modelValue}%` }}
|
|
12
12
|
</template>
|
package/src/tooltip/index.vue
CHANGED
|
@@ -39,6 +39,10 @@ const props = defineProps({
|
|
|
39
39
|
type: String,
|
|
40
40
|
default: '详情',
|
|
41
41
|
},
|
|
42
|
+
customClass: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
42
46
|
buttonText: {
|
|
43
47
|
type: String,
|
|
44
48
|
default: '知道了',
|
|
@@ -215,6 +219,7 @@ function initTooltip() {
|
|
|
215
219
|
animation: props.animation,
|
|
216
220
|
placement: props.placement,
|
|
217
221
|
interactive: props.interactive,
|
|
222
|
+
customClass: props.customClass,
|
|
218
223
|
animationDuration: props.animationDuration as any,
|
|
219
224
|
|
|
220
225
|
onTransition: (transition: string, element: HTMLElement) => {
|
|
@@ -249,7 +254,6 @@ defineExpose({
|
|
|
249
254
|
</script>
|
|
250
255
|
<style lang="scss">
|
|
251
256
|
.bge-popper-wrapper {
|
|
252
|
-
|
|
253
257
|
z-index: 20;
|
|
254
258
|
|
|
255
259
|
&[data-popper-placement^="top"]>.popper-content>[data-popper-arrow] {
|
package/src/tooltip/usePopper.ts
CHANGED
|
@@ -86,6 +86,7 @@ const transformOriginMap = {
|
|
|
86
86
|
|
|
87
87
|
type Options = {
|
|
88
88
|
placement?: Placement;
|
|
89
|
+
customClass?: String;
|
|
89
90
|
size?: string;
|
|
90
91
|
type?: string;
|
|
91
92
|
hover?: boolean;
|
|
@@ -431,7 +432,7 @@ const usePopper = function (triggerReference, suppliedOptions: Options = {}) {
|
|
|
431
432
|
h(
|
|
432
433
|
'div',
|
|
433
434
|
{
|
|
434
|
-
class:
|
|
435
|
+
class: `bge-popper-wrapper ${options.customClass}`,
|
|
435
436
|
ref: tooltipReference,
|
|
436
437
|
style: createTooltipStyle.value,
|
|
437
438
|
onMouseleave: () => {
|