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.

86 lines
2.7 KiB

5 years ago
<template>
<div class="container" style="overflow-y: hidden !important;">
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" />
5 years ago
返回
</el-button>
</el-col>
<el-col :span="10" :offset="3">
<el-menu :default-active="activeTab" style="background-color: transparent;" mode="horizontal"
@select="handleSelect"
>
4 years ago
<el-menu-item index="editor">编辑</el-menu-item>
<el-menu-item index="logic">逻辑</el-menu-item>
<el-menu-item index="theme">外观</el-menu-item>
<el-menu-item index="setting">设置</el-menu-item>
<el-menu-item index="publish">发布</el-menu-item>
<el-menu-item index="statistics">统计</el-menu-item>
5 years ago
</el-menu>
</el-col>
</el-row>
4 years ago
<div v-if="projectKey">
<editor v-if="activeTab=='editor'" :project-key="projectKey" :is-edit="isEdit" />
<logic v-if="activeTab=='logic'" :project-key="projectKey" />
<theme v-if="activeTab=='theme'" :project-key="projectKey" />
<setting v-if="activeTab=='setting'" :project-key="projectKey" />
<publish v-if="activeTab=='publish'" :project-key="projectKey" />
<statistics v-if="activeTab=='statistics'" :project-key="projectKey" />
5 years ago
</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'
4 years ago
import logic from './logic'
5 years ago
5 years ago
export default {
components: {
5 years ago
editor,
theme,
5 years ago
setting,
5 years ago
publish,
4 years ago
statistics,
logic
5 years ago
},
data() {
return {
4 years ago
activeTab: 'editor',
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
if (this.$route.query.active) {
4 years ago
this.activeTab = this.$route.query.active
}
5 years ago
},
methods: {
4 years ago
handleSelect(type) {
4 years ago
if (type) {
this.activeTab = type
this.$router.replace({path: '/project/form', query: {key: this.projectKey, active: type}})
5 years ago
}
}
}
}
</script>
4 years ago
<style lang='scss'>
.container {
position: relative;
width: 100%;
height: 100%;
4 years ago
//overflow-y: hidden;
}
5 years ago
</style>