bge-ui 1.3.2 → 1.3.4

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.
@@ -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: "bge-popper-wrapper",
8119
+ class: `bge-popper-wrapper${options.customClass ? " " + 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);
@@ -10534,6 +10536,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10534
10536
  type: Boolean,
10535
10537
  default: true
10536
10538
  },
10539
+ tooltipCustomClass: {
10540
+ type: String,
10541
+ default: ""
10542
+ },
10537
10543
  formatTooltip: {
10538
10544
  type: Function,
10539
10545
  default: void 0
@@ -10672,7 +10678,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10672
10678
  ref_key: "tooltip",
10673
10679
  ref: tooltip,
10674
10680
  placement: "top",
10675
- size: "mini"
10681
+ size: "mini",
10682
+ customClass: __props.tooltipCustomClass
10676
10683
  }, {
10677
10684
  content: withCtx(() => [
10678
10685
  createTextVNode(toDisplayString(__props.formatTooltip ? __props.formatTooltip(__props.modelValue) : `${__props.modelValue}%`), 1)
@@ -10685,7 +10692,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10685
10692
  }, null, 32)
10686
10693
  ]),
10687
10694
  _: 1
10688
- }, 512)) : (openBlock(), createElementBlock("div", {
10695
+ }, 8, ["customClass"])) : (openBlock(), createElementBlock("div", {
10689
10696
  key: 1,
10690
10697
  class: "slider-button",
10691
10698
  onMouseover: _cache[2] || (_cache[2] = ($event) => state.hovering = true),
@@ -11,6 +11,10 @@ declare const _default: import("vue").DefineComponent<{
11
11
  type: BooleanConstructor;
12
12
  default: boolean;
13
13
  };
14
+ tooltipCustomClass: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
14
18
  formatTooltip: {
15
19
  type: FunctionConstructor;
16
20
  default: undefined;
@@ -33,6 +37,10 @@ declare const _default: import("vue").DefineComponent<{
33
37
  type: BooleanConstructor;
34
38
  default: boolean;
35
39
  };
40
+ tooltipCustomClass: {
41
+ type: StringConstructor;
42
+ default: string;
43
+ };
36
44
  formatTooltip: {
37
45
  type: FunctionConstructor;
38
46
  default: undefined;
@@ -46,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
46
54
  modelValue: number;
47
55
  showToolTip: boolean;
48
56
  marks: Record<string, any>;
57
+ tooltipCustomClass: string;
49
58
  formatTooltip: Function;
50
59
  }, {}>;
51
60
  export default _default;
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -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">{{ title }}</template>
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: ''
@@ -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" :customClass="tooltipCustomClass">
10
10
  <template #content>
11
11
  {{ formatTooltip ? formatTooltip(modelValue) : `${modelValue}%` }}
12
12
  </template>
@@ -41,6 +41,10 @@ const props = defineProps({
41
41
  type: Boolean,
42
42
  default: true
43
43
  },
44
+ tooltipCustomClass: {
45
+ type: String,
46
+ default: ''
47
+ },
44
48
  formatTooltip: {
45
49
  type: Function,
46
50
  default: undefined
@@ -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] {
@@ -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: 'bge-popper-wrapper',
435
+ class: `bge-popper-wrapper${options.customClass ? ' ' + options.customClass : ''}`,
435
436
  ref: tooltipReference,
436
437
  style: createTooltipStyle.value,
437
438
  onMouseleave: () => {