<template>
  <div :class="['listSectorBox', {buildingBorder: this.$store.state.template.previewStatus==false}]">
    <div :class="['listSectorBoxTitle', {componentBorder: $store.state.template.previewStatus==false}]">
      <editBtn :id="id" :sort="0" :type="7" :size="1"/>
      <convertBtn :id="id" :sort="0" :type="2"/>
      <div v-if="this.$store.state.template.pageData.index[id].content.componentList[0].component_style == 1">
        <title1Style />
      </div>
    </div>
    <div class="listSectorBoxContent">
      <div :class="['listNewsRight', {componentBorder: $store.state.template.previewStatus==false}]">
        <editBtn :id="id" :sort="1" :type="1" :size="5"/>
        <convertBtn :id="id" :sort="1" :type="6"/>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[1].component_style == 1">
          <list1Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[1].component_style == 2">
          <list2Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[1].component_style == 3">
          <list3Style />
        </div>
      </div>
      <div :class="['listNewsRight', {componentBorder: $store.state.template.previewStatus==false}]">
        <editBtn :id="id" :sort="2" :type="1" :size="5"/>
        <convertBtn :id="id" :sort="2" :type="6"/>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[2].component_style == 1">
          <list1Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[2].component_style == 2">
          <list2Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[id].content.componentList[2].component_style == 3">
          <list3Style />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
//编辑按钮
import editBtn from '../../../public/editBtn.vue'
import convertBtn from '../../../public/convertBtn.vue'
//标题组件
import title1Style from '../components/title/1.vue'
//新闻列表组件
import list1Style from '../components/list/1.vue'
import list2Style from '../components/list/2.vue'
import list3Style from '../components/list/3.vue'
// import styleTitle from './components/styleTitle.vue';
// import listNews from './components/listNews.vue';

export default {
  components: {
    editBtn, 
    convertBtn,
    title1Style,
    list1Style,
    list2Style,
    list3Style
  },
  props: {
    id:{
      type:Number,
      default:0
    }
  },
  data() {
    return {
      
    };
  },
};
</script>

<style scoped lang="less">
  .listSectorBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    width:100%;
    .componentBorder{
      border: 2px dashed #999;
    }
    .listSectorBoxTitle {
      width: 80%;
      //border: 2px dashed #999;
      height: 41px;
      position: relative;
    }
    .listSectorBoxContent {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 80%;
      margin-top: 20px;
      .listNewsLeft {
        width: 50%;
        box-sizing: border-box;
        //border: 2px dashed #999;
        padding-right: 10px;
        position: relative;
      }
      .listNewsRight {
        width: 50%;
        box-sizing: border-box;
        //border: 2px dashed #999;
        padding-left: 10px;
        position: relative;
      }
    }
  }
</style>
