Alert add banner prop

Alert add banner prop
This commit is contained in:
梁灏 2017-01-16 15:01:35 +08:00
parent 7a737482f0
commit e49f796318
3 changed files with 13 additions and 4 deletions

View file

@ -36,7 +36,11 @@
showIcon: { showIcon: {
type: Boolean, type: Boolean,
default: false default: false
} },
banner: {
type: Boolean,
default: false
},
}, },
data () { data () {
return { return {
@ -51,7 +55,8 @@
`${prefixCls}-${this.type}`, `${prefixCls}-${this.type}`,
{ {
[`${prefixCls}-with-icon`]: this.showIcon, [`${prefixCls}-with-icon`]: this.showIcon,
[`${prefixCls}-with-desc`]: this.desc [`${prefixCls}-with-desc`]: this.desc,
[`${prefixCls}-with-banner`]: this.banner
} }
]; ];
}, },

View file

@ -94,4 +94,8 @@
margin-top: -21px; margin-top: -21px;
font-size: 28px; font-size: 28px;
} }
&-with-banner{
border-radius: 0;
}
} }

View file

@ -1,7 +1,7 @@
<template> <template>
<Alert show-icon>消息提示文案</Alert> <Alert show-icon banner closable>消息提示文案</Alert>
<Alert type="success" show-icon>成功提示文案</Alert> <Alert type="success" show-icon>成功提示文案</Alert>
<Alert type="warning" show-icon>警告提示文案</Alert> <Alert type="warning" show-icon banner>警告提示文案</Alert>
<Alert type="error" show-icon>错误提示文案</Alert> <Alert type="error" show-icon>错误提示文案</Alert>
<Alert show-icon> <Alert show-icon>
消息提示文案 消息提示文案