feat: 过滤pages中页面
This commit is contained in:
parent
25cf6f1c02
commit
060b4553ed
@ -58,6 +58,10 @@
|
|||||||
"navigationBarTitleText": "首页"
|
"navigationBarTitleText": "首页"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/application-list/application-list",
|
||||||
|
"type": "page"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/code/code",
|
"path": "pages/code/code",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
@ -74,10 +78,6 @@
|
|||||||
"disableScroll": true
|
"disableScroll": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/home/CustomTab",
|
|
||||||
"type": "page"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/login/login",
|
"path": "pages/login/login",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
|
|||||||
7
src/pages/application-list/application-list.vue
Normal file
7
src/pages/application-list/application-list.vue
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<template>
|
||||||
|
<view></view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@ -1,6 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="m-2 p-2 bg-white rounded-2">
|
<view class="m-2 p-2 bg-white rounded-2 pos-relative">
|
||||||
<wd-tabs v-model="tab" auto-line-width swipeable animated>
|
<image
|
||||||
|
@click="clickMenu"
|
||||||
|
src="/static/images/icon_table_menu.png"
|
||||||
|
class="w-6 h-6 pos-absolute right-1 top-3 p-1 z-10"
|
||||||
|
></image>
|
||||||
|
<wd-tabs
|
||||||
|
v-model="tab"
|
||||||
|
auto-line-width
|
||||||
|
swipeable
|
||||||
|
animated
|
||||||
|
color="#0d100e"
|
||||||
|
inactiveColor="#838383"
|
||||||
|
>
|
||||||
<wd-tab v-for="(item, index) in list" :key="index" :title="item.title" :name="index">
|
<wd-tab v-for="(item, index) in list" :key="index" :title="item.title" :name="index">
|
||||||
<view class="flex flex-wrap">
|
<view class="flex flex-wrap">
|
||||||
<view
|
<view
|
||||||
@ -19,13 +31,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
defineOptions({
|
||||||
|
options: {
|
||||||
|
styleIsolation: 'shared'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const tab = ref<number>(0)
|
const tab = ref<number>(0)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
index: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
list: {
|
list: {
|
||||||
type: Array<HomeTab>,
|
type: Array<HomeTab>,
|
||||||
required: true
|
required: true
|
||||||
@ -34,11 +48,19 @@
|
|||||||
|
|
||||||
const emits = defineEmits(['clickItem'])
|
const emits = defineEmits(['clickItem'])
|
||||||
|
|
||||||
onMounted(() => {
|
const clickMenu = () => {
|
||||||
tab.value = props.index
|
uni.navigateTo({
|
||||||
})
|
url: '/pages/application-list/application-list'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const clickItem = (item: HomeTabItem) => {
|
const clickItem = (item: HomeTabItem) => {
|
||||||
emits('clickItem', item)
|
emits('clickItem', item)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:deep(.wd-tabs__nav--wrap) {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -9,9 +9,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="custom-bg-default">
|
<view class="custom-bg-default">
|
||||||
<TopNavigation :title="appName"></TopNavigation>
|
<TopNavigation :title="appName"></TopNavigation>
|
||||||
<TopNavigation mini :title="appName"></TopNavigation>
|
|
||||||
<button class="mt-12" @click="toLogin">去登录</button>
|
<button class="mt-12" @click="toLogin">去登录</button>
|
||||||
<CustomTab class="mt-10" :list="featuresList" :index="2" @clickItem="clickItem"></CustomTab>
|
<CustomTab class="mt-10" :list="featuresList" @clickItem="clickItem"></CustomTab>
|
||||||
<view class="pt-10">
|
<view class="pt-10">
|
||||||
<CustomTabBar :list="list" :default-index="1" @change="change"></CustomTabBar>
|
<CustomTabBar :list="list" :default-index="1" @change="change"></CustomTabBar>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
BIN
src/static/images/bg_table.png
Normal file
BIN
src/static/images/bg_table.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 513 B |
BIN
src/static/images/icon_table_menu.png
Normal file
BIN
src/static/images/icon_table_menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
2
src/types/uni-pages.d.ts
vendored
2
src/types/uni-pages.d.ts
vendored
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
interface NavigateToOptions {
|
interface NavigateToOptions {
|
||||||
url: "/pages/home/home" |
|
url: "/pages/home/home" |
|
||||||
|
"/pages/application-list/application-list" |
|
||||||
"/pages/code/code" |
|
"/pages/code/code" |
|
||||||
"/pages/get-code/get-code" |
|
"/pages/get-code/get-code" |
|
||||||
"/pages/home/CustomTab" |
|
|
||||||
"/pages/login/login" |
|
"/pages/login/login" |
|
||||||
"/pages/mine/mine" |
|
"/pages/mine/mine" |
|
||||||
"/pages/notification/notification" |
|
"/pages/notification/notification" |
|
||||||
|
|||||||
@ -52,7 +52,7 @@ export default ({ command, mode }) => {
|
|||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
UniPages({
|
UniPages({
|
||||||
exclude: ['**/components/**/**.*'],
|
exclude: ['**/**/[A-Z]*.*'],
|
||||||
routeBlockLang: 'json5', // 虽然设了默认值,但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
|
routeBlockLang: 'json5', // 虽然设了默认值,但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
|
||||||
// homePage 通过 vue 文件的 route-block 的type="home"来设定
|
// homePage 通过 vue 文件的 route-block 的type="home"来设定
|
||||||
// pages 目录为 src/pages,分包目录不能配置在pages目录下
|
// pages 目录为 src/pages,分包目录不能配置在pages目录下
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user