Skip to content

Commit

Permalink
feat: 修改 navbar 组件readme
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Feb 24, 2023
1 parent 8f43ade commit 160b887
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 74 deletions.
37 changes: 0 additions & 37 deletions packages/quark/src/navbar/doc-react.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,43 +90,6 @@ export default () => {
};
```

### 注意:哈啰 App 内使用

App 中默认有导航栏(返回+title 那栏),如果要使用本组件,需要使用客户端能力**隐藏原生导航栏**

HTML 中设置:

```html
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
```

```tsx
useEffect(() => {
// 安卓端生效
// 设置最顶部状态栏显示和隐藏
Native.callNative({
classMap: "NavBar",
method: "setStatusBarColor",
params: {
isShowStatusBar: true, // 状态栏显示
isDarkFont: false, // 状态栏字体黑 or 白
colorCode: "#666", // 状态栏显示时,背景颜色代码
},
});
// 设置导航栏是否显示
Native.callNative({
method: "showNaviBar",
params: {
isShow: false,
},
classMap: "NavBar",
});
}, []);
```

### Props

| 参数 | 说明 | 类型 | 默认值 |
Expand Down
37 changes: 0 additions & 37 deletions packages/quark/src/navbar/doc.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,43 +80,6 @@ import "quarkd/lib/navbar";
</quark-navbar>
```

### 注意:哈啰 App 内使用

App 中默认有导航栏(返回+title 那栏),如果要使用本组件,需要使用客户端能力**隐藏原生导航栏**。以 `vue` 项目举例:

HTML 中设置:

```html
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
```

```tsx
mounted(){
// 安卓端生效
// 设置最顶部状态栏显示和隐藏
Native.callNative({
classMap: 'NavBar',
method: 'setStatusBarColor',
params: {
isShowStatusBar: true, // 状态栏显示
isDarkFont: false, // 状态栏字体黑 or 白
colorCode: '#666', // 状态栏显示时,背景颜色代码
},
});
// 设置导航栏是否显示
Native.callNative({
method: 'showNaviBar',
params: {
isShow: false,
},
classMap: 'NavBar',
});
}
```

## API

### Props
Expand Down

0 comments on commit 160b887

Please sign in to comment.