feat: 完成移动端前段框架搭建

This commit is contained in:
RockYang
2023-06-24 11:45:26 +08:00
parent 063b5655f7
commit ad0f96fcb1
7 changed files with 335 additions and 105 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div>
<router-view/>
<van-tabbar route v-model="active" @change="onChange">
<van-tabbar-item to="/mobile/chat" 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>
</template>
<script setup>
import {ref} from "vue";
const active = ref('home');
const onChange = (index) => {
console.log(index)
// showToast(`标签 ${index}`);
}
</script>
<style lang="stylus">
.van-toast--fail {
background #fef0f0
color #f56c6c
}
</style>