Tag add prop fade
This commit is contained in:
parent
ab1235359b
commit
5f4a9bd589
1 changed files with 10 additions and 1 deletions
|
@ -1,11 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="fade">
|
<transition name="fade" v-if="fade">
|
||||||
<div :class="classes" @click.stop="check" :style="wraperStyles">
|
<div :class="classes" @click.stop="check" :style="wraperStyles">
|
||||||
<span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span>
|
<span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span>
|
||||||
<span :class="textClasses" :style="textColorStyle"><slot></slot></span>
|
<span :class="textClasses" :style="textColorStyle"><slot></slot></span>
|
||||||
<Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon>
|
<Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
<div v-else :class="classes" @click.stop="check" :style="wraperStyles">
|
||||||
|
<span :class="dotClasses" v-if="showDot" :style="bgColorStyle"></span>
|
||||||
|
<span :class="textClasses" :style="textColorStyle"><slot></slot></span>
|
||||||
|
<Icon v-if="closable" :class="iconClass" :color="lineColor" type="ios-close-empty" @click.native.stop="close"></Icon>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
|
@ -39,6 +44,10 @@
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: [String, Number]
|
type: [String, Number]
|
||||||
|
},
|
||||||
|
fade: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue