mirror of
https://gitee.com/dcloud/uni-preset-vue
synced 2026-05-29 00:00:06 +08:00
feat(vue3): App.vue
This commit is contained in:
Executable → Regular
+17
-16
@@ -1,17 +1,18 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
<script>
|
||||
import {
|
||||
onLaunch,
|
||||
onShow,
|
||||
onHide
|
||||
} from 'vue'
|
||||
export default {
|
||||
setup() {
|
||||
onLaunch(() => console.log('App Launch'))
|
||||
onShow(() => console.log('App Show'))
|
||||
onHide(() => console.log('App Hide'))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user