Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit a8d21f5

Browse files
authored
fix(wechat): 修复page-meta、navigation-bar 组件渲染错误 (#1583)
1 parent b44650a commit a8d21f5

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/remax-wechat/src/__tests__/components/__snapshots__/NavigationBar.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`NavigationBar render correctly 1`] = `
4-
<NavigationBar
4+
<navigation-bar
55
colorAnimationDuration={0}
66
colorAnimationTimingFunc="linear"
77
loading={false}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`PageMeta render correctly 1`] = `
4-
<page-container
4+
<page-meta
55
scrollDuration={300}
66
/>
77
`;

packages/remax-wechat/src/hostComponents/NavigationBar/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface NavigationBarProps extends BaseProps {
2121
* @see https://developers.weixin.qq.com/miniprogram/dev/component/navigation-bar.html
2222
*/
2323
export const NavigationBar: React.ComponentType<NavigationBarProps> = createHostComponent<NavigationBarProps>(
24-
'NavigationBar'
24+
'navigation-bar'
2525
);
2626

2727
NavigationBar.defaultProps = {

packages/remax-wechat/src/hostComponents/PageMeta/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export interface PageMetaProps extends BaseProps {
3434
}
3535
/**
3636
* 页面属性配置节点,用于指定页面的一些属性、监听页面事件。只能是页面内的第一个节点。可以配合 navigation-bar 组件一同使用。
37-
* @see https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html
37+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/page-meta.html
3838
*/
39-
export const PageMeta: React.ComponentType<PageMetaProps> = createHostComponent<PageMetaProps>('page-container');
39+
export const PageMeta: React.ComponentType<PageMetaProps> = createHostComponent<PageMetaProps>('page-meta');
4040

4141
PageMeta.defaultProps = {
4242
scrollDuration: 300,

packages/remax-wechat/src/hostComponents/VoipRoom/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export interface VoipRoomProps extends BaseProps {
1313
onError?: (event: GenericEvent) => any;
1414
}
1515

16+
/**
17+
* 多人音视频对话。需用户授权 scope.camera、scope.record。
18+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/voip-room.html
19+
*/
1620
export const VoipRoom: React.ComponentType<VoipRoomProps> = createHostComponent<VoipRoomProps>('voip-room');
1721
VoipRoom.defaultProps = {
1822
mode: 'camera',

0 commit comments

Comments
 (0)