bge-ui 1.3.1 → 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.
@@ -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
@@ -6198,6 +6198,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
6198
6198
  emit("change", input.value);
6199
6199
  emit("update:modelValue", input.value);
6200
6200
  }
6201
+ onMounted(() => {
6202
+ if (props.modelValue) {
6203
+ input.value = props.modelValue;
6204
+ }
6205
+ });
6201
6206
  return (_ctx, _cache) => {
6202
6207
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
6203
6208
  createElementVNode("div", {
@@ -6439,9 +6444,6 @@ const _hoisted_3$3 = ["onClick"];
6439
6444
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
6440
6445
  __name: "index",
6441
6446
  props: {
6442
- /**
6443
- * 是否将弹出层追加到body元素下
6444
- */
6445
6447
  customClass: {
6446
6448
  type: String,
6447
6449
  default: ""
@@ -8114,7 +8116,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
8114
8116
  h(
8115
8117
  "div",
8116
8118
  {
8117
- class: "bge-popper-wrapper",
8119
+ class: `bge-popper-wrapper ${options.customClass}`,
8118
8120
  ref: tooltipReference,
8119
8121
  style: createTooltipStyle.value,
8120
8122
  onMouseleave: () => {
@@ -8258,6 +8260,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8258
8260
  type: String,
8259
8261
  default: "详情"
8260
8262
  },
8263
+ customClass: {
8264
+ type: String,
8265
+ default: ""
8266
+ },
8261
8267
  buttonText: {
8262
8268
  type: String,
8263
8269
  default: "知道了"
@@ -8419,6 +8425,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8419
8425
  animation: props.animation,
8420
8426
  placement: props.placement,
8421
8427
  interactive: props.interactive,
8428
+ customClass: props.customClass,
8422
8429
  animationDuration: props.animationDuration,
8423
8430
  onTransition: (transition, element) => {
8424
8431
  emits("transition", transition, element);
@@ -10667,7 +10674,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
10667
10674
  ref_key: "tooltip",
10668
10675
  ref: tooltip,
10669
10676
  placement: "top",
10670
- size: "mini"
10677
+ size: "mini",
10678
+ class: "asdasd"
10671
10679
  }, {
10672
10680
  content: withCtx(() => [
10673
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
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: ''
@@ -24,7 +24,7 @@
24
24
  </template>
25
25
  <script setup lang="ts">
26
26
  import MonoClose from "../icons/MonoClose.vue";
27
- import { ref, useSlots, inject, watch } from 'vue'
27
+ import { ref, useSlots, inject, watch, onMounted } from 'vue'
28
28
  const props = defineProps({
29
29
  type: {
30
30
  type: String,
@@ -106,6 +106,12 @@ function handelClear() {
106
106
  emit('update:modelValue', input.value)
107
107
  }
108
108
 
109
+ onMounted(() => {
110
+ if (props.modelValue) {
111
+ input.value = props.modelValue
112
+ }
113
+ })
114
+
109
115
  </script>
110
116
  <style lang="scss">
111
117
  .bge-input {
@@ -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>
@@ -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}`,
435
436
  ref: tooltipReference,
436
437
  style: createTooltipStyle.value,
437
438
  onMouseleave: () => {