Skip to content

Commit f736578

Browse files
author
Damian Dulisz
authored
Merge pull request shentao#118 from graph1994/master
Issue shentao#117:fixed warn by moving v-if above the v-for
2 parents c276b2b + a2afb99 commit f736578

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/Multiselect.vue

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@
1212
class="multiselect">
1313
<div @mousedown.prevent="toggle()" class="multiselect__select"></div>
1414
<div v-el:tags class="multiselect__tags">
15-
<span
16-
v-if="multiple"
17-
v-for="option in visibleValue"
18-
track-by="$index"
19-
onmousedown="event.preventDefault()"
20-
class="multiselect__tag">
21-
<span v-text="getOptionLabel(option)"></span>
22-
<i
23-
aria-hidden="true"
24-
tabindex="1"
25-
@keydown.enter.prevent="removeElement(option)"
26-
@mousedown.prevent="removeElement(option)"
27-
class="multiselect__tag-icon">
28-
</i>
15+
<span v-if="multiple">
16+
<span
17+
v-for="option in visibleValue"
18+
track-by="$index"
19+
onmousedown="event.preventDefault()"
20+
class="multiselect__tag">
21+
<span v-text="getOptionLabel(option)"></span>
22+
<i
23+
aria-hidden="true"
24+
tabindex="1"
25+
@keydown.enter.prevent="removeElement(option)"
26+
@mousedown.prevent="removeElement(option)"
27+
class="multiselect__tag-icon">
28+
</i>
29+
</span>
2930
</span>
3031
<template v-if="value && value.length > limit">
3132
<strong v-text="limitText(value.length - limit)"></strong>

0 commit comments

Comments
 (0)