基于项目规范快速生成 uni-app 页面
快速创建符合 wot-starter 项目规范的 uni-app 页面。
src/pages/)src/subPages/, src/subEcharts/ 等)<script setup lang="ts">
definePage({
name: '页面名称', // 路由 name,用于编程式导航
layout: 'default', // 布局:'default' | 'tabbar'
style: {
navigationBarTitleText: '页面标题',
},
})
const router = useRouter()
</script>
<template>
<view class="p-3">
<!-- 页面内容 -->
</view>
</template>
<script setup lang="ts">
definePage({
name: 'home',
layout: 'tabbar', // 使用 tabbar 布局
style: {
navigationBarTitleText: '首页',
},
})
</script>
<template>
<view class="box-border py-3">
<!-- TabBar 页面内容 -->
</view>
</template>
src/
├── pages/ # 主包页面(TabBar 页面)
│ ├── index/
│ │ └── index.vue
│ └── about/
│ └── index.vue
├── subPages/ # 分包页面
│ ├── router/
│ ├── request/
│ └── ...
└── subEcharts/ # ECharts 分包
确定页面位置
src/pages/{name}/index.vuesrc/subPages/{name}/index.vue使用 definePage 宏
name 用于编程式导航layout 选择布局style 设置导航栏页面跳转
const router = useRouter()
// 使用 name 跳转
router.push({ name: 'detail' })
// 使用 path 跳转
router.push('/subPages/detail/index')
// 带参数跳转
router.push({ name: 'detail', query: { id: '123' } })
vite.config.ts 的 subPackages 中注册index.vueSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer