udpate notice
This commit is contained in:
parent
baa75b0aef
commit
3f7a5f1a27
7 changed files with 22 additions and 7 deletions
|
@ -54,6 +54,7 @@
|
|||
render: {
|
||||
type: Function
|
||||
},
|
||||
hasTitle: Boolean,
|
||||
styles: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
|
@ -111,7 +112,7 @@
|
|||
contentWithIcon () {
|
||||
return [
|
||||
this.withIcon ? `${this.prefixCls}-content-with-icon` : '',
|
||||
this.render && !this.title && this.withIcon ? `${this.prefixCls}-content-with-render-notitle` : ''
|
||||
!this.hasTitle && this.withIcon ? `${this.prefixCls}-content-with-render-notitle` : ''
|
||||
];
|
||||
},
|
||||
messageClasses () {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
:content="notice.content"
|
||||
:duration="notice.duration"
|
||||
:render="notice.render"
|
||||
:has-title="notice.hasTitle"
|
||||
:withIcon="notice.withIcon"
|
||||
:closable="notice.closable"
|
||||
:name="notice.name"
|
||||
|
|
|
@ -76,6 +76,7 @@ function notice (type, options) {
|
|||
content: content,
|
||||
withIcon: withIcon,
|
||||
render: render,
|
||||
hasTitle: !!title,
|
||||
onClose: onClose,
|
||||
closable: true,
|
||||
type: 'notice'
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
return [
|
||||
`${prefixCls}`,
|
||||
{
|
||||
[`${prefixCls}-${this.color}`]: !!this.color,
|
||||
[`${prefixCls}-${this.color}`]: !!this.color && oneOf(this.color, initColorList),
|
||||
[`${prefixCls}-${this.type}`]: !!this.type,
|
||||
[`${prefixCls}-closable`]: this.closable,
|
||||
[`${prefixCls}-checked`]: this.isChecked
|
||||
|
@ -75,7 +75,7 @@
|
|||
if (this.type === 'dot') {
|
||||
return '';
|
||||
} else if (this.type === 'border') {
|
||||
return `${prefixCls}-color-${this.color}`;
|
||||
return oneOf(this.color, initColorList) ? `${prefixCls}-color-${this.color}` : '';
|
||||
} else {
|
||||
return this.color !== undefined ? (this.color === 'default' ? '' : 'rgb(255, 255, 255)') : '';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue