mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-09-12 16:40:40 +08:00
refactor: 架构升级
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'Index',
|
||||
})
|
||||
definePage({
|
||||
// 使用 type: "home" 属性设置首页,其他页面不需要设置,默认为page
|
||||
type: 'home',
|
||||
style: {
|
||||
// 'custom' 表示开启自定义导航栏,默认 'default'
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '初始页面',
|
||||
},
|
||||
})
|
||||
|
||||
console.log('index/index 首页打印了')
|
||||
|
||||
function toHome() {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home',
|
||||
})
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
console.log('测试 uni API 自动引入: onLoad')
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="box-border bg-white px-4 pt-safe w-screen h-screen flex flex-col items-center justify-center">
|
||||
uni-halo
|
||||
<wd-button @click="toHome()">去首页</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
Reference in New Issue
Block a user