12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <div class='Layout'>
- <!-- 底部固定栏 -->
- <div class="bottom">
- <div class="row" @click="$router.push(item.path).catch(() => { })" v-for="item in data" :key="item.id">
- <img :src="require(`@/assets/img/layout/inco${item.id}${item.id === $route.meta.myInd ? 'Ac' : ''}.png`)" alt="">
- <p>{{ item.name }}</p>
-
- </div>
- </div>
- <Router-view />
- </div>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- data: [
- { id: 1, path: '/layout/construct', name: '建筑可阅读' },
- { id: 2, path: '/layout/serve', name: '建筑可游玩' },
- { id: 3, path: '/layout/interact', name: '建筑可对话' },
- { id: 4, path: '/layout/my', name: '我的' },
- ]
- };
- },
- computed: {},
- watch: {},
- methods: {
- },
- created() {
- },
- mounted() {
- },
- beforeCreate() { }, //生命周期 - 创建之前
- beforeMount() { }, //生命周期 - 挂载之前
- beforeUpdate() { }, //生命周期 - 更新之前
- updated() { }, //生命周期 - 更新之后
- beforeDestroy() { }, //生命周期 - 销毁之前
- destroyed() { }, //生命周期 - 销毁完成
- activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
- }
- </script>
- <style lang='less' scoped>
- .Layout {
- width: 100%;
- height: 100%;
- position: relative;
- .bottom {
- max-width: 500px;
- position: fixed;
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- width: 100%;
- height: 80px;
- background-color: #fff;
- display: flex;
- align-items: center;
- .row{
- width: 25%;
- text-align: center;
- &>img{
- width: 30px;
- }
- &>p{
- margin-top: 5px;
- font-size: 12px;
- }
- }
- }
- }
- </style>
|