bge-ui 1.0.10 → 1.0.11

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.
@@ -2,6 +2,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  /**
3
3
  * 是否将弹出层追加到body元素下
4
4
  */
5
+ customClass: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
5
9
  teleported: {
6
10
  type: BooleanConstructor;
7
11
  default: boolean;
@@ -28,6 +32,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
28
32
  /**
29
33
  * 是否将弹出层追加到body元素下
30
34
  */
35
+ customClass: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
31
39
  teleported: {
32
40
  type: BooleanConstructor;
33
41
  default: boolean;
@@ -52,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
52
60
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
53
61
  }, {
54
62
  title: string;
63
+ customClass: string;
55
64
  teleported: boolean;
56
65
  visible: boolean;
57
66
  resetState: boolean;
package/dist/index.js CHANGED
@@ -9051,6 +9051,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9051
9051
  /**
9052
9052
  * 是否将弹出层追加到body元素下
9053
9053
  */
9054
+ customClass: {
9055
+ type: String,
9056
+ default: ""
9057
+ },
9054
9058
  teleported: {
9055
9059
  type: Boolean,
9056
9060
  default: true
@@ -9088,6 +9092,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9088
9092
  height.value = 96 + Number(DialogBody.value.offsetHeight);
9089
9093
  });
9090
9094
  }
9095
+ }, {
9096
+ immediate: true
9091
9097
  });
9092
9098
  function close() {
9093
9099
  height.value = "160";
@@ -9103,7 +9109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9103
9109
  to: "body"
9104
9110
  }, [
9105
9111
  createElementVNode("div", {
9106
- class: normalizeClass(["bge-modal", { show: __props.visible }]),
9112
+ class: normalizeClass(`bge-modal ${__props.customClass} ${__props.visible ? "show" : ""}`),
9107
9113
  style: normalizeStyle(`opacity: ${opacity.value};`)
9108
9114
  }, [
9109
9115
  createElementVNode("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <teleport v-if="teleported" to="body">
3
- <div class="bge-modal" :class="{show: visible}" :style="`opacity: ${opacity};`">
3
+ <div :class="`bge-modal ${customClass} ${visible ? 'show' : ''}`" :style="`opacity: ${opacity};`">
4
4
  <div class="bge-dialog" :style="`height:${height}px`" >
5
5
  <div class="bge-dailog__wrapper">
6
6
  <div class="bge-dialog__header">
@@ -25,6 +25,10 @@ const props = defineProps({
25
25
  /**
26
26
  * 是否将弹出层追加到body元素下
27
27
  */
28
+ customClass: {
29
+ type: String,
30
+ default: ''
31
+ },
28
32
  teleported: {
29
33
  type: Boolean,
30
34
  default: true,
@@ -61,6 +65,8 @@ watch(() => [props.visible, props.resetState], ([value]) => {
61
65
  height.value = 96 + Number(DialogBody.value.offsetHeight)
62
66
  })
63
67
  }
68
+ }, {
69
+ immediate: true
64
70
  })
65
71
 
66
72
  function close() {