iov-design 2.15.52 → 2.15.53
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/index.js +1 -1
- package/lib/iov-design.common.js +75 -25
- package/lib/select.js +69 -23
- package/lib/tag.js +5 -1
- package/lib/theme-chalk/cascader.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/select/src/select.vue +34 -10
- package/packages/tag/src/tag.vue +5 -1
- 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
|
@@ -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
|
{
|
|
@@ -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
|
}
|