Merge remote-tracking branch 'origin/develop' into develop_mzh

This commit is contained in:
魏少阳 2025-01-02 09:35:21 +08:00
commit 4d1c9a7335
8 changed files with 45 additions and 17 deletions

View File

@ -58,6 +58,10 @@
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/application-list/application-list",
"type": "page"
},
{
"path": "pages/code/code",
"type": "page",
@ -74,10 +78,6 @@
"disableScroll": true
}
},
{
"path": "pages/home/CustomTab",
"type": "page"
},
{
"path": "pages/login/login",
"type": "page",

View File

@ -0,0 +1,7 @@
<template>
<view></view>
</template>
<script setup lang="ts"></script>
<style scoped lang="scss"></style>

View File

@ -1,6 +1,18 @@
<template>
<view class="m-2 p-2 bg-white rounded-2">
<wd-tabs v-model="tab" auto-line-width swipeable animated>
<view class="m-2 p-2 bg-white rounded-2 pos-relative">
<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">
<view class="flex flex-wrap">
<view
@ -19,13 +31,15 @@
</template>
<script setup lang="ts">
defineOptions({
options: {
styleIsolation: 'shared'
}
})
const tab = ref<number>(0)
const props = defineProps({
index: {
type: Number,
default: 0
},
list: {
type: Array<HomeTab>,
required: true
@ -34,11 +48,19 @@
const emits = defineEmits(['clickItem'])
onMounted(() => {
tab.value = props.index
})
const clickMenu = () => {
uni.navigateTo({
url: '/pages/application-list/application-list'
})
}
const clickItem = (item: HomeTabItem) => {
emits('clickItem', item)
}
</script>
<style>
:deep(.wd-tabs__nav--wrap) {
margin-right: 30px;
}
</style>

View File

@ -9,9 +9,8 @@
<template>
<view class="custom-bg-default">
<TopNavigation :title="appName"></TopNavigation>
<TopNavigation mini :title="appName"></TopNavigation>
<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">
<CustomTabBar :list="list" :default-index="1" @change="change"></CustomTabBar>
</view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -5,9 +5,9 @@
interface NavigateToOptions {
url: "/pages/home/home" |
"/pages/application-list/application-list" |
"/pages/code/code" |
"/pages/get-code/get-code" |
"/pages/home/CustomTab" |
"/pages/login/login" |
"/pages/mine/mine" |
"/pages/notification/notification" |

View File

@ -52,7 +52,7 @@ export default ({ command, mode }) => {
plugins: [
UniPages({
exclude: ['**/components/**/**.*'],
exclude: ['**/**/[A-Z][a-zA-Z0-9]*.*'],
routeBlockLang: 'json5', // 虽然设了默认值但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
// homePage 通过 vue 文件的 route-block 的type="home"来设定
// pages 目录为 src/pages分包目录不能配置在pages目录下