feat: 数据库迁移

This commit is contained in:
橙子
2023-10-07 17:51:05 +08:00
parent ca5697fb9c
commit c271f3005a
68 changed files with 222 additions and 18 deletions

View File

@@ -0,0 +1,76 @@
<template>
<van-tabbar v-model="active" active-color="#FF689B" inactive-color="#9C9C9C" @change="onChange" z-index="100">
<van-tabbar-item v-for="item in tabbar.slice(0,2)" :to="item.to" :icon="item.icon">{{item.title}}</van-tabbar-item>
<van-tabbar-item @click="show = true">
<template #icon="props">
<van-icon class="add" name="add-square" color="#FF689B" size="3rem" />
<!-- <img :src="props.active ? icon.active : icon.inactive" /> -->
</template>
</van-tabbar-item>
<van-tabbar-item v-for="item in tabbar.slice(3)" :to="item.to" :icon="item.icon">{{item.title}}</van-tabbar-item>
</van-tabbar>
<van-action-sheet v-model:show="show" >
<router-link to="/imageText"> <van-button class="btn1 btn " style="background-color: #5FBC76;" >发图文</van-button></router-link>
<van-button class="btn" style="background-color: #FF689B;">(暂未开放)发视频</van-button>
<van-button class="btn" style="background-color: #F7A63A;">(暂未开放)发文章</van-button>
<van-button class="btn" style="background-color: #6AB5EE;">(暂未开放)发二手</van-button>
<van-icon class="icon" name="cross" size="1.5rem" @click="show=false"/>
</van-action-sheet>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const active = ref(0);
const show = ref(false);
let tabbar=ref([
{icon:"wap-home",to:"/",title:"主页"},
{icon:"location-o",to:"",title:"发现"},
{icon:"",to:"",title:""},
{icon:"friends-o",to:"/shopIndex",title:"商城"},
// {icon:"friends-o",to:"",title:"商城"},
{icon:"setting-o",to:"/my",title:"我的"},
])
const onChange=(index:number)=>{
tabbar.value=[
{icon:"wap-home-o",to:"/",title:"主页"},
{icon:"location-o",to:"",title:"发现"},
{icon:"",to:"",title:""},
{icon:"friends-o",to:"/shopIndex",title:"商城"},
// {icon:"friends-o",to:"",title:"商城"},
{icon:"setting-o",to:"/my",title:"我的"},
];
tabbar.value[index].icon=tabbar.value[index].icon.replace("-o","")
}
</script>
<style>
.btn1
{
margin-top: 3rem !important;
}
.btn{
border-radius:0.5rem;
height: 4rem;
width:90%;
margin: 0.5rem 1rem 0.5rem 1rem;
color: #FFFFFF;
}
.content {
padding: 16px 16px 160px;
}
.icon{
margin-bottom: 1.5rem;
}
.add{
margin-top: 0.2rem;
}
</style>

View File

@@ -0,0 +1,9 @@
<template>
<van-nav-bar
title="标题"
left-text="返回"
left-arrow
/>
<br>
<router-view />
</template>

View File

@@ -0,0 +1,13 @@
<script setup lang="ts">
import { ref } from 'vue'
import AppBottom from './bottom/index.vue'
</script>
<template>
<router-view></router-view>
<app-bottom/>
</template>

View File

@@ -0,0 +1,12 @@
<template>
<app-tab />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import AppTab from '@/layout/tab/index.vue'
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,45 @@
<template >
<van-sticky :offset-top="0">
<van-row class="row" >
<van-col span="4" class="icon"><van-icon name="sign" size="1.6rem"/></van-col>
<van-col span="16">
<van-tabs v-model:active="active" class="tabs" sticky swipeable color="#FF689B">
<van-tab v-for="item in tabs" :title="item.title" :to="item.to" class="tab" :style="{fontSize: 0 + 'px'}" ></van-tab>
</van-tabs>
</van-col>
<van-col span="4" class="icon"><van-icon name="search" size="1.6rem" /></van-col>
</van-row>
</van-sticky>
<router-view />
<div style=""></div>
</template>
<script setup lang="ts">
import { ref } from "vue";
const active = ref(1);
const tabs=ref([
{title:"关注",to:"/follow"},
{title:"推荐",to:"/recommend"},
{title:"广场",to:"/square"},
])
</script>
<style scoped>
.row{
background-color: #FFFFFF;
min-width: 24rem;
}
.tab{
}
.icon{
padding-top: 0.6rem;
}
.tabs {
width: 100%;
}
.icon .van-icon
{
color:#FF689B;
}
</style>