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 | 1 | <template> |
| 2 | - <transition name="fade"> | |
| 2 | + <transition name="fade" v-if="fade"> | |
| 3 | 3 | <div :class="classes" @click.stop="check" :style="wraperStyles"> |
| 4 | 4 | <span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span> |
| 5 | 5 | <span :class="textClasses" :style="textColorStyle"><slot></slot></span> |
| 6 | 6 | <Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon> |
| 7 | 7 | </div> |
| 8 | 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 | 14 | </template> |
| 10 | 15 | <script> |
| 11 | 16 | import Icon from '../icon'; |
| ... | ... | @@ -39,6 +44,10 @@ |
| 39 | 44 | }, |
| 40 | 45 | name: { |
| 41 | 46 | type: [String, Number] |
| 47 | + }, | |
| 48 | + fade: { | |
| 49 | + type: Boolean, | |
| 50 | + default: true | |
| 42 | 51 | } |
| 43 | 52 | }, |
| 44 | 53 | data () { | ... | ... |