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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iov-design",
3
- "version": "2.15.71",
3
+ "version": "2.15.72",
4
4
  "description": "A Component Library for Vue.js.",
5
5
  "main": "lib/iov-design.common.js",
6
6
  "files": [
@@ -18,11 +18,11 @@
18
18
  props: {
19
19
  visibleArrow: {
20
20
  type: Boolean,
21
- default: true
21
+ default: false
22
22
  },
23
23
  arrowOffset: {
24
24
  type: Number,
25
- default: 0
25
+ default: 400
26
26
  }
27
27
  },
28
28
 
@@ -2,7 +2,7 @@
2
2
  <a
3
3
  :class="[
4
4
  'el-link',
5
- type ? `el-link--${type}` : '',
5
+ type ? `el-link--${type}` : 'el-link--default',
6
6
  size ? `el-link--${size}` : '',
7
7
  text ? `is-text` : '',
8
8
  disabled && 'is-disabled',
@@ -12,7 +12,7 @@
12
12
  overflow: hidden;
13
13
  opacity: 1;
14
14
  display: flex;
15
- align-items: center;
15
+ align-items: flex-start;
16
16
  transition: opacity .2s;
17
17
 
18
18
  @include when(light) {
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  &[x-placement^="top"] {
26
- margin-bottom: 10px;
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: 10px;
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: 10px;
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: 10px;
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
package/src/index.js CHANGED
@@ -212,7 +212,7 @@ if (typeof window !== 'undefined' && window.Vue) {
212
212
  }
213
213
 
214
214
  export default {
215
- version: '2.15.71',
215
+ version: '2.15.72',
216
216
  locale: locale.use,
217
217
  i18n: locale.i18n,
218
218
  install,