You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB

5 years ago
<template>
<div class="container">
5 years ago
<el-row type="flex" align="middle" justify="justify">
<el-col :offset="1" :span="4">
<el-button size="mini" round @click="$router.back(-1)">
<i class="el-icon-arrow-left"/>
返回
</el-button>
</el-col>
<el-col :span="10" :offset="3">
<el-menu :default-active="activeIndex" @select="handleSelect" style="background-color: transparent"
mode="horizontal">
<el-menu-item index="1">编辑</el-menu-item>
<el-menu-item index="2">外观</el-menu-item>
<el-menu-item index="3">设置</el-menu-item>
<el-menu-item index="4">发布</el-menu-item>
<el-menu-item index="5">统计</el-menu-item>
</el-menu>
</el-col>
</el-row>
5 years ago
<div v-if="projectKey">
<editor :projectKey="projectKey" :is-edit="isEdit" v-if="activeIndex==1"/>
<theme :projectKey="projectKey" v-if="activeIndex==2"/>
<setting :projectKey="projectKey" v-if="activeIndex==3"/>
<publish :projectKey="projectKey" v-if="activeIndex==4"/>
<statistics :projectKey="projectKey" v-if="activeIndex==5"/>
</div>
5 years ago
</div>
</template>
<script>
5 years ago
import editor from './editor'
import theme from './theme'
import setting from './setting'
5 years ago
import publish from './publish'
5 years ago
import statistics from './statistics'
5 years ago
5 years ago
export default {
components: {
5 years ago
editor,
theme,
5 years ago
setting,
5 years ago
publish,
statistics
5 years ago
},
data() {
return {
5 years ago
activeIndex: '5',
5 years ago
isEdit: false,
projectKey:''
5 years ago
}
},
computed: {},
5 years ago
watch: {},
5 years ago
mounted() {
5 years ago
this.projectKey = this.$route.query.key
5 years ago
this.isEdit = !!this.$route.query.active
this.activeIndex=this.$route.query.active
5 years ago
},
methods: {
5 years ago
handleSelect(key, keyPath) {
if (key) {
this.activeIndex = key
5 years ago
}
}
}
}
</script>
5 years ago
<style lang='scss'>
5 years ago
</style>