Commit e49f796318ce451efa0c47b51d1236ff90efb26c

Authored by 梁灏
1 parent 7a737482

Alert add banner prop

Alert add banner prop
src/components/alert/alert.vue
@@ -36,7 +36,11 @@ @@ -36,7 +36,11 @@
36 showIcon: { 36 showIcon: {
37 type: Boolean, 37 type: Boolean,
38 default: false 38 default: false
39 - } 39 + },
  40 + banner: {
  41 + type: Boolean,
  42 + default: false
  43 + },
40 }, 44 },
41 data () { 45 data () {
42 return { 46 return {
@@ -51,7 +55,8 @@ @@ -51,7 +55,8 @@
51 `${prefixCls}-${this.type}`, 55 `${prefixCls}-${this.type}`,
52 { 56 {
53 [`${prefixCls}-with-icon`]: this.showIcon, 57 [`${prefixCls}-with-icon`]: this.showIcon,
54 - [`${prefixCls}-with-desc`]: this.desc 58 + [`${prefixCls}-with-desc`]: this.desc,
  59 + [`${prefixCls}-with-banner`]: this.banner
55 } 60 }
56 ]; 61 ];
57 }, 62 },
src/styles/components/alert.less
@@ -94,4 +94,8 @@ @@ -94,4 +94,8 @@
94 margin-top: -21px; 94 margin-top: -21px;
95 font-size: 28px; 95 font-size: 28px;
96 } 96 }
  97 +
  98 + &-with-banner{
  99 + border-radius: 0;
  100 + }
97 } 101 }
98 \ No newline at end of file 102 \ No newline at end of file
test/routers/alert.vue
1 <template> 1 <template>
2 - <Alert show-icon>消息提示文案</Alert> 2 + <Alert show-icon banner closable>消息提示文案</Alert>
3 <Alert type="success" show-icon>成功提示文案</Alert> 3 <Alert type="success" show-icon>成功提示文案</Alert>
4 - <Alert type="warning" show-icon>警告提示文案</Alert> 4 + <Alert type="warning" show-icon banner>警告提示文案</Alert>
5 <Alert type="error" show-icon>错误提示文案</Alert> 5 <Alert type="error" show-icon>错误提示文案</Alert>
6 <Alert show-icon> 6 <Alert show-icon>
7 消息提示文案 7 消息提示文案