iov-design 2.15.74 → 2.15.75
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/lib/index.js +1 -1
- package/lib/iov-design.common.js +22 -16
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/slider.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/tooltip.css +1 -1
- package/lib/tooltip.js +21 -15
- package/package.json +1 -1
- package/packages/theme-chalk/src/tooltip.scss +3 -0
- package/packages/tooltip/src/main.js +17 -15
- package/src/index.js +1 -1
package/lib/iov-design.common.js
CHANGED
|
@@ -17656,19 +17656,6 @@ main.directive = directive;
|
|
|
17656
17656
|
render: function render(h) {
|
|
17657
17657
|
var _this2 = this;
|
|
17658
17658
|
|
|
17659
|
-
var content = this.$slots.content || this.content;
|
|
17660
|
-
|
|
17661
|
-
// 如果没有 tooltip 内容,直接返回默认插槽元素,不渲染 popper
|
|
17662
|
-
if (!content) {
|
|
17663
|
-
var _firstElement = this.getFirstElement();
|
|
17664
|
-
if (!_firstElement) return null;
|
|
17665
|
-
|
|
17666
|
-
var _data = _firstElement.data = _firstElement.data || {};
|
|
17667
|
-
_data.staticClass = this.addTooltipClass(_data.staticClass);
|
|
17668
|
-
|
|
17669
|
-
return _firstElement;
|
|
17670
|
-
}
|
|
17671
|
-
|
|
17672
17659
|
if (this.popperVM) {
|
|
17673
17660
|
this.popperVM.node = h(
|
|
17674
17661
|
'transition',
|
|
@@ -17703,7 +17690,13 @@ main.directive = directive;
|
|
|
17703
17690
|
}],
|
|
17704
17691
|
|
|
17705
17692
|
'class': ['el-tooltip__popper', 'is-' + this.effect, this.popperClass] },
|
|
17706
|
-
[
|
|
17693
|
+
[h(
|
|
17694
|
+
'el-scrollbar',
|
|
17695
|
+
{
|
|
17696
|
+
attrs: { 'wrap-style': 'max-height: 168px;' }
|
|
17697
|
+
},
|
|
17698
|
+
[this.$slots.content || this.content]
|
|
17699
|
+
)]
|
|
17707
17700
|
)]
|
|
17708
17701
|
);
|
|
17709
17702
|
}
|
|
@@ -17757,6 +17750,16 @@ main.directive = directive;
|
|
|
17757
17750
|
} else {
|
|
17758
17751
|
Object(dom_["removeClass"])(this.referenceElm, 'focusing');
|
|
17759
17752
|
}
|
|
17753
|
+
},
|
|
17754
|
+
content: function content(val) {
|
|
17755
|
+
// 如果内容变为空,立即隐藏 tooltip
|
|
17756
|
+
if (!val) {
|
|
17757
|
+
this.showPopper = false;
|
|
17758
|
+
clearTimeout(this.timeout);
|
|
17759
|
+
if (this.timeoutPending) {
|
|
17760
|
+
clearTimeout(this.timeoutPending);
|
|
17761
|
+
}
|
|
17762
|
+
}
|
|
17760
17763
|
}
|
|
17761
17764
|
},
|
|
17762
17765
|
methods: {
|
|
@@ -17789,7 +17792,10 @@ main.directive = directive;
|
|
|
17789
17792
|
handleShowPopper: function handleShowPopper() {
|
|
17790
17793
|
var _this4 = this;
|
|
17791
17794
|
|
|
17792
|
-
|
|
17795
|
+
// 检查内容是否为空
|
|
17796
|
+
var hasContent = this.content || this.$slots.content && this.$slots.content.length > 0;
|
|
17797
|
+
if (!hasContent || !this.expectedState || this.manual) return;
|
|
17798
|
+
|
|
17793
17799
|
clearTimeout(this.timeout);
|
|
17794
17800
|
this.timeout = setTimeout(function () {
|
|
17795
17801
|
_this4.showPopper = true;
|
|
@@ -35859,7 +35865,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
35859
35865
|
}
|
|
35860
35866
|
|
|
35861
35867
|
/* harmony default export */ var src_0 = __webpack_exports__["default"] = ({
|
|
35862
|
-
version: '2.15.
|
|
35868
|
+
version: '2.15.75',
|
|
35863
35869
|
locale: lib_locale_default.a.use,
|
|
35864
35870
|
i18n: lib_locale_default.a.i18n,
|
|
35865
35871
|
install: src_install,
|