<template>
  <div :class="['bannerBox', {buildingBorder: this.$store.state.template.previewStatus==false}]">
    <div :class="['itemTopBox', {componentBorder: $store.state.template.previewStatus==false}]">
      <editBtn :id="id" :dataSort="dataSort" :sort="0" :type="6" :size="1"/>
      <convertBtn :id="id" :dataSort="dataSort" :sort="0" :type="1"/>
      <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[0].component_style == 1">
        <mainTitleStyle1 />
      </div>
      <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[0].component_style == 2">
        <mainTitleStyle2 />
      </div>
    </div>
    <div class="itemBottomBox">
      <div class="bannerLayerBox">
        <editBtn :id="id" :dataSort="dataSort" :sort="1" :type="1" :size="3"/>
        <convertBtn :id="id" :dataSort="dataSort" :sort="1" :type="4"/>
        <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[1].component_style == 1">
          <banner1Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[1].component_style == 2">
          <banner2Style />
        </div>
      </div>
      <div :class="['NewsListBox', {componentBorder: $store.state.template.previewStatus==false}]">
        <editBtn :id="id" :dataSort="dataSort"  :sort="2" :type="2" :size="5"/>
        <convertBtn :id="id" :dataSort="dataSort" :sort="2" :type="5"/>
        <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[2].component_style == 1">
          <tabs1Style />
        </div>
        <div v-if="this.$store.state.template.pageData.index[dataSort].content.componentList[2].component_style == 2">
          <tabs2Style />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
//编辑按钮
import editBtn from '../../../public/editBtn.vue'
import convertBtn from '../../../public/convertBtn.vue'
//标题组件
import mainTitleStyle1 from '../components/mainTitle/1.vue'
import mainTitleStyle2 from '../components/mainTitle/2.vue'
//banner组件
import banner from '../components/banner.vue'
import banner1Style from '../components/banner/1.vue'
import banner2Style from '../components/banner/2.vue'
//tabs组件
import tabs1Style from '../components/tabs/1.vue'
import tabs2Style from '../components/tabs/2.vue'

export default {
  components: {
    //mainTitle,
    banner,
    editBtn,
    convertBtn,
    mainTitleStyle1,
    mainTitleStyle2,
    banner1Style,
    banner2Style,
    tabs1Style,
    tabs2Style
  },
  props: {
    id:{
      type:Number,
      default:0
    },
    dataSort:{
      type:Number,
      default:0
    }
  },
  data() {
    return {
      
    };
  },
  methods: {
    
  },
  mounted() {
    
  },
};
</script>

<style scoped lang="less">
  .bannerBox {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 314px;
    .componentBorder{
      border: 2px dashed #999;
    }
    .itemTopBox {
      position: relative;
      //border: 2px dashed #999;
      width: 80%;
    }
    .itemBottomBox {
      width: 80%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 0 0 0;
      padding-top: 20px;
      .bannerLayerBox {
        position: relative;
        //border: 2px dashed #999;
        width: 55%;
        height: 226px;
      }
      .NewsListBox {
        position: relative;
        width: 45%;
        //border: 2px dashed #999;
        box-sizing: border-box;
        padding-left: 20px;
        height: 226px;
      }
    }
    
  }
</style>
