提交 70f77072 编写于 作者: View Design's avatar View Design

Alert add prop: fade

上级 02330ede
<template>
<div>
<Alert>
<Button @click="show = !show">toggle show</Button>
<Alert v-if="show" :fade="false">
An info prompt
<template slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </template>
</Alert>
......@@ -56,7 +57,7 @@
A success prompt
<span slot="desc">Content of prompt. Content of prompt. Content of prompt. Content of prompt. </span>
</Alert>
<Alert type="warning" closable>
<Alert type="warning" closable :fade="false">
Custom closing content
<span slot="close">No longer prompt</span>
</Alert>
......@@ -65,6 +66,11 @@
<script>
import { Alert, Icon } from 'iview';
export default {
components: { Alert, Icon }
components: { Alert, Icon },
data () {
return {
show: true
}
}
}
</script>
<template>
<transition name="fade">
<transition :name="fade ? 'fade' : ''">
<div v-if="!closed" :class="wrapClasses">
<span :class="iconClasses" v-if="showIcon">
<slot name="icon">
......@@ -43,6 +43,10 @@
banner: {
type: Boolean,
default: false
},
fade: {
type: Boolean,
default: true
}
},
data () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册