123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <template>
- <div class='Layout'>
- <div class="bottom">
- <div class="row" @click="$router.push(item.path).catch(() => { })" :class="{ active: item.id === $route.meta.myInd }"
- v-for="item in data" :key="item.id">{{ item.name }}
- </div>
- </div>
- <Router-view />
- </div>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- data: [
- { id: 1, path: '/layout/construct', name: '览·古建', inco: '' },
- { id: 2, path: '/layout/serve', name: '享·服务', inco: '' },
- { id: 3, path: '/layout/interact', name: '悦·互动', inco: '' },
- { id: 4, path: '/layout/my', name: '我的', inco: '' },
- ]
- };
- },
- 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 {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 40px;
- display: flex;
- justify-content: space-around;
- &>div {
- font-size: 16px;
- }
- .active {
- color: red;
- }
- }
- }
- </style>
|