feat: use vant replace element-plus as mobile UI framework

This commit is contained in:
RockYang
2024-01-24 17:34:30 +08:00
parent 2113508b6d
commit aaa5ba99aa
33 changed files with 437 additions and 3215 deletions

View File

@@ -1,26 +1,17 @@
<template>
<div class="banner">
<h1 class="banner-title">ChatPuls-V3 智能助理</h1>
</div>
<van-config-provider theme="dark">
<van-config-provider :theme="getMobileTheme()">
<div class="mobile-home">
<router-view/>
<van-tabbar
fixed
route
v-model="active"
active-color="#F5F5F5"
inactive-color="#2CC995"
class="my-tabbar"
>
<van-tabbar-item to="/mobile/chat/list" name="home" icon="chat-o">对话</van-tabbar-item>
<van-tabbar-item to="/mobile/imageSd" name="imageSd" icon="photo-o">绘图</van-tabbar-item>
<van-tabbar-item to="/mobile/apps" name="apps" icon="apps-o">应用</van-tabbar-item>
<van-tabbar-item to="/mobile/profile" name="profile" icon="user-o">我的</van-tabbar-item>
<van-tabbar-item to="/mobile/invitation" name="invitation" icon="share-o">分享</van-tabbar-item>
<van-tabbar route v-model="active" @change="onChange">
<van-tabbar-item to="/mobile/chat/list" name="home" icon="chat-o"></van-tabbar-item>
<van-tabbar-item to="/mobile/setting" name="setting" icon="setting-o"></van-tabbar-item>
<van-tabbar-item to="/mobile/profile" name="profile" icon="user-o"></van-tabbar-item>
</van-tabbar>
</div>
</van-config-provider>
</template>
<script setup>
@@ -47,6 +38,33 @@ const onChange = (index) => {
</script>
<style lang="stylus" scoped>
@import "@/assets/css/mobile/home.css"
</style>
<style lang="stylus">
.mobile-home {
.container {
.van-nav-bar {
position fixed
width 100%
}
.content {
padding 46px 10px 0 10px;
}
}
}
// 黑色主题
.van-theme-dark body {
background #1c1c1e
}
.van-toast--fail {
background #fef0f0
color #f56c6c
}
.van-nav-bar {
position fixed
width 100%
}
</style>