iov-design 2.15.52 → 2.15.54
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/divider.js +25 -1
- package/lib/index.js +1 -1
- package/lib/iov-design.common.js +100 -26
- package/lib/select.js +69 -23
- package/lib/tag.js +5 -1
- package/lib/theme-chalk/cascader.css +1 -1
- package/lib/theme-chalk/divider.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/pagination.css +1 -1
- package/lib/theme-chalk/select.css +1 -1
- package/lib/theme-chalk/table-column.css +1 -1
- package/lib/theme-chalk/table.css +1 -1
- package/lib/theme-chalk/tag.css +1 -1
- package/package.json +1 -1
- package/packages/divider/src/main.vue +14 -0
- package/packages/select/src/select.vue +34 -10
- package/packages/tag/src/tag.vue +5 -1
- package/packages/theme-chalk/src/divider.scss +13 -12
- package/packages/theme-chalk/src/select.scss +19 -0
- package/packages/theme-chalk/src/tag.scss +2 -0
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-bind="data.attrs"
|
|
4
4
|
v-on="listeners"
|
|
5
|
+
:style="{
|
|
6
|
+
borderBottomStyle: props.direction === 'horizontal' && props.type || '',
|
|
7
|
+
borderBottomColor: props.direction === 'horizontal' && props.color || '',
|
|
8
|
+
borderRightStyle: props.direction === 'vertical' && props.type || '',
|
|
9
|
+
borderRightColor: props.direction === 'vertical' && props.color || ''
|
|
10
|
+
}"
|
|
5
11
|
:class="[data.staticClass, 'el-divider', `el-divider--${props.direction}`]"
|
|
6
12
|
>
|
|
7
13
|
<div
|
|
@@ -30,6 +36,14 @@ export default {
|
|
|
30
36
|
validator(val) {
|
|
31
37
|
return ['left', 'center', 'right'].indexOf(val) !== -1;
|
|
32
38
|
}
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '' // $--color-line-1
|
|
43
|
+
},
|
|
44
|
+
type: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ''
|
|
33
47
|
}
|
|
34
48
|
}
|
|
35
49
|
};
|
|
@@ -10,22 +10,29 @@
|
|
|
10
10
|
ref="tags"
|
|
11
11
|
:style="{ 'max-width': inputWidth - 32 + 'px', width: (inputWidth - tagsLeft - 32) + 'px', left: tagsLeft + 'px' }">
|
|
12
12
|
<span class="el-tag__group" v-if="collapseTags && selected.length">
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
<template v-for="(item, index) in selected">
|
|
14
|
+
<el-tag
|
|
15
|
+
:key="getValueKey(item)"
|
|
16
|
+
v-if="index <= multipleLimitShow - 1"
|
|
17
|
+
:closable="!selectDisabled"
|
|
18
|
+
:size="collapseTagSize"
|
|
19
|
+
:hit="item.hitState"
|
|
20
|
+
:maxWidth="multipleTagMaxWidth"
|
|
21
|
+
type="info"
|
|
22
|
+
@close="deleteTag($event, item)"
|
|
23
|
+
disable-transitions>
|
|
24
|
+
<span class="el-select__tags-text">{{ item.currentLabel }}</span>
|
|
25
|
+
</el-tag>
|
|
26
|
+
</template>
|
|
22
27
|
<el-tag
|
|
23
28
|
v-if="selected.length > 1"
|
|
24
29
|
:closable="false"
|
|
25
30
|
:size="collapseTagSize"
|
|
26
31
|
type="info"
|
|
32
|
+
class="el-select__tags-count"
|
|
33
|
+
:class="{'el-select__tags-count-fixed': collapseTagsFixed}"
|
|
27
34
|
disable-transitions>
|
|
28
|
-
<span class="el-select__tags-text"
|
|
35
|
+
<span class="el-select__tags-text">{{collapseTagsFixed ? '' : '+'}}{{ selected.length - 1 }}{{ collapseTagsSuffix }}</span>
|
|
29
36
|
</el-tag>
|
|
30
37
|
</span>
|
|
31
38
|
<transition-group class="el-tag__group" @after-leave="resetInputHeight" v-if="!collapseTags">
|
|
@@ -35,6 +42,7 @@
|
|
|
35
42
|
:closable="!item.disabled && !selectDisabled"
|
|
36
43
|
:size="collapseTagSize"
|
|
37
44
|
:hit="item.hitState"
|
|
45
|
+
:maxWidth="multipleTagMaxWidth"
|
|
38
46
|
type="info"
|
|
39
47
|
@close="deleteTag($event, item)"
|
|
40
48
|
disable-transitions>
|
|
@@ -297,6 +305,22 @@
|
|
|
297
305
|
type: Number,
|
|
298
306
|
default: 0
|
|
299
307
|
},
|
|
308
|
+
multipleLimitShow: {
|
|
309
|
+
type: Number,
|
|
310
|
+
default: 1
|
|
311
|
+
},
|
|
312
|
+
multipleTagMaxWidth: {
|
|
313
|
+
type: String,
|
|
314
|
+
default: 'none'
|
|
315
|
+
},
|
|
316
|
+
collapseTagsSuffix: {
|
|
317
|
+
type: String,
|
|
318
|
+
default: ''
|
|
319
|
+
},
|
|
320
|
+
collapseTagsFixed: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: false
|
|
323
|
+
},
|
|
300
324
|
placeholder: {
|
|
301
325
|
type: String,
|
|
302
326
|
required: false
|
package/packages/tag/src/tag.vue
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
color: String,
|
|
11
11
|
size: String,
|
|
12
12
|
icon: String,
|
|
13
|
+
maxWidth: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'none'
|
|
16
|
+
},
|
|
13
17
|
effect: {
|
|
14
18
|
type: String,
|
|
15
19
|
default: 'light',
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
class={ classes }
|
|
48
52
|
style={{ backgroundColor: this.color }}
|
|
49
53
|
on-click={ this.handleClick }>
|
|
50
|
-
<span class="el-tag__inner">
|
|
54
|
+
<span class="el-tag__inner" style={{ maxWidth: this.maxWidth }}>
|
|
51
55
|
{ this.icon && <i class={`${this.icon} el-tag-icon`}></i> }
|
|
52
56
|
<span class="el-tag__text">{ this.$slots.default }</span>
|
|
53
57
|
{
|
|
@@ -2,35 +2,36 @@
|
|
|
2
2
|
@import "mixins/mixins";
|
|
3
3
|
|
|
4
4
|
@include b(divider) {
|
|
5
|
-
background-color: $--border-color-base;
|
|
6
5
|
position: relative;
|
|
6
|
+
border-bottom: 1px dashed $--color-line-1;
|
|
7
7
|
|
|
8
8
|
@include m(horizontal) {
|
|
9
9
|
display: block;
|
|
10
|
-
height:
|
|
10
|
+
height: 0;
|
|
11
|
+
font-size: 0;
|
|
11
12
|
width: 100%;
|
|
12
|
-
margin: 24px 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
@include m(vertical) {
|
|
16
16
|
display: inline-block;
|
|
17
|
-
width:
|
|
17
|
+
width: 0;
|
|
18
18
|
height: 1em;
|
|
19
19
|
margin: 0 8px;
|
|
20
20
|
vertical-align: middle;
|
|
21
|
+
border-right: 1px dashed $--color-line-1;
|
|
22
|
+
border-bottom: 0 none;
|
|
21
23
|
position: relative;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
@include e(text) {
|
|
25
27
|
position: absolute;
|
|
26
|
-
background-color:
|
|
27
|
-
padding: 0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
font-size: 14px;
|
|
28
|
+
background-color: #fff;
|
|
29
|
+
padding: 0 8px;
|
|
30
|
+
color: $--color-text-6;
|
|
31
|
+
font-size: 13px;
|
|
31
32
|
|
|
32
33
|
@include when(left) {
|
|
33
|
-
left:
|
|
34
|
+
left: 16px;
|
|
34
35
|
transform: translateY(-50%);
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -40,8 +41,8 @@
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
@include when(right) {
|
|
43
|
-
right:
|
|
44
|
+
right: 16px;
|
|
44
45
|
transform: translateY(-50%);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
}
|
|
48
|
+
}
|
|
@@ -141,6 +141,13 @@
|
|
|
141
141
|
align-items: center;
|
|
142
142
|
flex-wrap: wrap;
|
|
143
143
|
pointer-events: none;
|
|
144
|
+
.el-select__tags-count-fixed {
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
text-align: center;
|
|
147
|
+
position: absolute;
|
|
148
|
+
right: 0;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
}
|
|
144
151
|
}
|
|
145
152
|
|
|
146
153
|
@include e(tags-text) {
|
|
@@ -167,6 +174,9 @@
|
|
|
167
174
|
pointer-events: auto;
|
|
168
175
|
height: $--input-height - 8px;
|
|
169
176
|
line-height: $--input-height - 8px;
|
|
177
|
+
&.el-select__tags-count-fixed {
|
|
178
|
+
min-width: $--input-height - 8px;
|
|
179
|
+
}
|
|
170
180
|
&.el-tag--info {
|
|
171
181
|
background: $--color-fill-2;
|
|
172
182
|
color: $--color-text-6;
|
|
@@ -178,18 +188,27 @@
|
|
|
178
188
|
.el-tag--medium {
|
|
179
189
|
height: $--input-medium-height - 8px;
|
|
180
190
|
line-height: $--input-medium-height - 8px;
|
|
191
|
+
&.el-select__tags-count-fixed {
|
|
192
|
+
min-width: $--input-medium-height - 8px;
|
|
193
|
+
}
|
|
181
194
|
}
|
|
182
195
|
}
|
|
183
196
|
@include m(small) {
|
|
184
197
|
.el-tag--small {
|
|
185
198
|
height: $--input-small-height - 8px;
|
|
186
199
|
line-height: $--input-small-height - 8px;
|
|
200
|
+
&.el-select__tags-count-fixed {
|
|
201
|
+
min-width: $--input-small-height - 8px;
|
|
202
|
+
}
|
|
187
203
|
}
|
|
188
204
|
}
|
|
189
205
|
@include m(mini) {
|
|
190
206
|
.el-tag--mini {
|
|
191
207
|
height: $--input-mini-height - 8px;
|
|
192
208
|
line-height: $--input-mini-height - 8px;
|
|
209
|
+
&.el-select__tags-count-fixed {
|
|
210
|
+
min-width: $--input-mini-height - 8px;
|
|
211
|
+
}
|
|
193
212
|
}
|
|
194
213
|
}
|
|
195
214
|
}
|