|
@@ -1,23 +1,23 @@
|
|
<template>
|
|
<template>
|
|
<div class="grid-layout-demo">
|
|
<div class="grid-layout-demo">
|
|
- <div :class="['FixedModuleBox', { sectorBorder: this.$store.state.template.previewStatus==false }]">
|
|
|
|
|
|
+ <div :class="['FixedModuleBox', { sectorBorder: this.$store.state.template.previewStatus==false }]"><!--1-->
|
|
<headSector />
|
|
<headSector />
|
|
</div>
|
|
</div>
|
|
- <div :class="['FixedModuleBox', { sectorBorder: this.$store.state.template.previewStatus==false }]">
|
|
|
|
|
|
+ <div :class="['FixedModuleBox', { sectorBorder: this.$store.state.template.previewStatus==false }]"><!--2-->
|
|
<menuSector />
|
|
<menuSector />
|
|
</div>
|
|
</div>
|
|
- <div class="FixedMainModuleBox" v-if="this.$store.state.template.pageData.index.length == 0">
|
|
|
|
|
|
+ <div :class="['FixedMainModuleBox', { FixedMainModuleBoxBorder: this.$store.state.template.previewStatus==false }]" v-if="this.$store.state.template.pageData.index.length == 0">
|
|
<img src="@/assets/template/creat.png">
|
|
<img src="@/assets/template/creat.png">
|
|
<div>您选择的板块将展示到此区域</div>
|
|
<div>您选择的板块将展示到此区域</div>
|
|
</div>
|
|
</div>
|
|
<grid-layout :layout="this.$store.state.template.pageData.index" :margin="[0,0]" :col-num="12" :row-height="rowHeight" :is-draggable="true" :is-resizable="true">
|
|
<grid-layout :layout="this.$store.state.template.pageData.index" :margin="[0,0]" :col-num="12" :row-height="rowHeight" :is-draggable="true" :is-resizable="true">
|
|
<grid-item v-for="(item, index) in this.$store.state.template.pageData.index" :key="item.i" :i="item.i" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :is-resizable="false">
|
|
<grid-item v-for="(item, index) in this.$store.state.template.pageData.index" :key="item.i" :i="item.i" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :is-resizable="false">
|
|
<div class="grid-item-content">
|
|
<div class="grid-item-content">
|
|
- <div class="grid-tools-menu">
|
|
|
|
|
|
+ <div class="grid-tools-menu" v-if="$store.state.template.previewStatus==false">
|
|
<!-- <span><i class="el-icon-setting"></i></span> -->
|
|
<!-- <span><i class="el-icon-setting"></i></span> -->
|
|
<!-- 移动板块 暂时停用 会导致组件视图不更新的问题-->
|
|
<!-- 移动板块 暂时停用 会导致组件视图不更新的问题-->
|
|
- <!-- <span @click="moveModule(item.i,'up')"><i class="el-icon-upload2"></i></span>
|
|
|
|
- <span @click="moveModule(item.i,'down')"><i class="el-icon-download"></i></span> -->
|
|
|
|
|
|
+ <span @click="moveModule(item.i,'up')"><i class="el-icon-sort-up"></i></span>
|
|
|
|
+ <span @click="moveModule(item.i,'down')"><i class="el-icon-sort-down"></i></span>
|
|
<span @click="deleteModule(item.i)"><i class="el-icon-close"></i></span>
|
|
<span @click="deleteModule(item.i)"><i class="el-icon-close"></i></span>
|
|
</div>
|
|
</div>
|
|
<!-- 页头板块 -->
|
|
<!-- 页头板块 -->
|
|
@@ -28,38 +28,38 @@
|
|
<!-- <div v-if="item.type == 'menuSector'" class="moduleBox">
|
|
<!-- <div v-if="item.type == 'menuSector'" class="moduleBox">
|
|
<menuSector :id="item.i"/>
|
|
<menuSector :id="item.i"/>
|
|
</div> -->
|
|
</div> -->
|
|
- <!-- 图片标题模块 -->
|
|
|
|
- <div v-if="item.type == 'imgTitleSector'" class="moduleBox">
|
|
|
|
|
|
+ <!-- 图片标题模块 --><!--4-->
|
|
|
|
+ <div v-if="item.type == 'imgTitleSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<imgTitleSector :id="item.i"/>
|
|
<imgTitleSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
- <!-- 焦点图模块 -->
|
|
|
|
- <div v-if="item.type == 'bannerSector'" class="moduleBox">
|
|
|
|
|
|
+ <!-- 焦点图模块 --><!--5-->
|
|
|
|
+ <div v-if="item.type == 'bannerSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<bannerSector :id="item.i"/>
|
|
<bannerSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
- <!-- 多图模块 -->
|
|
|
|
- <div v-if="item.type == 'manyPictureSector'" class="moduleBox">
|
|
|
|
|
|
+ <!-- 多图模块 --><!--6-->
|
|
|
|
+ <div v-if="item.type == 'manyPictureSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<manyPictureSector :id="item.i"/>
|
|
<manyPictureSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
- <!-- 评论模块 -->
|
|
|
|
- <div v-if="item.type == 'commentSector'" class="moduleBox">
|
|
|
|
|
|
+ <!-- 评论模块 --><!--7-->
|
|
|
|
+ <div v-if="item.type == 'commentSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<commentSector :id="item.i"/>
|
|
<commentSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
<!-- 双联文章列表模块 -->
|
|
<!-- 双联文章列表模块 -->
|
|
- <div v-if="item.type == 'listSector'" class="moduleBox">
|
|
|
|
|
|
+ <div v-if="item.type == 'listSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<listSector :id="item.i"/>
|
|
<listSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
<!-- 纯图片组合模块 -->
|
|
<!-- 纯图片组合模块 -->
|
|
- <div v-if="item.type == 'onlyImgSector'" class="moduleBox">
|
|
|
|
|
|
+ <div v-if="item.type == 'onlyImgSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<onlyImgSector :id="item.i"/>
|
|
<onlyImgSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
<!-- 友情链接模块 -->
|
|
<!-- 友情链接模块 -->
|
|
- <div v-if="item.type == 'friendShipLinkSector'" class="moduleBox">
|
|
|
|
|
|
+ <div v-if="item.type == 'friendShipLinkSector'" :class="['moduleBox', {FixedMainModuleBoxBorder: $store.state.template.previewStatus==false}]">
|
|
<friendShipLinkSector :id="item.i"/>
|
|
<friendShipLinkSector :id="item.i"/>
|
|
</div>
|
|
</div>
|
|
<!-- 页尾板块 -->
|
|
<!-- 页尾板块 -->
|
|
<!-- <div v-if="item.type == 'footerSector'" class="moduleBox">
|
|
<!-- <div v-if="item.type == 'footerSector'" class="moduleBox">
|
|
<footerSector />
|
|
<footerSector />
|
|
- </div> -->
|
|
|
|
|
|
+ </div> --><!--3-->
|
|
</div>
|
|
</div>
|
|
</grid-item>
|
|
</grid-item>
|
|
</grid-layout>
|
|
</grid-layout>
|
|
@@ -79,16 +79,16 @@ import { GridLayout, GridItem } from 'vue-grid-layout';
|
|
|
|
|
|
//自助建站组件 start------------------------------------------------------------>
|
|
//自助建站组件 start------------------------------------------------------------>
|
|
//style1
|
|
//style1
|
|
-import headSector from '../style/1/headSector.vue';
|
|
|
|
-import menuSector from '../style/1/menuSector.vue';
|
|
|
|
-import imgTitleSector from '../style/1/imgTitleSector.vue';
|
|
|
|
-import bannerSector from '../style/1/bannerSector.vue';
|
|
|
|
-import manyPictureSector from '../style/1/manyPictureSector.vue';
|
|
|
|
-import commentSector from '../style/1/commentSector.vue';
|
|
|
|
-import listSector from '../style/1/listSector.vue';
|
|
|
|
-import onlyImgSector from '../style/1/onlyImgSector.vue';
|
|
|
|
-import friendShipLinkSector from '../style/1/friendShipLinkSector.vue';
|
|
|
|
-import footerSector from '../style/1/footerSector.vue';
|
|
|
|
|
|
+import headSector from '../style/1/sector/1.vue';//顶部
|
|
|
|
+import menuSector from '../style/1/sector/2.vue';//菜单
|
|
|
|
+import imgTitleSector from '../style/1/sector/4.vue';//广告
|
|
|
|
+import bannerSector from '../style/1/sector/5.vue';//焦点图
|
|
|
|
+import manyPictureSector from '../style/1/sector/6.vue';//多图
|
|
|
|
+import commentSector from '../style/1/sector/7.vue';//评论
|
|
|
|
+import listSector from '../style/1/sector/8.vue';//文章列表
|
|
|
|
+import onlyImgSector from '../style/1/sector/9.vue';//纯图片组合
|
|
|
|
+import friendShipLinkSector from '../style/1/sector/10.vue';//友情链接
|
|
|
|
+import footerSector from '../style/1/sector/3.vue';//底部
|
|
//自助建站组件 end------------------------------------------------------------>
|
|
//自助建站组件 end------------------------------------------------------------>
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -177,6 +177,9 @@ export default {
|
|
position: relative;
|
|
position: relative;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
+ //border: 2px dashed #eee;
|
|
|
|
+ }
|
|
|
|
+ .moduleBoxBorder {
|
|
border: 2px dashed #eee;
|
|
border: 2px dashed #eee;
|
|
}
|
|
}
|
|
//固定的模块
|
|
//固定的模块
|
|
@@ -186,7 +189,6 @@ export default {
|
|
}
|
|
}
|
|
.FixedMainModuleBox {
|
|
.FixedMainModuleBox {
|
|
width: 100%;
|
|
width: 100%;
|
|
- border: 2px dashed #eee;
|
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
color: #999;
|
|
color: #999;
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -196,6 +198,9 @@ export default {
|
|
padding: 100px;
|
|
padding: 100px;
|
|
background: #F5F7FB;
|
|
background: #F5F7FB;
|
|
}
|
|
}
|
|
|
|
+ .FixedMainModuleBoxBorder {
|
|
|
|
+ border: 2px dashed #eee;
|
|
|
|
+ }
|
|
//模块 end------------------------------------------------------------>
|
|
//模块 end------------------------------------------------------------>
|
|
//栅格布局 start------------------------------------------------------------>
|
|
//栅格布局 start------------------------------------------------------------>
|
|
.grid-item-content {
|
|
.grid-item-content {
|
|
@@ -206,6 +211,7 @@ export default {
|
|
height: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+
|
|
.grid-tools-menu {
|
|
.grid-tools-menu {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|