|
@@ -1,33 +1,47 @@
|
|
|
<template>
|
|
|
<div class="componentMenuBox" id="componentMenuBox">
|
|
|
<div class="componentMenuTitle">
|
|
|
- <div v-if="type == 'sector'">可选板块:</div>
|
|
|
- <div v-if="type == 'component'">可选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 1">首页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 1">首页可选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 2">分类页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 2">分类页选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 3">列表页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 3">列表页选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 4">详情页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 4">详情页选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 5">搜索页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 5">搜索页选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 6">自定义列表页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 6">自定义列表页选组件:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 7">自定义详情页可选板块:</div>
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 7">自定义详情页选组件:</div>
|
|
|
</div>
|
|
|
- <div v-if="type == 'sector'">
|
|
|
+ <div>
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
|
- <style1Sector/>
|
|
|
+ <!--首页板块-->
|
|
|
+ <div v-if="this.$store.state.template.menuType == 1 && this.$store.state.template.pageStatus == 1">
|
|
|
+ <indexSector/>
|
|
|
+ </div>
|
|
|
+ <!--首页组件-->
|
|
|
+ <div v-if="this.$store.state.template.menuType == 2 && this.$store.state.template.pageStatus == 1">
|
|
|
+
|
|
|
+ </div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
- <!-- <div v-if="type == 'component'" class="componentBox">
|
|
|
- 组件
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-//style1
|
|
|
-import style1Sector from './style/1/sector.vue';
|
|
|
+//首页板块
|
|
|
+import indexSector from './pages/index/sector.vue';
|
|
|
+
|
|
|
export default {
|
|
|
name: 'componentMenu',
|
|
|
components:{
|
|
|
- style1Sector
|
|
|
+ indexSector
|
|
|
},
|
|
|
props: {
|
|
|
- type: {
|
|
|
- type: String, //sector component
|
|
|
- required: true
|
|
|
- },
|
|
|
+
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -35,14 +49,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- addModule(type,h){
|
|
|
- let data = {
|
|
|
- type: type,
|
|
|
- h: h
|
|
|
- }
|
|
|
- console.log(data);
|
|
|
- this.$store.commit('template/addModule',data);
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -75,31 +82,5 @@ export default {
|
|
|
padding-left: 25px;
|
|
|
}
|
|
|
}
|
|
|
- .sectorItemBox {
|
|
|
- box-sizing: border-box;
|
|
|
- padding: 0 20px 40px 20px;
|
|
|
- height: 130px;
|
|
|
- cursor: pointer;
|
|
|
- .sectorItem {
|
|
|
- border: 1px solid #333644;
|
|
|
- padding: 10px;
|
|
|
- border-radius: 8px;
|
|
|
- &:hover {
|
|
|
- background: #333644;
|
|
|
- transform: scale(1.1);
|
|
|
- transition: all 0.2s ease-in-out;
|
|
|
- }
|
|
|
- img {
|
|
|
- display: block;
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
- .sectorItemTitle {
|
|
|
- color: #fff;
|
|
|
- font-size: 14px;
|
|
|
- padding: 10px 0 0 0;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|