Skip to content

Commit 45e19b0

Browse files
committed
chore: add example for passing params
1 parent 7e9f107 commit 45e19b0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/playground/pages/Home.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ const HomePage = () => {
4040
<button onClick={() => setState(11111111)}>设置状态</button>
4141
<br />
4242
<br />
43-
<Navigator name='list'>前往列表页</Navigator>
43+
<Navigator name='list' params={{ test: 'aaa' }}>
44+
前往列表页
45+
</Navigator>
4446
</div>
4547
)
4648
}

src/playground/pages/List.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ const ListPage = () => {
2121
borderBottom: '1px solid #eee'
2222
}}
2323
onClick={() => {
24-
navigateTo({ url: '/detail?a=1&b=2' })
24+
navigateTo({
25+
url: '/detail?a=1&b=2',
26+
params: { c: 3, d: 'false' }
27+
})
2528
}}
2629
>
2730
{index} 点击进入详情页

0 commit comments

Comments
 (0)