bge-ui 1.4.8 → 1.4.9
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 +142 -157
- package/dist/style.css +71 -78
- package/package.json +1 -1
- package/src/dialog/index.vue +35 -16
- package/src/tooltip/index.vue +5 -5
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, renderSlot, normalizeStyle, createStaticVNode, provide, reactive, toRefs, ref, watch, unref, getCurrentScope, onScopeDispose, readonly, computed, getCurrentInstance, onMounted, useSlots, inject, createTextVNode, toDisplayString, createCommentVNode, TransitionGroup, withCtx, withDirectives, vModelDynamic, vModelText, createBlock, withModifiers, cloneVNode, Fragment, Text, Comment,
|
|
7
|
+
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, renderSlot, normalizeStyle, createStaticVNode, provide, reactive, toRefs, ref, watch, unref, getCurrentScope, onScopeDispose, readonly, computed, getCurrentInstance, onMounted, useSlots, inject, createTextVNode, toDisplayString, createCommentVNode, TransitionGroup, withCtx, withDirectives, vModelDynamic, vModelText, createBlock, withModifiers, cloneVNode, Fragment, Text, Comment, onUnmounted, h, Transition, vShow, onBeforeMount, nextTick, Teleport, resolveDynamicComponent, shallowReactive, render as render$7, isVNode, vModelCheckbox, renderList, toRef, useAttrs, normalizeProps, mergeProps, onBeforeUpdate, withKeys, createSlots, guardReactiveProps, isRef } from "vue";
|
|
8
8
|
const _hoisted_1$26 = ["disabled"];
|
|
9
9
|
const _hoisted_2$1M = { class: "loading-icon" };
|
|
10
10
|
const _sfc_main$2g = /* @__PURE__ */ defineComponent({
|
|
@@ -6482,111 +6482,6 @@ function findFirstLegitChild(node) {
|
|
|
6482
6482
|
}
|
|
6483
6483
|
function wrapTextContent(s) {
|
|
6484
6484
|
}
|
|
6485
|
-
const _hoisted_1$i = { class: "bge-dailog__wrapper" };
|
|
6486
|
-
const _hoisted_2$e = { class: "bge-dialog__header" };
|
|
6487
|
-
const _hoisted_3$a = ["onClick"];
|
|
6488
|
-
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
6489
|
-
__name: "index",
|
|
6490
|
-
props: {
|
|
6491
|
-
customClass: {
|
|
6492
|
-
type: String,
|
|
6493
|
-
default: ""
|
|
6494
|
-
},
|
|
6495
|
-
teleported: {
|
|
6496
|
-
type: Boolean,
|
|
6497
|
-
default: true
|
|
6498
|
-
},
|
|
6499
|
-
visible: {
|
|
6500
|
-
type: Boolean,
|
|
6501
|
-
default: false
|
|
6502
|
-
},
|
|
6503
|
-
resetState: {
|
|
6504
|
-
type: Boolean,
|
|
6505
|
-
default: false
|
|
6506
|
-
},
|
|
6507
|
-
fullBody: {
|
|
6508
|
-
type: Boolean,
|
|
6509
|
-
default: false
|
|
6510
|
-
},
|
|
6511
|
-
title: {
|
|
6512
|
-
type: String,
|
|
6513
|
-
default: ""
|
|
6514
|
-
}
|
|
6515
|
-
},
|
|
6516
|
-
emits: [
|
|
6517
|
-
"update:visible",
|
|
6518
|
-
"close"
|
|
6519
|
-
],
|
|
6520
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
6521
|
-
const props = __props;
|
|
6522
|
-
const emits = __emit;
|
|
6523
|
-
const height = ref(160);
|
|
6524
|
-
const opacity = ref(0);
|
|
6525
|
-
const DialogBody = ref();
|
|
6526
|
-
watch(() => [props.visible, props.resetState], ([value]) => {
|
|
6527
|
-
if (value) {
|
|
6528
|
-
setTimeout(() => {
|
|
6529
|
-
opacity.value = 1;
|
|
6530
|
-
height.value = 48 + 64 + Number(DialogBody.value.offsetHeight);
|
|
6531
|
-
});
|
|
6532
|
-
}
|
|
6533
|
-
}, {
|
|
6534
|
-
immediate: true
|
|
6535
|
-
});
|
|
6536
|
-
function updateHeight() {
|
|
6537
|
-
height.value = 48 + 64 + Number(DialogBody.value.offsetHeight);
|
|
6538
|
-
}
|
|
6539
|
-
function close() {
|
|
6540
|
-
height.value = "160";
|
|
6541
|
-
opacity.value = 0;
|
|
6542
|
-
setTimeout(() => {
|
|
6543
|
-
emits("update:visible", false);
|
|
6544
|
-
emits("close", false);
|
|
6545
|
-
}, 200);
|
|
6546
|
-
}
|
|
6547
|
-
__expose({
|
|
6548
|
-
updateHeight
|
|
6549
|
-
});
|
|
6550
|
-
return (_ctx, _cache) => {
|
|
6551
|
-
const _component_MonoClose = resolveComponent("MonoClose");
|
|
6552
|
-
return __props.teleported ? (openBlock(), createBlock(Teleport, {
|
|
6553
|
-
key: 0,
|
|
6554
|
-
to: "body"
|
|
6555
|
-
}, [
|
|
6556
|
-
createElementVNode("div", {
|
|
6557
|
-
class: normalizeClass(`bge-modal ${__props.customClass} ${__props.visible ? "show" : ""}`),
|
|
6558
|
-
style: normalizeStyle(`opacity: ${opacity.value};`)
|
|
6559
|
-
}, [
|
|
6560
|
-
createElementVNode("div", {
|
|
6561
|
-
class: "bge-dialog",
|
|
6562
|
-
style: normalizeStyle(`height:${height.value}px`)
|
|
6563
|
-
}, [
|
|
6564
|
-
createElementVNode("div", _hoisted_1$i, [
|
|
6565
|
-
createElementVNode("div", _hoisted_2$e, [
|
|
6566
|
-
__props.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
6567
|
-
createTextVNode(toDisplayString(__props.title), 1)
|
|
6568
|
-
], 64)) : renderSlot(_ctx.$slots, "header", { key: 1 }),
|
|
6569
|
-
createElementVNode("span", {
|
|
6570
|
-
class: "bge-dialog__close",
|
|
6571
|
-
onClick: withModifiers(close, ["stop"])
|
|
6572
|
-
}, [
|
|
6573
|
-
createVNode(_component_MonoClose)
|
|
6574
|
-
], 8, _hoisted_3$a)
|
|
6575
|
-
]),
|
|
6576
|
-
createElementVNode("div", {
|
|
6577
|
-
class: normalizeClass(["bge-dialog__body", { full: __props.fullBody }]),
|
|
6578
|
-
ref_key: "DialogBody",
|
|
6579
|
-
ref: DialogBody
|
|
6580
|
-
}, [
|
|
6581
|
-
renderSlot(_ctx.$slots, "default")
|
|
6582
|
-
], 2)
|
|
6583
|
-
])
|
|
6584
|
-
], 4)
|
|
6585
|
-
], 6)
|
|
6586
|
-
])) : createCommentVNode("", true);
|
|
6587
|
-
};
|
|
6588
|
-
}
|
|
6589
|
-
});
|
|
6590
6485
|
var top = "top";
|
|
6591
6486
|
var bottom = "bottom";
|
|
6592
6487
|
var right = "right";
|
|
@@ -8300,7 +8195,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
|
|
|
8300
8195
|
})
|
|
8301
8196
|
};
|
|
8302
8197
|
};
|
|
8303
|
-
const _sfc_main$
|
|
8198
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
8304
8199
|
__name: "index",
|
|
8305
8200
|
props: {
|
|
8306
8201
|
/**
|
|
@@ -8459,9 +8354,6 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8459
8354
|
dislogVisible.value = true;
|
|
8460
8355
|
}
|
|
8461
8356
|
}
|
|
8462
|
-
function closeToolTip() {
|
|
8463
|
-
dislogVisible.value = false;
|
|
8464
|
-
}
|
|
8465
8357
|
function initTooltip() {
|
|
8466
8358
|
const result = usePopper(triggerRef, {
|
|
8467
8359
|
hover: props.hover,
|
|
@@ -8515,54 +8407,29 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8515
8407
|
]),
|
|
8516
8408
|
_: 3
|
|
8517
8409
|
}, 512),
|
|
8518
|
-
|
|
8410
|
+
__props.teleported ? (openBlock(), createBlock(Teleport, {
|
|
8519
8411
|
key: 0,
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
onClose: closeToolTip
|
|
8524
|
-
}, {
|
|
8525
|
-
default: withCtx(() => [
|
|
8526
|
-
createElementVNode("div", null, [
|
|
8527
|
-
renderSlot(_ctx.$slots, "content")
|
|
8528
|
-
]),
|
|
8529
|
-
createVNode(_sfc_main$2g, {
|
|
8530
|
-
class: "bge-tooltip__closeButton",
|
|
8531
|
-
type: "primary",
|
|
8532
|
-
onClick: closeToolTip
|
|
8533
|
-
}, {
|
|
8534
|
-
default: withCtx(() => [
|
|
8535
|
-
createTextVNode(toDisplayString(__props.buttonText), 1)
|
|
8536
|
-
]),
|
|
8537
|
-
_: 1
|
|
8538
|
-
})
|
|
8539
|
-
]),
|
|
8540
|
-
_: 3
|
|
8541
|
-
}, 8, ["visible", "title"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
8542
|
-
__props.teleported ? (openBlock(), createBlock(Teleport, {
|
|
8543
|
-
key: 0,
|
|
8544
|
-
to: "body"
|
|
8545
|
-
}, [
|
|
8546
|
-
(openBlock(), createBlock(resolveDynamicComponent(tooltipElement.value), null, {
|
|
8547
|
-
default: withCtx(() => [
|
|
8548
|
-
renderSlot(_ctx.$slots, "content")
|
|
8549
|
-
]),
|
|
8550
|
-
_: 3
|
|
8551
|
-
}))
|
|
8552
|
-
])) : (openBlock(), createBlock(resolveDynamicComponent(tooltipElement.value), { key: 1 }, {
|
|
8412
|
+
to: "body"
|
|
8413
|
+
}, [
|
|
8414
|
+
(openBlock(), createBlock(resolveDynamicComponent(tooltipElement.value), null, {
|
|
8553
8415
|
default: withCtx(() => [
|
|
8554
8416
|
renderSlot(_ctx.$slots, "content")
|
|
8555
8417
|
]),
|
|
8556
8418
|
_: 3
|
|
8557
8419
|
}))
|
|
8558
|
-
],
|
|
8420
|
+
])) : (openBlock(), createBlock(resolveDynamicComponent(tooltipElement.value), { key: 1 }, {
|
|
8421
|
+
default: withCtx(() => [
|
|
8422
|
+
renderSlot(_ctx.$slots, "content")
|
|
8423
|
+
]),
|
|
8424
|
+
_: 3
|
|
8425
|
+
}))
|
|
8559
8426
|
], 64);
|
|
8560
8427
|
};
|
|
8561
8428
|
}
|
|
8562
8429
|
});
|
|
8563
|
-
const _hoisted_1$
|
|
8564
|
-
const _hoisted_2$
|
|
8565
|
-
const _sfc_main$
|
|
8430
|
+
const _hoisted_1$i = ["id"];
|
|
8431
|
+
const _hoisted_2$e = ["innerHTML"];
|
|
8432
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
8566
8433
|
__name: "index",
|
|
8567
8434
|
props: {
|
|
8568
8435
|
id: {
|
|
@@ -8693,9 +8560,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8693
8560
|
size: 20
|
|
8694
8561
|
})) : createCommentVNode("", true),
|
|
8695
8562
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
8696
|
-
createElementVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_2$
|
|
8563
|
+
createElementVNode("p", { innerHTML: __props.message }, null, 8, _hoisted_2$e)
|
|
8697
8564
|
])
|
|
8698
|
-
], 46, _hoisted_1$
|
|
8565
|
+
], 46, _hoisted_1$i), [
|
|
8699
8566
|
[vShow, visible.value]
|
|
8700
8567
|
])
|
|
8701
8568
|
]),
|
|
@@ -8771,7 +8638,7 @@ function createMessage(_options = {}, context) {
|
|
|
8771
8638
|
}
|
|
8772
8639
|
};
|
|
8773
8640
|
const vnode = createVNode(
|
|
8774
|
-
_sfc_main$
|
|
8641
|
+
_sfc_main$p,
|
|
8775
8642
|
props,
|
|
8776
8643
|
isFunction(props.message) || isVNode(props.message) ? {
|
|
8777
8644
|
default: isFunction(props.message) ? props.message : () => props.message
|
|
@@ -8821,6 +8688,124 @@ function closeAll(type4, styleType = "message") {
|
|
|
8821
8688
|
}
|
|
8822
8689
|
message$1.closeAll = closeAll;
|
|
8823
8690
|
message$1._context = null;
|
|
8691
|
+
const _hoisted_1$h = { class: "bge-dailog__wrapper" };
|
|
8692
|
+
const _hoisted_2$d = { class: "bge-dialog__header" };
|
|
8693
|
+
const _hoisted_3$a = ["onClick"];
|
|
8694
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
8695
|
+
__name: "index",
|
|
8696
|
+
props: {
|
|
8697
|
+
customClass: {
|
|
8698
|
+
type: String,
|
|
8699
|
+
default: ""
|
|
8700
|
+
},
|
|
8701
|
+
teleported: {
|
|
8702
|
+
type: Boolean,
|
|
8703
|
+
default: true
|
|
8704
|
+
},
|
|
8705
|
+
visible: {
|
|
8706
|
+
type: Boolean,
|
|
8707
|
+
default: false
|
|
8708
|
+
},
|
|
8709
|
+
resetState: {
|
|
8710
|
+
type: Boolean,
|
|
8711
|
+
default: false
|
|
8712
|
+
},
|
|
8713
|
+
fullBody: {
|
|
8714
|
+
type: Boolean,
|
|
8715
|
+
default: false
|
|
8716
|
+
},
|
|
8717
|
+
title: {
|
|
8718
|
+
type: String,
|
|
8719
|
+
default: ""
|
|
8720
|
+
}
|
|
8721
|
+
},
|
|
8722
|
+
emits: [
|
|
8723
|
+
"update:visible",
|
|
8724
|
+
"close"
|
|
8725
|
+
],
|
|
8726
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8727
|
+
const props = __props;
|
|
8728
|
+
const emits = __emit;
|
|
8729
|
+
const height = ref(160);
|
|
8730
|
+
const opacity = ref(0);
|
|
8731
|
+
const DialogBody = ref();
|
|
8732
|
+
watch(() => [props.visible, props.resetState], ([value]) => {
|
|
8733
|
+
if (value) {
|
|
8734
|
+
setTimeout(() => {
|
|
8735
|
+
let offsetHeight = 0;
|
|
8736
|
+
const children = DialogBody.value.children;
|
|
8737
|
+
for (let i = 0; i < children.length; i++) {
|
|
8738
|
+
const child = children[i];
|
|
8739
|
+
console.log(child);
|
|
8740
|
+
offsetHeight += child.offsetHeight;
|
|
8741
|
+
}
|
|
8742
|
+
opacity.value = 1;
|
|
8743
|
+
height.value = 48 + 64 + Number(offsetHeight);
|
|
8744
|
+
});
|
|
8745
|
+
}
|
|
8746
|
+
}, {
|
|
8747
|
+
immediate: true
|
|
8748
|
+
});
|
|
8749
|
+
function updateHeight() {
|
|
8750
|
+
let offsetHeight = 0;
|
|
8751
|
+
const children = DialogBody.value.children;
|
|
8752
|
+
for (let i = 0; i < children.length; i++) {
|
|
8753
|
+
const child = children[i];
|
|
8754
|
+
offsetHeight += child.offsetHeight;
|
|
8755
|
+
}
|
|
8756
|
+
height.value = 48 + 64 + Number(offsetHeight);
|
|
8757
|
+
}
|
|
8758
|
+
function close() {
|
|
8759
|
+
height.value = "160";
|
|
8760
|
+
opacity.value = 0;
|
|
8761
|
+
setTimeout(() => {
|
|
8762
|
+
emits("update:visible", false);
|
|
8763
|
+
emits("close", false);
|
|
8764
|
+
}, 200);
|
|
8765
|
+
}
|
|
8766
|
+
__expose({
|
|
8767
|
+
updateHeight
|
|
8768
|
+
});
|
|
8769
|
+
return (_ctx, _cache) => {
|
|
8770
|
+
const _component_MonoClose = resolveComponent("MonoClose");
|
|
8771
|
+
return __props.teleported ? (openBlock(), createBlock(Teleport, {
|
|
8772
|
+
key: 0,
|
|
8773
|
+
to: "body"
|
|
8774
|
+
}, [
|
|
8775
|
+
createElementVNode("div", {
|
|
8776
|
+
class: normalizeClass(`bge-modal ${__props.customClass} ${__props.visible ? "show" : ""}`),
|
|
8777
|
+
style: normalizeStyle(`opacity: ${opacity.value};`)
|
|
8778
|
+
}, [
|
|
8779
|
+
createElementVNode("div", {
|
|
8780
|
+
class: "bge-dialog",
|
|
8781
|
+
style: normalizeStyle(`height:${height.value}px`)
|
|
8782
|
+
}, [
|
|
8783
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
8784
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
8785
|
+
__props.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
8786
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
8787
|
+
], 64)) : renderSlot(_ctx.$slots, "header", { key: 1 }),
|
|
8788
|
+
createElementVNode("span", {
|
|
8789
|
+
class: "bge-dialog__close",
|
|
8790
|
+
onClick: withModifiers(close, ["stop"])
|
|
8791
|
+
}, [
|
|
8792
|
+
createVNode(_component_MonoClose)
|
|
8793
|
+
], 8, _hoisted_3$a)
|
|
8794
|
+
]),
|
|
8795
|
+
createElementVNode("div", {
|
|
8796
|
+
class: normalizeClass(["bge-dialog__body", { full: __props.fullBody }]),
|
|
8797
|
+
ref_key: "DialogBody",
|
|
8798
|
+
ref: DialogBody
|
|
8799
|
+
}, [
|
|
8800
|
+
renderSlot(_ctx.$slots, "default")
|
|
8801
|
+
], 2)
|
|
8802
|
+
])
|
|
8803
|
+
], 4)
|
|
8804
|
+
], 6)
|
|
8805
|
+
])) : createCommentVNode("", true);
|
|
8806
|
+
};
|
|
8807
|
+
}
|
|
8808
|
+
});
|
|
8824
8809
|
const _hoisted_1$g = { class: "bge-checkbox__input" };
|
|
8825
8810
|
const _hoisted_2$c = ["id", "disabled"];
|
|
8826
8811
|
const _hoisted_3$9 = {
|
|
@@ -10795,7 +10780,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
10795
10780
|
onTouchstart: onButtonDown,
|
|
10796
10781
|
onMousedown: onButtonDown
|
|
10797
10782
|
}, [
|
|
10798
|
-
__props.showToolTip ? (openBlock(), createBlock(_sfc_main$
|
|
10783
|
+
__props.showToolTip ? (openBlock(), createBlock(_sfc_main$q, {
|
|
10799
10784
|
key: 0,
|
|
10800
10785
|
ref_key: "tooltip",
|
|
10801
10786
|
ref: tooltip,
|
|
@@ -10905,7 +10890,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
10905
10890
|
const emits = __emit;
|
|
10906
10891
|
return (_ctx, _cache) => {
|
|
10907
10892
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
10908
|
-
createVNode(_sfc_main$
|
|
10893
|
+
createVNode(_sfc_main$q, {
|
|
10909
10894
|
ref_key: "tooltipRef",
|
|
10910
10895
|
ref: tooltipRef,
|
|
10911
10896
|
placement: "bottom",
|
|
@@ -22776,8 +22761,8 @@ const components = {
|
|
|
22776
22761
|
UiInput: _sfc_main$t,
|
|
22777
22762
|
UiTabs: _sfc_main$s,
|
|
22778
22763
|
UiTabPane: _sfc_main$r,
|
|
22779
|
-
UiTooltip: _sfc_main$
|
|
22780
|
-
UiDialog: _sfc_main$
|
|
22764
|
+
UiTooltip: _sfc_main$q,
|
|
22765
|
+
UiDialog: _sfc_main$o,
|
|
22781
22766
|
UiCheckbox: _sfc_main$n,
|
|
22782
22767
|
UiRadio: _sfc_main$m,
|
|
22783
22768
|
UiSlider: _sfc_main$l,
|
|
@@ -22801,7 +22786,7 @@ export {
|
|
|
22801
22786
|
_sfc_main$2g as UiButton,
|
|
22802
22787
|
_sfc_main$n as UiCheckbox,
|
|
22803
22788
|
UiDatePicker,
|
|
22804
|
-
_sfc_main$
|
|
22789
|
+
_sfc_main$o as UiDialog,
|
|
22805
22790
|
_sfc_main$v as UiForm,
|
|
22806
22791
|
_sfc_main$u as UiFormItem,
|
|
22807
22792
|
_sfc_main$t as UiInput,
|
|
@@ -22814,6 +22799,6 @@ export {
|
|
|
22814
22799
|
UiSwitch,
|
|
22815
22800
|
_sfc_main$r as UiTabPane,
|
|
22816
22801
|
_sfc_main$s as UiTabs,
|
|
22817
|
-
_sfc_main$
|
|
22802
|
+
_sfc_main$q as UiTooltip,
|
|
22818
22803
|
index as default
|
|
22819
22804
|
};
|
package/dist/style.css
CHANGED
|
@@ -1024,84 +1024,6 @@ to {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
.bge-tabs__bordered .bge-tab__pane:hover, .bge-tabs__bordered .bge-tab__pane.active {
|
|
1026
1026
|
color: var(--tc-primary, #E0E0E0);
|
|
1027
|
-
}.bge-modal {
|
|
1028
|
-
position: fixed;
|
|
1029
|
-
left: 0;
|
|
1030
|
-
top: 0;
|
|
1031
|
-
width: 100%;
|
|
1032
|
-
height: 100%;
|
|
1033
|
-
opacity: 0;
|
|
1034
|
-
background: var(--bg-overlay, rgba(7, 9, 10, 0.8));
|
|
1035
|
-
backdrop-filter: blur(12px);
|
|
1036
|
-
display: none;
|
|
1037
|
-
transition: opacity 0.2s cubic-bezier(0, 0, 0.58, 1);
|
|
1038
|
-
z-index: 1000;
|
|
1039
|
-
}
|
|
1040
|
-
.bge-modal.show {
|
|
1041
|
-
display: block;
|
|
1042
|
-
}
|
|
1043
|
-
.bge-dialog {
|
|
1044
|
-
z-index: 1001;
|
|
1045
|
-
background: var(--bg-tertiary, #232B33);
|
|
1046
|
-
transition: height 0.2s cubic-bezier(0, 0, 0.58, 1);
|
|
1047
|
-
overflow: hidden;
|
|
1048
|
-
z-index: 1003;
|
|
1049
|
-
width: 440px;
|
|
1050
|
-
margin: 0 auto;
|
|
1051
|
-
border-radius: var(--radius-medium, 16px);
|
|
1052
|
-
position: absolute;
|
|
1053
|
-
left: 50%;
|
|
1054
|
-
top: 50%;
|
|
1055
|
-
transform: translate(-50%, -50%);
|
|
1056
|
-
height: 160px;
|
|
1057
|
-
padding: 32px 0;
|
|
1058
|
-
overflow: hidden;
|
|
1059
|
-
}
|
|
1060
|
-
.bge-dialog .bge-dialog__header {
|
|
1061
|
-
padding: 0 32px;
|
|
1062
|
-
line-height: 32px;
|
|
1063
|
-
font-size: 20px;
|
|
1064
|
-
font-weight: 600;
|
|
1065
|
-
color: var(--tc-primary, #e5e5e5);
|
|
1066
|
-
height: 48px;
|
|
1067
|
-
display: flex;
|
|
1068
|
-
justify-content: space-between;
|
|
1069
|
-
align-items: center;
|
|
1070
|
-
}
|
|
1071
|
-
.bge-dialog .bge-dialog__header .bge-dialog__close {
|
|
1072
|
-
display: flex;
|
|
1073
|
-
justify-content: center;
|
|
1074
|
-
align-items: center;
|
|
1075
|
-
height: 32px;
|
|
1076
|
-
width: 24px;
|
|
1077
|
-
color: var(--tc-tertiary);
|
|
1078
|
-
cursor: pointer;
|
|
1079
|
-
}
|
|
1080
|
-
.bge-dialog .bge-dialog__header .bge-dialog__close:hover {
|
|
1081
|
-
color: var(--tc-primary);
|
|
1082
|
-
}
|
|
1083
|
-
.bge-dialog .bge-dialog__body {
|
|
1084
|
-
padding: 16px 32px 0 32px;
|
|
1085
|
-
max-height: calc(94vh - 86px);
|
|
1086
|
-
color: var(--tc-secondary, #B2BAC2);
|
|
1087
|
-
font-size: 14px;
|
|
1088
|
-
font-weight: 400;
|
|
1089
|
-
line-height: 24px;
|
|
1090
|
-
}
|
|
1091
|
-
.bge-dialog .bge-dialog__body.full {
|
|
1092
|
-
padding: 16px 0;
|
|
1093
|
-
}
|
|
1094
|
-
@media only screen and (max-width: 1023px) {
|
|
1095
|
-
.bge-dialog {
|
|
1096
|
-
width: 100%;
|
|
1097
|
-
left: 0;
|
|
1098
|
-
top: 100%;
|
|
1099
|
-
transform: translate(0, -100%);
|
|
1100
|
-
}
|
|
1101
|
-
.bge-dialog .bge-dialog__header {
|
|
1102
|
-
font-size: 18px;
|
|
1103
|
-
line-height: 32px;
|
|
1104
|
-
}
|
|
1105
1027
|
}.bge-popper-wrapper {
|
|
1106
1028
|
z-index: 20;
|
|
1107
1029
|
}
|
|
@@ -1313,6 +1235,77 @@ to {
|
|
|
1313
1235
|
.bge-message.fade-enter-from {
|
|
1314
1236
|
opacity: 0;
|
|
1315
1237
|
transform: translate(-50%, -100%);
|
|
1238
|
+
}.bge-modal {
|
|
1239
|
+
position: fixed;
|
|
1240
|
+
left: 0;
|
|
1241
|
+
top: 0;
|
|
1242
|
+
width: 100%;
|
|
1243
|
+
height: 100%;
|
|
1244
|
+
opacity: 0;
|
|
1245
|
+
background: var(--bg-overlay, rgba(7, 9, 10, 0.8));
|
|
1246
|
+
backdrop-filter: blur(12px);
|
|
1247
|
+
display: none;
|
|
1248
|
+
transition: opacity 0.2s cubic-bezier(0, 0, 0.58, 1);
|
|
1249
|
+
z-index: 1000;
|
|
1250
|
+
}
|
|
1251
|
+
.bge-modal.show {
|
|
1252
|
+
display: block;
|
|
1253
|
+
}
|
|
1254
|
+
.bge-dialog {
|
|
1255
|
+
z-index: 1001;
|
|
1256
|
+
background: var(--bg-tertiary, #232B33);
|
|
1257
|
+
transition: height 0.2s cubic-bezier(0, 0, 0.58, 1);
|
|
1258
|
+
overflow: hidden;
|
|
1259
|
+
z-index: 1003;
|
|
1260
|
+
width: 440px;
|
|
1261
|
+
max-height: calc(94vh - 86px);
|
|
1262
|
+
margin: 0 auto;
|
|
1263
|
+
border-radius: var(--radius-medium, 16px);
|
|
1264
|
+
position: absolute;
|
|
1265
|
+
left: 50%;
|
|
1266
|
+
top: 50%;
|
|
1267
|
+
transform: translate(-50%, -50%);
|
|
1268
|
+
height: 160px;
|
|
1269
|
+
padding: 32px 0;
|
|
1270
|
+
overflow: hidden;
|
|
1271
|
+
}
|
|
1272
|
+
.bge-dialog .bge-dialog__header {
|
|
1273
|
+
padding: 0 32px;
|
|
1274
|
+
line-height: 32px;
|
|
1275
|
+
font-size: 20px;
|
|
1276
|
+
font-weight: 600;
|
|
1277
|
+
color: var(--tc-primary, #e5e5e5);
|
|
1278
|
+
height: 48px;
|
|
1279
|
+
display: flex;
|
|
1280
|
+
justify-content: space-between;
|
|
1281
|
+
align-items: center;
|
|
1282
|
+
}
|
|
1283
|
+
.bge-dialog .bge-dialog__header .bge-dialog__close {
|
|
1284
|
+
display: flex;
|
|
1285
|
+
justify-content: center;
|
|
1286
|
+
align-items: center;
|
|
1287
|
+
height: 32px;
|
|
1288
|
+
width: 24px;
|
|
1289
|
+
color: var(--tc-tertiary);
|
|
1290
|
+
cursor: pointer;
|
|
1291
|
+
}
|
|
1292
|
+
.bge-dialog .bge-dialog__header .bge-dialog__close:hover {
|
|
1293
|
+
color: var(--tc-primary);
|
|
1294
|
+
}
|
|
1295
|
+
.bge-dialog .bge-dailog__wrapper {
|
|
1296
|
+
height: 100%;
|
|
1297
|
+
}
|
|
1298
|
+
.bge-dialog .bge-dialog__body {
|
|
1299
|
+
padding: 16px 32px 0 32px;
|
|
1300
|
+
color: var(--tc-secondary, #B2BAC2);
|
|
1301
|
+
font-size: 14px;
|
|
1302
|
+
font-weight: 400;
|
|
1303
|
+
line-height: 24px;
|
|
1304
|
+
overflow-y: auto;
|
|
1305
|
+
height: calc(100% - 48px);
|
|
1306
|
+
}
|
|
1307
|
+
.bge-dialog .bge-dialog__body.full {
|
|
1308
|
+
padding: 16px 0;
|
|
1316
1309
|
}.bge-checkbox {
|
|
1317
1310
|
display: inline-flex;
|
|
1318
1311
|
justify-content: flex-start;
|
package/package.json
CHANGED
package/src/dialog/index.vue
CHANGED
|
@@ -61,8 +61,15 @@ const DialogBody = ref()
|
|
|
61
61
|
watch(() => [props.visible, props.resetState], ([value]) => {
|
|
62
62
|
if (value) {
|
|
63
63
|
setTimeout(() => {
|
|
64
|
+
let offsetHeight = 0
|
|
65
|
+
const children = DialogBody.value.children
|
|
66
|
+
for (let i = 0; i < children.length; i++) {
|
|
67
|
+
const child = children[i]
|
|
68
|
+
console.log(child)
|
|
69
|
+
offsetHeight += child.offsetHeight
|
|
70
|
+
}
|
|
64
71
|
opacity.value = 1
|
|
65
|
-
height.value = 48 + 64 + Number(
|
|
72
|
+
height.value = 48 + 64 + Number(offsetHeight)
|
|
66
73
|
})
|
|
67
74
|
}
|
|
68
75
|
}, {
|
|
@@ -70,7 +77,13 @@ watch(() => [props.visible, props.resetState], ([value]) => {
|
|
|
70
77
|
})
|
|
71
78
|
|
|
72
79
|
function updateHeight() {
|
|
73
|
-
|
|
80
|
+
let offsetHeight = 0
|
|
81
|
+
const children = DialogBody.value.children
|
|
82
|
+
for (let i = 0; i < children.length; i++) {
|
|
83
|
+
const child = children[i]
|
|
84
|
+
offsetHeight += child.offsetHeight
|
|
85
|
+
}
|
|
86
|
+
height.value = 48 + 64 + Number(offsetHeight)
|
|
74
87
|
}
|
|
75
88
|
|
|
76
89
|
|
|
@@ -133,6 +146,7 @@ defineExpose({
|
|
|
133
146
|
overflow: hidden;
|
|
134
147
|
z-index: 1003;
|
|
135
148
|
width: 440px;
|
|
149
|
+
max-height: calc(94vh - 86px);
|
|
136
150
|
margin: 0 auto;
|
|
137
151
|
border-radius: var(--radius-medium, 16px);
|
|
138
152
|
position: absolute;
|
|
@@ -169,13 +183,18 @@ defineExpose({
|
|
|
169
183
|
}
|
|
170
184
|
}
|
|
171
185
|
|
|
186
|
+
.bge-dailog__wrapper {
|
|
187
|
+
height: 100%;
|
|
188
|
+
}
|
|
189
|
+
|
|
172
190
|
.bge-dialog__body {
|
|
173
191
|
padding: 16px 32px 0 32px;
|
|
174
|
-
max-height: calc(94vh - 86px);
|
|
175
192
|
color: var(--tc-secondary, #B2BAC2);
|
|
176
193
|
font-size: 14px;
|
|
177
194
|
font-weight: 400;
|
|
178
195
|
line-height: 24px;
|
|
196
|
+
overflow-y: auto;
|
|
197
|
+
height: calc(100% - 48px);
|
|
179
198
|
|
|
180
199
|
&.full {
|
|
181
200
|
padding: 16px 0;
|
|
@@ -183,18 +202,18 @@ defineExpose({
|
|
|
183
202
|
}
|
|
184
203
|
}
|
|
185
204
|
|
|
186
|
-
@include md {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
205
|
+
// @include md {
|
|
206
|
+
// .bge-dialog {
|
|
207
|
+
// width: 100%;
|
|
208
|
+
// left: 0;
|
|
209
|
+
// top: 100%;
|
|
210
|
+
// transform: translate(0, -100%);
|
|
211
|
+
|
|
212
|
+
// .bge-dialog__header {
|
|
213
|
+
// font-size: 18px;
|
|
214
|
+
// line-height: 32px;
|
|
215
|
+
// }
|
|
216
|
+
// }
|
|
217
|
+
// }
|
|
199
218
|
|
|
200
219
|
</style>
|
package/src/tooltip/index.vue
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
<!-- <component :is="triggerElement">
|
|
6
6
|
<slot />
|
|
7
7
|
</component> -->
|
|
8
|
-
<template v-if="sreenWidth <= 768">
|
|
8
|
+
<!-- <template v-if="sreenWidth <= 768">
|
|
9
9
|
<UiDialog v-model:visible="dislogVisible" :title="title" @close="closeToolTip">
|
|
10
10
|
<div><slot name="content" /></div>
|
|
11
11
|
<UiButton class="bge-tooltip__closeButton" type="primary" @click="closeToolTip">{{ buttonText }}</UiButton>
|
|
12
12
|
</UiDialog>
|
|
13
13
|
</template>
|
|
14
|
-
<template v-else>
|
|
14
|
+
<template v-else> -->
|
|
15
15
|
<teleport v-if="teleported" to="body">
|
|
16
16
|
<component :is="tooltipElement">
|
|
17
17
|
<slot name="content" />
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
<component v-else :is="tooltipElement">
|
|
21
21
|
<slot name="content" />
|
|
22
22
|
</component>
|
|
23
|
-
</template>
|
|
23
|
+
<!-- </template> -->
|
|
24
24
|
</template>
|
|
25
25
|
<script setup lang="ts">
|
|
26
26
|
import { OnlyChild as UiOnlyChild } from './only-child'
|
|
27
27
|
import type { PropType } from 'vue'
|
|
28
28
|
import { computed, ref, onMounted, onBeforeMount, nextTick } from 'vue';
|
|
29
29
|
import type { PositioningStrategy, Placement } from '@popperjs/core'
|
|
30
|
-
import UiDialog from '../dialog/index.vue'
|
|
31
|
-
import UiButton from '../button/index.vue'
|
|
30
|
+
// import UiDialog from '../dialog/index.vue'
|
|
31
|
+
// import UiButton from '../button/index.vue'
|
|
32
32
|
import { usePopper } from './usePopper'
|
|
33
33
|
const sreenWidth = ref(0)
|
|
34
34
|
const props = defineProps({
|