feat: update empty

pull/2357/head^2
tangjinzhou 2020-06-05 09:07:53 +08:00
parent 5a627b3d8b
commit 5568be2fcb
2 changed files with 3 additions and 15 deletions

View File

@ -51,13 +51,13 @@ const Empty = {
{imageNode}
</div>
{des && <p class={`${prefixCls}-description`}>{des}</p>}
{this.$slots.default && <div class={`${prefixCls}-footer`}>{this.$slots.default}</div>}
{this.$slots.default && <div class={`${prefixCls}-footer`}>{this.$slots.default()}</div>}
</div>
);
},
},
render() {
return <LocaleReceiver componentName="Empty" scopedSlots={{ default: this.renderEmpty }} />;
return <LocaleReceiver componentName="Empty" children={this.renderEmpty} />;
},
};

View File

@ -1,15 +1,3 @@
<template>
<div>
<a-alert message="Warning text" banner />
<br />
<a-alert
message="Very long warning text warning text text text text text text text"
banner
closable
/>
<br />
<a-alert :show-icon="false" message="Warning text without icon" banner />
<br />
<a-alert type="error" message="Error text" banner />
</div>
<a-empty />
</template>