feat(Popup): add close-icon prop (#4366)

This commit is contained in:
neverland
2019-09-04 22:33:40 +08:00
committed by GitHub
parent f43be4dd86
commit 7b66aef056
8 changed files with 65 additions and 6 deletions
+5 -1
View File
@@ -12,6 +12,10 @@ export default createComponent({
duration: Number,
closeable: Boolean,
transition: String,
closeIcon: {
type: String,
default: 'cross'
},
position: {
type: String,
default: 'center'
@@ -64,7 +68,7 @@ export default createComponent({
>
{this.slots()}
{this.closeable && (
<Icon name="cross" class={bem('close-icon')} onClick={this.close} />
<Icon name={this.closeIcon} class={bem('close-icon')} onClick={this.close} />
)}
</div>
</transition>