bge-ui 1.4.8 → 1.5.0
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 +141 -157
- package/dist/style.css +71 -78
- package/package.json +1 -1
- package/src/dialog/index.vue +34 -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,123 @@ 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
|
+
offsetHeight += child.offsetHeight;
|
|
8740
|
+
}
|
|
8741
|
+
opacity.value = 1;
|
|
8742
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight);
|
|
8743
|
+
});
|
|
8744
|
+
}
|
|
8745
|
+
}, {
|
|
8746
|
+
immediate: true
|
|
8747
|
+
});
|
|
8748
|
+
function updateHeight() {
|
|
8749
|
+
let offsetHeight = 0;
|
|
8750
|
+
const children = DialogBody.value.children;
|
|
8751
|
+
for (let i = 0; i < children.length; i++) {
|
|
8752
|
+
const child = children[i];
|
|
8753
|
+
offsetHeight += child.offsetHeight;
|
|
8754
|
+
}
|
|
8755
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight);
|
|
8756
|
+
}
|
|
8757
|
+
function close() {
|
|
8758
|
+
height.value = "160";
|
|
8759
|
+
opacity.value = 0;
|
|
8760
|
+
setTimeout(() => {
|
|
8761
|
+
emits("update:visible", false);
|
|
8762
|
+
emits("close", false);
|
|
8763
|
+
}, 200);
|
|
8764
|
+
}
|
|
8765
|
+
__expose({
|
|
8766
|
+
updateHeight
|
|
8767
|
+
});
|
|
8768
|
+
return (_ctx, _cache) => {
|
|
8769
|
+
const _component_MonoClose = resolveComponent("MonoClose");
|
|
8770
|
+
return __props.teleported ? (openBlock(), createBlock(Teleport, {
|
|
8771
|
+
key: 0,
|
|
8772
|
+
to: "body"
|
|
8773
|
+
}, [
|
|
8774
|
+
createElementVNode("div", {
|
|
8775
|
+
class: normalizeClass(`bge-modal ${__props.customClass} ${__props.visible ? "show" : ""}`),
|
|
8776
|
+
style: normalizeStyle(`opacity: ${opacity.value};`)
|
|
8777
|
+
}, [
|
|
8778
|
+
createElementVNode("div", {
|
|
8779
|
+
class: "bge-dialog",
|
|
8780
|
+
style: normalizeStyle(`height:${height.value}px`)
|
|
8781
|
+
}, [
|
|
8782
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
8783
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
8784
|
+
__props.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
8785
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
8786
|
+
], 64)) : renderSlot(_ctx.$slots, "header", { key: 1 }),
|
|
8787
|
+
createElementVNode("span", {
|
|
8788
|
+
class: "bge-dialog__close",
|
|
8789
|
+
onClick: withModifiers(close, ["stop"])
|
|
8790
|
+
}, [
|
|
8791
|
+
createVNode(_component_MonoClose)
|
|
8792
|
+
], 8, _hoisted_3$a)
|
|
8793
|
+
]),
|
|
8794
|
+
createElementVNode("div", {
|
|
8795
|
+
class: normalizeClass(["bge-dialog__body", { full: __props.fullBody }]),
|
|
8796
|
+
ref_key: "DialogBody",
|
|
8797
|
+
ref: DialogBody
|
|
8798
|
+
}, [
|
|
8799
|
+
renderSlot(_ctx.$slots, "default")
|
|
8800
|
+
], 2)
|
|
8801
|
+
])
|
|
8802
|
+
], 4)
|
|
8803
|
+
], 6)
|
|
8804
|
+
])) : createCommentVNode("", true);
|
|
8805
|
+
};
|
|
8806
|
+
}
|
|
8807
|
+
});
|
|
8824
8808
|
const _hoisted_1$g = { class: "bge-checkbox__input" };
|
|
8825
8809
|
const _hoisted_2$c = ["id", "disabled"];
|
|
8826
8810
|
const _hoisted_3$9 = {
|
|
@@ -10795,7 +10779,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
10795
10779
|
onTouchstart: onButtonDown,
|
|
10796
10780
|
onMousedown: onButtonDown
|
|
10797
10781
|
}, [
|
|
10798
|
-
__props.showToolTip ? (openBlock(), createBlock(_sfc_main$
|
|
10782
|
+
__props.showToolTip ? (openBlock(), createBlock(_sfc_main$q, {
|
|
10799
10783
|
key: 0,
|
|
10800
10784
|
ref_key: "tooltip",
|
|
10801
10785
|
ref: tooltip,
|
|
@@ -10905,7 +10889,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
10905
10889
|
const emits = __emit;
|
|
10906
10890
|
return (_ctx, _cache) => {
|
|
10907
10891
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
10908
|
-
createVNode(_sfc_main$
|
|
10892
|
+
createVNode(_sfc_main$q, {
|
|
10909
10893
|
ref_key: "tooltipRef",
|
|
10910
10894
|
ref: tooltipRef,
|
|
10911
10895
|
placement: "bottom",
|
|
@@ -22776,8 +22760,8 @@ const components = {
|
|
|
22776
22760
|
UiInput: _sfc_main$t,
|
|
22777
22761
|
UiTabs: _sfc_main$s,
|
|
22778
22762
|
UiTabPane: _sfc_main$r,
|
|
22779
|
-
UiTooltip: _sfc_main$
|
|
22780
|
-
UiDialog: _sfc_main$
|
|
22763
|
+
UiTooltip: _sfc_main$q,
|
|
22764
|
+
UiDialog: _sfc_main$o,
|
|
22781
22765
|
UiCheckbox: _sfc_main$n,
|
|
22782
22766
|
UiRadio: _sfc_main$m,
|
|
22783
22767
|
UiSlider: _sfc_main$l,
|
|
@@ -22801,7 +22785,7 @@ export {
|
|
|
22801
22785
|
_sfc_main$2g as UiButton,
|
|
22802
22786
|
_sfc_main$n as UiCheckbox,
|
|
22803
22787
|
UiDatePicker,
|
|
22804
|
-
_sfc_main$
|
|
22788
|
+
_sfc_main$o as UiDialog,
|
|
22805
22789
|
_sfc_main$v as UiForm,
|
|
22806
22790
|
_sfc_main$u as UiFormItem,
|
|
22807
22791
|
_sfc_main$t as UiInput,
|
|
@@ -22814,6 +22798,6 @@ export {
|
|
|
22814
22798
|
UiSwitch,
|
|
22815
22799
|
_sfc_main$r as UiTabPane,
|
|
22816
22800
|
_sfc_main$s as UiTabs,
|
|
22817
|
-
_sfc_main$
|
|
22801
|
+
_sfc_main$q as UiTooltip,
|
|
22818
22802
|
index as default
|
|
22819
22803
|
};
|
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,14 @@ 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
|
+
offsetHeight += child.offsetHeight
|
|
69
|
+
}
|
|
64
70
|
opacity.value = 1
|
|
65
|
-
height.value = 48 + 64 + Number(
|
|
71
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight)
|
|
66
72
|
})
|
|
67
73
|
}
|
|
68
74
|
}, {
|
|
@@ -70,7 +76,13 @@ watch(() => [props.visible, props.resetState], ([value]) => {
|
|
|
70
76
|
})
|
|
71
77
|
|
|
72
78
|
function updateHeight() {
|
|
73
|
-
|
|
79
|
+
let offsetHeight = 0
|
|
80
|
+
const children = DialogBody.value.children
|
|
81
|
+
for (let i = 0; i < children.length; i++) {
|
|
82
|
+
const child = children[i]
|
|
83
|
+
offsetHeight += child.offsetHeight
|
|
84
|
+
}
|
|
85
|
+
height.value = 48 + 64 + 16 + Number(offsetHeight)
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
|
|
@@ -133,6 +145,7 @@ defineExpose({
|
|
|
133
145
|
overflow: hidden;
|
|
134
146
|
z-index: 1003;
|
|
135
147
|
width: 440px;
|
|
148
|
+
max-height: calc(94vh - 86px);
|
|
136
149
|
margin: 0 auto;
|
|
137
150
|
border-radius: var(--radius-medium, 16px);
|
|
138
151
|
position: absolute;
|
|
@@ -169,13 +182,18 @@ defineExpose({
|
|
|
169
182
|
}
|
|
170
183
|
}
|
|
171
184
|
|
|
185
|
+
.bge-dailog__wrapper {
|
|
186
|
+
height: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
172
189
|
.bge-dialog__body {
|
|
173
190
|
padding: 16px 32px 0 32px;
|
|
174
|
-
max-height: calc(94vh - 86px);
|
|
175
191
|
color: var(--tc-secondary, #B2BAC2);
|
|
176
192
|
font-size: 14px;
|
|
177
193
|
font-weight: 400;
|
|
178
194
|
line-height: 24px;
|
|
195
|
+
overflow-y: auto;
|
|
196
|
+
height: calc(100% - 48px);
|
|
179
197
|
|
|
180
198
|
&.full {
|
|
181
199
|
padding: 16px 0;
|
|
@@ -183,18 +201,18 @@ defineExpose({
|
|
|
183
201
|
}
|
|
184
202
|
}
|
|
185
203
|
|
|
186
|
-
@include md {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
204
|
+
// @include md {
|
|
205
|
+
// .bge-dialog {
|
|
206
|
+
// width: 100%;
|
|
207
|
+
// left: 0;
|
|
208
|
+
// top: 100%;
|
|
209
|
+
// transform: translate(0, -100%);
|
|
210
|
+
|
|
211
|
+
// .bge-dialog__header {
|
|
212
|
+
// font-size: 18px;
|
|
213
|
+
// line-height: 32px;
|
|
214
|
+
// }
|
|
215
|
+
// }
|
|
216
|
+
// }
|
|
199
217
|
|
|
200
218
|
</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({
|