update:24-07-09 17:22:32 -remark:添加新标签页传参相关笔记 -AutoCommit

This commit is contained in:
539943419 committed 2024-07-09 17:22:33 +08:00
1 parent 589e356f61
commit 2f2433af8a
2 files changed
+22 -6

No files matched your search

+21 -6
View File
@@ -48,6 +48,27 @@
{ leading: true, trailing: false } { leading: true, trailing: false }
) )
``` ```
然后就可以在项目中以如下方式进行调用:
```ts
const { goToSingReplay } = useAddTabsPage()
// 传参
goToSingReplay(data)
```
此处传递的参数可以通过以下过程在新页面进行接收
```ts
const initData = () => {
onHostMessage('onload', async (data: any) => {
// data即为传递过来的参数
...
})
}
// 必须在此生命周期进行
onMounted(async () => {
initData()
})
```
--- ---
* apiFetch用法 * apiFetch用法
@@ -95,12 +116,6 @@
// result结果会自动json解析,如{message:'success'...} // result结果会自动json解析,如{message:'success'...}
``` ```
然后就可以在项目中以如下方式进行调用:
```ts
const { goToSingReplay } = useAddTabsPage()
// 传参
goToSingReplay(data)
```
--- ---
* apiFetch之结果预处理: * apiFetch之结果预处理:
+1
View File
@@ -14,6 +14,7 @@
* 把删除功能做完 (等后端) * 把删除功能做完 (等后端)
## 学习目标 ## 学习目标
* 学习teach-webview的写法 (70%) * 学习teach-webview的写法 (70%)
* 继续学习呼出页面相关内容 (学了如何在新页面传入数据)
# 2024.7.8 # 2024.7.8