Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-08 17:02:26 +08:00
12 changed files with 137 additions and 54 deletions
+18 -12
View File
@@ -21,6 +21,7 @@ export default createComponent({
rightText: String,
leftArrow: Boolean,
placeholder: Boolean,
safeAreaInsetTop: Boolean,
border: {
type: Boolean,
default: true,
@@ -75,21 +76,26 @@ export default createComponent({
<div
ref={navBarRef}
style={style}
class={[bem({ fixed }), { [BORDER_BOTTOM]: border }]}
class={[
bem({ fixed, 'safe-area-inset-top': props.safeAreaInsetTop }),
{ [BORDER_BOTTOM]: border },
]}
>
{hasLeft && (
<div class={bem('left')} onClick={onClickLeft}>
{renderLeft()}
<div class={bem('content')}>
{hasLeft && (
<div class={bem('left')} onClick={onClickLeft}>
{renderLeft()}
</div>
)}
<div class={[bem('title'), 'van-ellipsis']}>
{slots.title ? slots.title() : title}
</div>
)}
<div class={[bem('title'), 'van-ellipsis']}>
{slots.title ? slots.title() : title}
{hasRight && (
<div class={bem('right')} onClick={onClickRight}>
{renderRight()}
</div>
)}
</div>
{hasRight && (
<div class={bem('right')} onClick={onClickRight}>
{renderRight()}
</div>
)}
</div>
);
};