iov-design 2.15.71 → 2.15.72
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/dropdown-menu.js +4 -4
- package/lib/index.js +1 -1
- package/lib/iov-design.common.js +31 -18
- package/lib/link.js +3 -3
- package/lib/theme-chalk/alert.css +1 -1
- package/lib/theme-chalk/autocomplete.css +1 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/date-picker.css +1 -1
- package/lib/theme-chalk/dropdown.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/popover.css +1 -1
- package/lib/theme-chalk/popper.css +1 -1
- package/lib/theme-chalk/select-dropdown.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/time-picker.css +1 -1
- package/lib/theme-chalk/time-select.css +1 -1
- package/lib/tooltip.js +13 -0
- package/package.json +1 -1
- package/packages/dropdown/src/dropdown-menu.vue +2 -2
- package/packages/link/src/main.vue +1 -1
- package/packages/theme-chalk/src/alert.scss +1 -1
- package/packages/theme-chalk/src/popper.scss +4 -4
- package/packages/tooltip/src/main.js +13 -0
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&[x-placement^="top"] {
|
|
26
|
-
margin-bottom:
|
|
26
|
+
margin-bottom: 4px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&[x-placement^="top"] .popper__arrow {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&[x-placement^="bottom"] {
|
|
45
|
-
margin-top:
|
|
45
|
+
margin-top: 4px;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&[x-placement^="bottom"] .popper__arrow {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&[x-placement^="right"] {
|
|
64
|
-
margin-left:
|
|
64
|
+
margin-left: 4px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
&[x-placement^="right"] .popper__arrow {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
&[x-placement^="left"] {
|
|
83
|
-
margin-right:
|
|
83
|
+
margin-right: 4px;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&[x-placement^="left"] .popper__arrow {
|
|
@@ -76,6 +76,19 @@ export default {
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
render(h) {
|
|
79
|
+
const content = this.$slots.content || this.content;
|
|
80
|
+
|
|
81
|
+
// 如果没有 tooltip 内容,直接返回默认插槽元素,不渲染 popper
|
|
82
|
+
if (!content) {
|
|
83
|
+
const firstElement = this.getFirstElement();
|
|
84
|
+
if (!firstElement) return null;
|
|
85
|
+
|
|
86
|
+
const data = firstElement.data = firstElement.data || {};
|
|
87
|
+
data.staticClass = this.addTooltipClass(data.staticClass);
|
|
88
|
+
|
|
89
|
+
return firstElement;
|
|
90
|
+
}
|
|
91
|
+
|
|
79
92
|
if (this.popperVM) {
|
|
80
93
|
this.popperVM.node = (
|
|
81
94
|
<transition
|