@whitesev/pops 1.8.8 → 1.8.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.amd.js +48 -37
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +48 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +48 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +48 -37
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +48 -37
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +48 -37
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +2 -2
- package/dist/types/src/components/tooltip/index.d.ts +11 -11
- package/dist/types/src/components/tooltip/indexType.d.ts +6 -0
- package/dist/types/src/utils/PopsDOMUtils.d.ts +3 -3
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/panel/PanelHandleContentDetails.ts +1 -1
- package/src/components/tooltip/config.ts +1 -1
- package/src/components/tooltip/index.css +6 -1
- package/src/components/tooltip/index.ts +48 -35
- package/src/components/tooltip/indexType.ts +6 -0
- package/src/utils/PopsDOMUtils.ts +9 -5
package/dist/index.amd.js
CHANGED
|
@@ -963,13 +963,17 @@ define((function () { 'use strict';
|
|
|
963
963
|
}
|
|
964
964
|
/**
|
|
965
965
|
* 实现jQuery中的$().offset();
|
|
966
|
-
* @param
|
|
967
|
-
* @
|
|
966
|
+
* @param element
|
|
967
|
+
* @param calcScroll 计算滚动距离
|
|
968
968
|
*/
|
|
969
|
-
offset(element) {
|
|
969
|
+
offset(element, calcScroll = true) {
|
|
970
970
|
let rect = element.getBoundingClientRect();
|
|
971
971
|
let win = element.ownerDocument.defaultView;
|
|
972
|
-
let resultRect = new DOMRect(
|
|
972
|
+
let resultRect = new DOMRect(calcScroll
|
|
973
|
+
? parseFloat((rect.left + (win?.pageXOffset || 0)).toString())
|
|
974
|
+
: rect.left, calcScroll
|
|
975
|
+
? parseFloat((rect.top + (win?.pageYOffset || 0)).toString())
|
|
976
|
+
: rect.top, rect.width, rect.height);
|
|
973
977
|
return resultRect;
|
|
974
978
|
}
|
|
975
979
|
width(element, isShow = false, parent) {
|
|
@@ -2280,7 +2284,7 @@ define((function () { 'use strict';
|
|
|
2280
2284
|
|
|
2281
2285
|
var iframeCSS = ".pops[type-value=\"iframe\"] {\r\n\t--container-title-height: 55px;\r\n\ttransition: width 0.35s ease, height 0.35s ease;\r\n}\r\n.pops[type-value] .pops-iframe-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n}\r\n.pops[type-value=\"iframe\"] .pops-iframe-title {\r\n\twidth: calc(100% - 0px);\r\n\theight: var(--container-title-height);\r\n\tborder-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));\r\n}\r\n.pops[type-value=\"iframe\"] .pops-iframe-title p[pops] {\r\n\twidth: 100%;\r\n\toverflow: hidden;\r\n\tcolor: rgb(51, 51, 51);\r\n\ttext-indent: 15px;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n\tfont-weight: 500;\r\n\tline-height: normal;\r\n\talign-content: center;\r\n}\r\n.pops[type-value=\"iframe\"] .pops-iframe-content {\r\n\twidth: 100%;\r\n\t/*height: calc(100% - var(--container-title-height));*/\r\n\tflex: 1;\r\n\toverflow: hidden;\r\n\tword-break: break-word;\r\n}\r\n.pops[type-value=\"iframe\"] .pops-iframe-content p[pops] {\r\n\tpadding: 5px 10px;\r\n\tcolor: #333;\r\n\ttext-indent: 15px;\r\n}\r\n.pops-loading {\r\n\tposition: absolute;\r\n\ttop: 40px;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tz-index: 5;\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n}\r\n.pops-loading:before {\r\n\tposition: absolute;\r\n\ttop: 50%;\r\n\tleft: 50%;\r\n\tz-index: 3;\r\n\tdisplay: block;\r\n\tmargin: -20px 0 0 -20px;\r\n\tpadding: 20px;\r\n\tborder: 4px solid rgb(221, 221, 221, var(--pops-bd-opacity));\r\n\tborder-radius: 50%;\r\n\tcontent: \"\";\r\n\tborder-top-color: transparent;\r\n\tanimation: pops-anim-wait-rotate 1.2s linear infinite;\r\n}\r\n.pops[type-value=\"iframe\"].pops[type-module=\"min\"] {\r\n\tbottom: 0;\r\n\tmax-width: 200px;\r\n\tmax-height: 53px;\r\n\tposition: unset;\r\n}\r\n.pops[type-value=\"iframe\"].pops[type-module=\"min\"]\r\n\t.pops-header-control[type=\"min\"] {\r\n\tdisplay: none;\r\n}\r\n.pops[type-value=\"iframe\"].pops-iframe-unset-top {\r\n\ttop: unset !important;\r\n}\r\n.pops[type-value=\"iframe\"].pops-iframe-unset-left {\r\n\tleft: unset !important;\r\n}\r\n.pops[type-value=\"iframe\"].pops-iframe-unset-transform {\r\n\ttransform: none !important;\r\n}\r\n.pops[type-value=\"iframe\"].pops-iframe-unset-transition {\r\n\ttransition: none !important;\r\n}\r\n.pops[type-value=\"iframe\"].pops[type-module=\"max\"] {\r\n\twidth: 100% !important;\r\n\theight: 100% !important;\r\n}\r\n.pops[type-value=\"iframe\"] iframe[pops] {\r\n\twidth: calc(100% - 4px);\r\n\theight: calc(100% - 4px);\r\n\tborder: 0;\r\n}\r\n.pops-iframe-content-global-loading {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tz-index: 999999;\r\n\twidth: 0;\r\n\theight: 4px;\r\n\tbackground: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\r\n\tanimation: iframeLoadingChange 2s forwards;\r\n}\r\n\r\n.pops-anim:has(.pops[type-value=\"iframe\"].pops[type-module=\"min\"]) {\r\n\tposition: unset;\r\n}\r\n";
|
|
2282
2286
|
|
|
2283
|
-
var tooltipCSS = ".pops-tip {\r\n\t--tooltip-color: #4e4e4e;\r\n\t--tooltip-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\t--tooltip-bd-radius: 2px;\r\n\t--tooltip-font-size: 14px;\r\n\t--tooltip-padding-top: 13px;\r\n\t--tooltip-padding-right: 13px;\r\n\t--tooltip-padding-bottom: 13px;\r\n\t--tooltip-padding-left: 13px;\r\n\r\n\t--tooltip-arrow--after-color: rgb(78, 78, 78);\r\n\t--tooltip-arrow--after-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\t--tooltip-arrow--after-width: 12px;\r\n\t--tooltip-arrow--after-height: 12px;\r\n\r\n\
|
|
2287
|
+
var tooltipCSS = ".pops-tip {\r\n\t--tooltip-color: #4e4e4e;\r\n\t--tooltip-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\t--tooltip-bd-radius: 2px;\r\n\t--tooltip-font-size: 14px;\r\n\t--tooltip-padding-top: 13px;\r\n\t--tooltip-padding-right: 13px;\r\n\t--tooltip-padding-bottom: 13px;\r\n\t--tooltip-padding-left: 13px;\r\n\r\n\t--tooltip-arrow--after-color: rgb(78, 78, 78);\r\n\t--tooltip-arrow--after-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\t--tooltip-arrow--after-width: 12px;\r\n\t--tooltip-arrow--after-height: 12px;\r\n\r\n\tpadding: var(--tooltip-padding-top) var(--tooltip-padding-right)\r\n\t\tvar(--tooltip-padding-bottom) var(--tooltip-padding-left);\r\n\tmax-width: 400px;\r\n\tmax-height: 300px;\r\n\tborder-radius: var(--tooltip-bd-radius);\r\n\tbackground-color: var(--tooltip-bg-color);\r\n\tbox-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);\r\n\tcolor: var(--tooltip-color);\r\n\tfont-size: var(--tooltip-font-size);\r\n}\r\n.pops-tip[data-position=\"absolute\"] {\r\n\tposition: absolute;\r\n}\r\n.pops-tip[data-position=\"fixed\"] {\r\n\tposition: fixed;\r\n}\r\n/* github的样式 */\r\n.pops-tip.github-tooltip {\r\n\t--tooltip-bg-opacity: 1;\r\n\t--tooltip-color: rgb(255, 255, 255);\r\n\t--tooltip-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));\r\n\t--tooltip-bd-radius: 6px;\r\n\t--tooltip-padding-top: 6px;\r\n\t--tooltip-padding-right: 8px;\r\n\t--tooltip-padding-bottom: 6px;\r\n\t--tooltip-padding-left: 8px;\r\n\r\n\t--tooltip-arrow--after-color: rgb(255, 255, 255);\r\n\t--tooltip-arrow--after-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));\r\n\t--tooltip-arrow--after-width: 8px;\r\n\t--tooltip-arrow--after-height: 8px;\r\n}\r\n.pops-tip .pops-tip-arrow {\r\n\tposition: absolute;\r\n\ttop: 100%;\r\n\tleft: 50%;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\theight: 12.5px;\r\n\ttransform: translateX(-50%);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow::after {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 50%;\r\n\twidth: var(--tooltip-arrow--after-width);\r\n\theight: var(--tooltip-arrow--after-height);\r\n\tbackground: var(--tooltip-arrow--after-bg-color);\r\n\tcolor: var(--tooltip-arrow--after-color);\r\n\tbox-shadow: 0 1px 7px rgba(0, 0, 0, 0.24), 0 1px 7px rgba(0, 0, 0, 0.12);\r\n\tcontent: \"\";\r\n\ttransform: translateX(-50%) translateY(-50%) rotate(45deg);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"bottom\"] {\r\n\tposition: absolute;\r\n\ttop: 100%;\r\n\tleft: 50%;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\theight: 12.5px;\r\n\ttransform: translateX(-50%);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"bottom\"]:after {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 50%;\r\n\twidth: var(--tooltip-arrow--after-width);\r\n\theight: var(--tooltip-arrow--after-height);\r\n\tbackground: var(--tooltip-arrow--after-bg-color);\r\n\tbox-shadow: 0 1px 7px rgba(0, 0, 0, 0.24), 0 1px 7px rgba(0, 0, 0, 0.12);\r\n\tcontent: \"\";\r\n\ttransform: translateX(-50%) translateY(-50%) rotate(45deg);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"left\"] {\r\n\ttop: 50%;\r\n\tleft: -12.5px;\r\n\twidth: 12.5px;\r\n\theight: 50px;\r\n\ttransform: translateY(-50%);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"left\"]:after {\r\n\tposition: absolute;\r\n\ttop: 50%;\r\n\tleft: 100%;\r\n\tcontent: \"\";\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"right\"] {\r\n\ttop: 50%;\r\n\tright: -12.5px;\r\n\tleft: auto;\r\n\twidth: 12.5px;\r\n\theight: 50px;\r\n\ttransform: translateY(-50%);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"right\"]:after {\r\n\tposition: absolute;\r\n\ttop: 50%;\r\n\tleft: 0;\r\n\tcontent: \"\";\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"top\"] {\r\n\ttop: -12.5px;\r\n\tleft: 50%;\r\n\ttransform: translateX(-50%);\r\n}\r\n\r\n.pops-tip .pops-tip-arrow[data-position=\"top\"]:after {\r\n\tposition: absolute;\r\n\ttop: 100%;\r\n\tleft: 50%;\r\n\tcontent: \"\";\r\n}\r\n\r\n.pops-tip[data-motion] {\r\n\t-webkit-animation-duration: 0.25s;\r\n\tanimation-duration: 0.25s;\r\n\t-webkit-animation-fill-mode: forwards;\r\n\tanimation-fill-mode: forwards;\r\n}\r\n.pops-tip[data-motion=\"fadeOutRight\"] {\r\n\t-webkit-animation-name: pops-motion-fadeOutRight;\r\n\tanimation-name: pops-motion-fadeOutRight;\r\n}\r\n.pops-tip[data-motion=\"fadeInTop\"] {\r\n\t-webkit-animation-name: pops-motion-fadeInTop;\r\n\tanimation-name: pops-motion-fadeInTop;\r\n\tanimation-timing-function: cubic-bezier(0.49, 0.49, 0.13, 1.3);\r\n}\r\n.pops-tip[data-motion=\"fadeOutTop\"] {\r\n\t-webkit-animation-name: pops-motion-fadeOutTop;\r\n\tanimation-name: pops-motion-fadeOutTop;\r\n\tanimation-timing-function: cubic-bezier(0.32, 0.37, 0.06, 0.87);\r\n}\r\n.pops-tip[data-motion=\"fadeInBottom\"] {\r\n\t-webkit-animation-name: pops-motion-fadeInBottom;\r\n\tanimation-name: pops-motion-fadeInBottom;\r\n}\r\n.pops-tip[data-motion=\"fadeOutBottom\"] {\r\n\t-webkit-animation-name: pops-motion-fadeOutBottom;\r\n\tanimation-name: pops-motion-fadeOutBottom;\r\n}\r\n.pops-tip[data-motion=\"fadeInLeft\"] {\r\n\t-webkit-animation-name: pops-motion-fadeInLeft;\r\n\tanimation-name: pops-motion-fadeInLeft;\r\n}\r\n.pops-tip[data-motion=\"fadeOutLeft\"] {\r\n\t-webkit-animation-name: pops-motion-fadeOutLeft;\r\n\tanimation-name: pops-motion-fadeOutLeft;\r\n}\r\n.pops-tip[data-motion=\"fadeInRight\"] {\r\n\t-webkit-animation-name: pops-motion-fadeInRight;\r\n\tanimation-name: pops-motion-fadeInRight;\r\n}\r\n";
|
|
2284
2288
|
|
|
2285
2289
|
var drawerCSS = ".pops[type-value=\"drawer\"] {\r\n\tposition: fixed;\r\n\tbox-sizing: border-box;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\tbox-shadow: 0px 16px 48px 16px rgba(0, 0, 0, 0.08),\r\n\t\t0px 12px 32px rgba(0, 0, 0, 0.12), 0px 8px 16px -8px rgba(0, 0, 0, 0.16);\r\n\toverflow: hidden;\r\n\ttransition: all 0.3s;\r\n}\r\n.pops[type-value] .pops-drawer-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n}\r\n.pops[type-value] .pops-drawer-title p[pops] {\r\n\tline-height: normal;\r\n\talign-content: center;\r\n}\r\n\r\n.pops-drawer-content {\r\n\tflex: 1;\r\n\toverflow: auto;\r\n}\r\n.pops[type-value=\"drawer\"] .pops-drawer-btn {\r\n\tpadding-top: 10px;\r\n\tpadding-bottom: 10px;\r\n}\r\n.pops[type-value=\"drawer\"][direction=\"top\"] {\r\n\twidth: 100%;\r\n\tleft: 0;\r\n\tright: 0;\r\n\ttop: 0;\r\n}\r\n.pops[type-value=\"drawer\"][direction=\"bottom\"] {\r\n\twidth: 100%;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n.pops[type-value=\"drawer\"][direction=\"left\"] {\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n}\r\n.pops[type-value=\"drawer\"][direction=\"right\"] {\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tbottom: 0;\r\n\tright: 0;\r\n}\r\n";
|
|
2286
2290
|
|
|
@@ -6629,6 +6633,7 @@ define((function () { 'use strict';
|
|
|
6629
6633
|
zIndex: () => {
|
|
6630
6634
|
return PopsInstanceUtils.getPopsMaxZIndex().zIndex;
|
|
6631
6635
|
},
|
|
6636
|
+
isFixed: true,
|
|
6632
6637
|
className: "github-tooltip",
|
|
6633
6638
|
only: false,
|
|
6634
6639
|
eventOption: {
|
|
@@ -6648,7 +6653,6 @@ define((function () { 'use strict';
|
|
|
6648
6653
|
}
|
|
6649
6654
|
},
|
|
6650
6655
|
alwaysShow: false,
|
|
6651
|
-
// only: false,
|
|
6652
6656
|
position: "top",
|
|
6653
6657
|
arrowDistance: 10,
|
|
6654
6658
|
});
|
|
@@ -9428,6 +9432,7 @@ define((function () { 'use strict';
|
|
|
9428
9432
|
content: "默认文字",
|
|
9429
9433
|
position: "top",
|
|
9430
9434
|
className: "",
|
|
9435
|
+
isFixed: false,
|
|
9431
9436
|
alwaysShow: false,
|
|
9432
9437
|
triggerShowEventName: "mouseenter touchstart",
|
|
9433
9438
|
triggerCloseEventName: "mouseleave touchend",
|
|
@@ -9493,6 +9498,9 @@ define((function () { 'use strict';
|
|
|
9493
9498
|
<div class="pops-tip-content" style="text-align: center;"></div>
|
|
9494
9499
|
<div class="pops-tip-arrow"></div>
|
|
9495
9500
|
`,
|
|
9501
|
+
}, {
|
|
9502
|
+
"data-position": this.$data.config.isFixed ? "fixed" : "absolute",
|
|
9503
|
+
"data-guid": this.$data.guid,
|
|
9496
9504
|
});
|
|
9497
9505
|
/** 内容 */
|
|
9498
9506
|
let $toolTipContent = $toolTipContainer.querySelector(".pops-tip-content");
|
|
@@ -9503,8 +9511,6 @@ define((function () { 'use strict';
|
|
|
9503
9511
|
this.$data.config.className.trim() !== "") {
|
|
9504
9512
|
popsDOMUtils.addClassName($toolTipContainer, this.$data.config.className);
|
|
9505
9513
|
}
|
|
9506
|
-
// 添加attr
|
|
9507
|
-
$toolTipContainer.setAttribute("data-guid", this.$data.guid);
|
|
9508
9514
|
// 添加z-index
|
|
9509
9515
|
$toolTipContainer.style.zIndex = PopsHandler.handleZIndex(this.$data.config.zIndex).toString();
|
|
9510
9516
|
if (this.$data.config.style != null) {
|
|
@@ -9560,12 +9566,17 @@ define((function () { 'use strict';
|
|
|
9560
9566
|
* @param otherDistance 其它位置的偏移
|
|
9561
9567
|
*/
|
|
9562
9568
|
getPosition(targetElement, arrowDistance, otherDistance) {
|
|
9563
|
-
let
|
|
9564
|
-
|
|
9565
|
-
let
|
|
9566
|
-
//
|
|
9567
|
-
let
|
|
9568
|
-
//
|
|
9569
|
+
let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
9570
|
+
// 目标 宽
|
|
9571
|
+
let targetElement_width = offsetInfo.width;
|
|
9572
|
+
// 目标 高
|
|
9573
|
+
let targetElement_height = offsetInfo.height;
|
|
9574
|
+
// 目标 顶部距离
|
|
9575
|
+
let targetElement_top = offsetInfo.top;
|
|
9576
|
+
// let targetElement_bottom = offsetInfo.bottom;
|
|
9577
|
+
// 目标 左边距离
|
|
9578
|
+
let targetElement_left = offsetInfo.left;
|
|
9579
|
+
// let targetElement_right = offsetInfo.right;
|
|
9569
9580
|
let toolTipElement_width = popsDOMUtils.outerWidth(this.$el.$toolTip);
|
|
9570
9581
|
let toolTipElement_height = popsDOMUtils.outerHeight(this.$el.$toolTip);
|
|
9571
9582
|
/* 目标元素的x轴的中间位置 */
|
|
@@ -9621,21 +9632,21 @@ define((function () { 'use strict';
|
|
|
9621
9632
|
*/
|
|
9622
9633
|
onEvent() {
|
|
9623
9634
|
// 监听动画结束事件
|
|
9624
|
-
this.
|
|
9635
|
+
this.onToolTipAnimationFinishEvent();
|
|
9625
9636
|
this.onShowEvent();
|
|
9626
9637
|
this.onCloseEvent();
|
|
9627
|
-
this.
|
|
9628
|
-
this.
|
|
9638
|
+
this.onToolTipMouseEnterEvent();
|
|
9639
|
+
this.onToolTipMouseLeaveEvent();
|
|
9629
9640
|
}
|
|
9630
9641
|
/**
|
|
9631
9642
|
* 取消事件绑定
|
|
9632
9643
|
*/
|
|
9633
9644
|
offEvent() {
|
|
9634
|
-
this.
|
|
9645
|
+
this.offToolTipAnimationFinishEvent();
|
|
9635
9646
|
this.offShowEvent();
|
|
9636
9647
|
this.offCloseEvent();
|
|
9637
|
-
this.
|
|
9638
|
-
this.
|
|
9648
|
+
this.offToolTipMouseEnterEvent();
|
|
9649
|
+
this.offToolTipMouseLeaveEvent();
|
|
9639
9650
|
}
|
|
9640
9651
|
/**
|
|
9641
9652
|
* 添加关闭的timeId
|
|
@@ -9791,7 +9802,7 @@ define((function () { 'use strict';
|
|
|
9791
9802
|
/**
|
|
9792
9803
|
* 动画结束事件
|
|
9793
9804
|
*/
|
|
9794
|
-
|
|
9805
|
+
toolTipAnimationFinishEvent() {
|
|
9795
9806
|
if (!this.$el.$toolTip) {
|
|
9796
9807
|
return;
|
|
9797
9808
|
}
|
|
@@ -9801,21 +9812,21 @@ define((function () { 'use strict';
|
|
|
9801
9812
|
this.destory();
|
|
9802
9813
|
}
|
|
9803
9814
|
/**
|
|
9804
|
-
*
|
|
9815
|
+
* 监听tooltip的动画结束
|
|
9805
9816
|
*/
|
|
9806
|
-
|
|
9807
|
-
popsDOMUtils.on(this.$el.$toolTip, popsDOMUtils.getAnimationEndNameList(), this.
|
|
9817
|
+
onToolTipAnimationFinishEvent() {
|
|
9818
|
+
popsDOMUtils.on(this.$el.$toolTip, popsDOMUtils.getAnimationEndNameList(), this.toolTipAnimationFinishEvent.bind(this));
|
|
9808
9819
|
}
|
|
9809
9820
|
/**
|
|
9810
|
-
*
|
|
9821
|
+
* 取消tooltip监听动画结束
|
|
9811
9822
|
*/
|
|
9812
|
-
|
|
9813
|
-
popsDOMUtils.off(this.$el.$toolTip, popsDOMUtils.getAnimationEndNameList(), this.
|
|
9823
|
+
offToolTipAnimationFinishEvent() {
|
|
9824
|
+
popsDOMUtils.off(this.$el.$toolTip, popsDOMUtils.getAnimationEndNameList(), this.toolTipAnimationFinishEvent.bind(this));
|
|
9814
9825
|
}
|
|
9815
9826
|
/**
|
|
9816
9827
|
* 鼠标|触摸进入事件
|
|
9817
9828
|
*/
|
|
9818
|
-
|
|
9829
|
+
toolTipMouseEnterEvent() {
|
|
9819
9830
|
this.$el.$toolTip.style.animationPlayState = "paused";
|
|
9820
9831
|
// if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
|
|
9821
9832
|
// toolTipElement.style.animationPlayState = "paused";
|
|
@@ -9824,34 +9835,34 @@ define((function () { 'use strict';
|
|
|
9824
9835
|
/**
|
|
9825
9836
|
* 监听鼠标|触摸事件
|
|
9826
9837
|
*/
|
|
9827
|
-
|
|
9838
|
+
onToolTipMouseEnterEvent() {
|
|
9828
9839
|
this.clearCloseTimeoutId("MouseEvent");
|
|
9829
9840
|
this.clearCloseTimeoutId("TouchEvent");
|
|
9830
|
-
popsDOMUtils.on(this.$el.$toolTip, "mouseenter touchstart", this.
|
|
9841
|
+
popsDOMUtils.on(this.$el.$toolTip, "mouseenter touchstart", this.toolTipMouseEnterEvent.bind(this), this.$data.config.eventOption);
|
|
9831
9842
|
}
|
|
9832
9843
|
/**
|
|
9833
9844
|
* 取消监听鼠标|触摸事件
|
|
9834
9845
|
*/
|
|
9835
|
-
|
|
9836
|
-
popsDOMUtils.off(this.$el.$toolTip, "mouseenter touchstart", this.
|
|
9846
|
+
offToolTipMouseEnterEvent() {
|
|
9847
|
+
popsDOMUtils.off(this.$el.$toolTip, "mouseenter touchstart", this.toolTipMouseEnterEvent.bind(this), this.$data.config.eventOption);
|
|
9837
9848
|
}
|
|
9838
9849
|
/**
|
|
9839
9850
|
* 鼠标|触摸离开事件
|
|
9840
9851
|
*/
|
|
9841
|
-
|
|
9852
|
+
toolTipMouseLeaveEvent() {
|
|
9842
9853
|
this.$el.$toolTip.style.animationPlayState = "running";
|
|
9843
9854
|
}
|
|
9844
9855
|
/**
|
|
9845
9856
|
* 监听鼠标|触摸离开事件
|
|
9846
9857
|
*/
|
|
9847
|
-
|
|
9848
|
-
popsDOMUtils.on(this.$el.$toolTip, "mouseleave touchend", this.
|
|
9858
|
+
onToolTipMouseLeaveEvent() {
|
|
9859
|
+
popsDOMUtils.on(this.$el.$toolTip, "mouseleave touchend", this.toolTipMouseLeaveEvent.bind(this), this.$data.config.eventOption);
|
|
9849
9860
|
}
|
|
9850
9861
|
/**
|
|
9851
9862
|
* 取消监听鼠标|触摸离开事件
|
|
9852
9863
|
*/
|
|
9853
|
-
|
|
9854
|
-
popsDOMUtils.off(this.$el.$toolTip, "mouseleave touchend", this.
|
|
9864
|
+
offToolTipMouseLeaveEvent() {
|
|
9865
|
+
popsDOMUtils.off(this.$el.$toolTip, "mouseleave touchend", this.toolTipMouseLeaveEvent.bind(this), this.$data.config.eventOption);
|
|
9855
9866
|
}
|
|
9856
9867
|
}
|
|
9857
9868
|
class PopsTooltip {
|