refactor(nav-bar): move customStyle to root view (#3371)

fix #3369
This commit is contained in:
rex 2020-07-13 19:30:43 +08:00 committed by GitHub
parent 57cf883296
commit 92a0934bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ Page({
| placeholder | 固定在顶部时是否开启占位 | _boolean_ | `false` | - |
| border | 是否显示下边框 | _boolean_ | `true` | - |
| z-index | 元素 z-index | _number_ | `1` | - |
| custom-style | 自定义样式 | _string_ | - | - |
| custom-style | 根节点自定义样式 | _string_ | - | - |
| safe-area-inset-top | 是否留出顶部安全距离(状态栏高度) | _boolean_ | `true` | - |
### Slot

View File

@ -4,9 +4,9 @@
<view
class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'van-hairline--bottom' : '' }}"
style="{{ baseStyle }}"
style="{{ baseStyle }}; {{ customStyle }}"
>
<view class="van-nav-bar__content" style="{{ customStyle }}">
<view class="van-nav-bar__content">
<view class="van-nav-bar__left" bind:tap="onClickLeft">
<block wx:if="{{ leftArrow || leftText }}">
<van-icon