Commit 5f4a9bd589f86e990a7b933014c4e6f578763fc1
1 parent
ab123535
Tag add prop fade
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
src/components/tag/tag.vue
1 | <template> | 1 | <template> |
2 | - <transition name="fade"> | 2 | + <transition name="fade" v-if="fade"> |
3 | <div :class="classes" @click.stop="check" :style="wraperStyles"> | 3 | <div :class="classes" @click.stop="check" :style="wraperStyles"> |
4 | <span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span> | 4 | <span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span> |
5 | <span :class="textClasses" :style="textColorStyle"><slot></slot></span> | 5 | <span :class="textClasses" :style="textColorStyle"><slot></slot></span> |
6 | <Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon> | 6 | <Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon> |
7 | </div> | 7 | </div> |
8 | </transition> | 8 | </transition> |
9 | + <div v-else :class="classes" @click.stop="check" :style="wraperStyles"> | ||
10 | + <span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span> | ||
11 | + <span :class="textClasses" :style="textColorStyle"><slot></slot></span> | ||
12 | + <Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon> | ||
13 | + </div> | ||
9 | </template> | 14 | </template> |
10 | <script> | 15 | <script> |
11 | import Icon from '../icon'; | 16 | import Icon from '../icon'; |
@@ -39,6 +44,10 @@ | @@ -39,6 +44,10 @@ | ||
39 | }, | 44 | }, |
40 | name: { | 45 | name: { |
41 | type: [String, Number] | 46 | type: [String, Number] |
47 | + }, | ||
48 | + fade: { | ||
49 | + type: Boolean, | ||
50 | + default: true | ||
42 | } | 51 | } |
43 | }, | 52 | }, |
44 | data () { | 53 | data () { |