uniapp使用vue3 setup
# 引入 uniapp 页面声明周期
<script setup>
import { onShow, onReachBootom } from "@dcloudio/uni-app";
onShow(() => {
// 业务逻辑
});
onReachBottom(() => {
// 业务逻辑
});
</script>
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
@dcloudio/uni-app
支持导入的方法
[
"getSsrGlobalData",
"onAddToFavorites",
"onBackPress",
"onError",
"onHide",
"onLaunch",
"onLoad",
"onNavigationBarButtonTap",
"onNavigationBarSearchInputChanged",
"onNavigationBarSearchInputClicked",
"onNavigationBarSearchInputConfirmed",
"onNavigationBarSearchInputFocusChanged",
"onPageNotFound",
"onPageScroll",
"onPullDownRefresh",
"onReachBottom",
"onReady",
"onResize",
"onShareAppMessage",
"onShareTimeline",
"onShow",
"onTabItemTap",
"onThemeChange",
"onUnhandledRejection",
"onUnload",
"resolveEasycom",
"shallowSsrRef",
"ssrRef"
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
上次更新: 2023/09/22, 16:54:32