iov-design 2.15.71 → 2.15.73

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.
@@ -4,135 +4,131 @@
4
4
 
5
5
  @include b(input-number) {
6
6
  position: relative;
7
- display: inline-block;
8
- width: 180px;
7
+ display: block;
9
8
  line-height: #{$--input-height - 2};
9
+ padding-left: #{$--input-height - 2};
10
+ padding-right: #{$--input-height - 2};
10
11
 
11
12
  .el-input {
12
13
  display: block;
13
-
14
14
  &__inner {
15
15
  -webkit-appearance: none;
16
- padding-left: #{$--input-height + 10};
17
- padding-right: #{$--input-height + 10};
18
- text-align: center;
16
+ border-radius: 0;
17
+ &:hover,
18
+ &:focus {
19
+ z-index: 2;
20
+ position: relative;
21
+ }
19
22
  }
20
23
  }
21
24
 
22
25
  @include e((increase, decrease)) {
23
26
  position: absolute;
24
27
  z-index: 1;
25
- top: 1px;
26
- width: $--input-height;
28
+ width: #{$--input-height - 2};
27
29
  height: auto;
28
30
  text-align: center;
29
- background: $--background-color-base;
30
- color: $--color-text-regular;
31
+ background: $--color-fill-1;
32
+ color: $--color-fill-6;
31
33
  cursor: pointer;
32
34
  font-size: 13px;
35
+ border: 1px solid $--color-line-2;
36
+ box-sizing: border-box;
33
37
 
34
38
  &:hover {
35
- color: $--color-primary;
36
-
37
- &:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled) {
38
- border-color: $--input-focus-border;
39
- }
39
+ color: $--color-primary-5;
40
+ border-color: $--color-primary-5;
41
+ background: $--color-primary-1;
42
+ }
43
+ &:focus {
44
+ color: $--color-primary-7;
45
+ border-color: $--color-primary-5;
46
+ background: $--color-primary-1;
40
47
  }
41
48
 
42
49
  &.is-disabled {
43
- color: $--disabled-color-base;
50
+ color: $--color-fill-4;
44
51
  cursor: not-allowed;
52
+ background: $--color-fill-1;
53
+ &:hover {
54
+ border-color: $--color-line-2;
55
+ background: $--color-fill-1;
56
+ }
45
57
  }
46
58
  }
47
59
 
48
60
  @include e(increase) {
49
61
  right: 1px;
50
- border-radius: 0 $--border-radius-base $--border-radius-base 0;
51
- border-left: $--border-base;
62
+ border-radius: 0 4px 4px 0;
52
63
  }
53
64
 
54
65
  @include e(decrease) {
55
66
  left: 1px;
56
- border-radius: $--border-radius-base 0 0 $--border-radius-base;
57
- border-right: $--border-base;
67
+ border-radius: 4px 0 0 4px;
58
68
  }
59
69
 
60
70
  @include when(disabled) {
61
71
  @include e((increase, decrease)) {
62
- border-color: $--disabled-border-base;
63
- color: $--disabled-border-base;
72
+ border-color: $--color-line-2;
73
+ color: $--color-fill-4;
64
74
 
65
75
  &:hover {
66
- color: $--disabled-border-base;
76
+ color: $--color-fill-4;
67
77
  cursor: not-allowed;
78
+ background: $--color-fill-1;
68
79
  }
69
80
  }
70
81
  }
71
82
 
72
83
  @include m(medium) {
73
- width: 200px;
74
84
  line-height: #{$--input-medium-height - 2};
85
+ padding-left: #{$--input-medium-height - 2};
86
+ padding-right: #{$--input-medium-height - 2};
75
87
 
76
88
  @include e((increase, decrease)) {
77
- width: $--input-medium-height;
89
+ width: #{$--input-medium-height - 2};
78
90
  font-size: $--input-medium-font-size;
79
91
  }
80
-
81
- .el-input__inner {
82
- padding-left: #{$--input-medium-height + 7};
83
- padding-right: #{$--input-medium-height + 7};
84
- }
85
92
  }
86
93
 
87
94
  @include m(small) {
88
- width: 130px;
89
95
  line-height: #{$--input-small-height - 2};
96
+ padding-left: #{$--input-small-height};
97
+ padding-right: #{$--input-small-height};
90
98
 
91
99
  @include e((increase, decrease)) {
92
100
  width: $--input-small-height;
93
101
  font-size: $--input-small-font-size;
94
-
95
- [class*=el-icon] {
96
- transform: scale(.9);
97
- }
98
- }
99
-
100
- .el-input__inner {
101
- padding-left: #{$--input-small-height + 7};
102
- padding-right: #{$--input-small-height + 7};
103
102
  }
104
103
  }
105
104
 
106
105
  @include m(mini) {
107
- width: 130px;
108
106
  line-height: #{$--input-mini-height - 2};
107
+ padding-left: #{$--input-mini-height};
108
+ padding-right: #{$--input-mini-height};
109
109
 
110
110
  @include e((increase, decrease)) {
111
111
  width: $--input-mini-height;
112
112
  font-size: $--input-mini-font-size;
113
-
114
- [class*=el-icon] {
115
- transform: scale(.8);
116
- }
117
- }
118
-
119
- .el-input__inner {
120
- padding-left: #{$--input-mini-height + 7};
121
- padding-right: #{$--input-mini-height + 7};
122
113
  }
123
114
  }
124
115
 
125
116
  @include when(without-controls) {
117
+ padding: 0;
126
118
  .el-input__inner {
127
- padding-left: 15px;
128
- padding-right: 15px;
119
+ border-radius: 4px;
129
120
  }
130
121
  }
131
122
 
132
123
  @include when(controls-right) {
124
+ padding: 0;
133
125
  .el-input__inner {
134
- padding-left: 15px;
135
- padding-right: #{$--input-height + 10};
126
+ border-radius: 4px;
127
+ &:hover,
128
+ &:focus {
129
+ z-index: 0;
130
+ position: relative;
131
+ }
136
132
  }
137
133
 
138
134
  @include e((increase, decrease)) {
@@ -146,7 +142,11 @@
146
142
 
147
143
  @include e(increase) {
148
144
  border-radius: 0 $--border-radius-base 0 0;
149
- border-bottom: $--border-base;
145
+ border: 0 none;
146
+ border-left: 1px solid $--color-line-2;
147
+ border-bottom: 1px solid $--color-line-2;
148
+ right: 1px;
149
+ top: 1px;
150
150
  }
151
151
 
152
152
  @include e(decrease) {
@@ -154,8 +154,8 @@
154
154
  bottom: 1px;
155
155
  top: auto;
156
156
  left: auto;
157
- border-right: none;
158
- border-left: $--border-base;
157
+ border: 0 none;
158
+ border-left: 1px solid $--color-line-2;
159
159
  border-radius: 0 0 $--border-radius-base 0;
160
160
  }
161
161
 
@@ -11,6 +11,7 @@
11
11
  border-radius: 8px;
12
12
  text-align: left;
13
13
  overflow: hidden;
14
+ vertical-align: middle;
14
15
  backface-visibility: hidden;
15
16
 
16
17
  @include e(wrapper) {
@@ -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.73',
216
216
  locale: locale.use,
217
217
  i18n: locale.i18n,
218
218
  install,