feat(Popover): add arrow

This commit is contained in:
chenjiahan
2020-11-20 14:26:41 +08:00
committed by neverland
parent 49a8d87845
commit f58fa0f746
3 changed files with 138 additions and 3 deletions
+3 -2
View File
@@ -26,7 +26,7 @@ export default createComponent({
closeOnClickAction: Boolean,
offset: {
type: Array,
default: [0, 0],
default: () => [0, 8],
},
theme: {
type: String,
@@ -113,7 +113,7 @@ export default createComponent({
ref="popover"
value={this.value}
style={this.location}
class={bem([this.theme])}
class={bem([this.theme, `placement-${this.placement}`])}
overlay={this.overlay}
position=""
transition="van-popover-zoom"
@@ -121,6 +121,7 @@ export default createComponent({
getContainer={this.getContainer}
onInput={this.onToggle}
>
<div class={bem('arrow')} />
{this.actions.map(this.renderAction)}
</Popup>
{this.slots('default')}