2024-01-04 09:53:17 +08:00
|
|
|
|
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
|
|
|
|
|
<route lang="json5" type="home">
|
|
|
|
|
{
|
|
|
|
|
style: { navigationBarTitleText: '我才是标题' },
|
|
|
|
|
}
|
|
|
|
|
</route>
|
|
|
|
|
|
2023-12-21 15:52:49 +08:00
|
|
|
|
<template>
|
2024-01-08 21:24:39 +08:00
|
|
|
|
<view class="bg-slate-100">
|
|
|
|
|
<view class="bg-slate-100 w-full">
|
|
|
|
|
<view v-for="item in list" :key="item.url" class="mt-3">
|
|
|
|
|
<view
|
|
|
|
|
class="flex bg-white items-center justify-between p-3 mb-2"
|
|
|
|
|
@click="goDetailPage(item.url)"
|
|
|
|
|
>
|
|
|
|
|
<text class="flex-1 text-5 text-dark">{{ item.name }}</text>
|
|
|
|
|
<text class="i-carbon-chevron-right"></text>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-12-21 15:52:49 +08:00
|
|
|
|
</view>
|
2024-01-08 21:24:39 +08:00
|
|
|
|
<view class="m-4">
|
|
|
|
|
<text>测试配置exclude后,还会自动导入页面吗?</text>
|
|
|
|
|
<PagesAutoImport />
|
2023-12-22 15:12:44 +08:00
|
|
|
|
</view>
|
2023-12-21 15:52:49 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
2023-12-21 16:50:50 +08:00
|
|
|
|
<script setup lang="ts" name="TestIndex">
|
2023-12-21 15:52:49 +08:00
|
|
|
|
import { ref } from 'vue'
|
2024-01-08 21:24:39 +08:00
|
|
|
|
import PagesAutoImport from './components/pages-auto-import.vue'
|
2023-12-23 11:27:00 +08:00
|
|
|
|
|
2024-01-08 21:24:39 +08:00
|
|
|
|
const list = ref([
|
|
|
|
|
{
|
|
|
|
|
name: 'UnoCSS',
|
|
|
|
|
url: 'unocss',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'UnoCSS Icons',
|
|
|
|
|
url: 'unocss-icons',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'UniUI',
|
|
|
|
|
url: 'uni-ui',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'UniUI Icons',
|
|
|
|
|
url: 'uni-ui-icons',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'Pinia+持久化',
|
|
|
|
|
url: 'pinia',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '微信分享',
|
|
|
|
|
url: 'mp-weixin-share',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '自定义导航栏',
|
|
|
|
|
url: 'navbar',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '自定义导航栏渐变',
|
2024-01-08 21:28:03 +08:00
|
|
|
|
url: 'throughout',
|
2024-01-08 21:24:39 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '请求封装+请求拦截器',
|
|
|
|
|
url: 'request',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'page自动引入',
|
|
|
|
|
url: 'pages-auto-import',
|
|
|
|
|
},
|
|
|
|
|
])
|
|
|
|
|
const goDetailPage = (path: string) => {
|
|
|
|
|
const url = `/pages/index/demo/${path}`
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url,
|
2023-12-23 11:39:46 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
2023-12-21 15:52:49 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.content {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
|
width: 200rpx;
|
2023-12-21 16:21:40 +08:00
|
|
|
|
height: 200rpx;
|
|
|
|
|
margin: 200rpx auto 50rpx;
|
2023-12-21 15:52:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text-area {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
color: #8f8f94;
|
|
|
|
|
}
|
|
|
|
|
</style>
|