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.
- package/lib/dropdown-menu.js +4 -4
- package/lib/index.js +1 -1
- package/lib/input-number.js +5 -3
- package/lib/iov-design.common.js +41 -26
- 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/input-number.css +1 -1
- package/lib/theme-chalk/message-box.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/slider.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/input-number/src/input-number.vue +4 -2
- package/packages/link/src/main.vue +1 -1
- package/packages/theme-chalk/src/alert.scss +1 -1
- package/packages/theme-chalk/src/input-number.scss +57 -57
- package/packages/theme-chalk/src/message-box.scss +1 -0
- package/packages/theme-chalk/src/popper.scss +4 -4
- package/packages/tooltip/src/main.js +13 -0
- package/src/index.js +1 -1
|
@@ -4,135 +4,131 @@
|
|
|
4
4
|
|
|
5
5
|
@include b(input-number) {
|
|
6
6
|
position: relative;
|
|
7
|
-
display:
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
26
|
-
width: $--input-height;
|
|
28
|
+
width: #{$--input-height - 2};
|
|
27
29
|
height: auto;
|
|
28
30
|
text-align: center;
|
|
29
|
-
background: $--
|
|
30
|
-
color: $--color-
|
|
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
|
-
|
|
38
|
-
|
|
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: $--
|
|
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
|
|
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:
|
|
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: $--
|
|
63
|
-
color: $--
|
|
72
|
+
border-color: $--color-line-2;
|
|
73
|
+
color: $--color-fill-4;
|
|
64
74
|
|
|
65
75
|
&:hover {
|
|
66
|
-
color: $--
|
|
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
|
-
|
|
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
|
-
|
|
135
|
-
|
|
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
|
|
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
|
|
158
|
-
border-left: $--
|
|
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
|
|
|
@@ -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
|