<template>
  <div>
    <div class="layout-content-padding">
      <div class="layout-content-main">
        <Row :gutter="8">
          <!--查询-->
          <Col v-show="leftSpan" :span="leftSpan" style="position: relative">
          <slot name="left" />
          </Col>
          <Col :span="rightSpan" style="position: relative">
          <div
            v-if="isTree"
            style="position:absolute;top:45%;left:-3px;margin:auto;cursor:pointer"
            @click="_treeHide"
          >
            <div class="navbarImgShow" />
          </div>
          <div v-if="!isTree" style="position:absolute;top:50%;left:2px;margin:auto;cursor:pointer" @click="_treeHide">
            <div class="navbarImgHide" />
          </div>
          <div style="margin-left: 14px">
            <slot name="right" />
          </div>
          </Col>
        </Row>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isTree: true,
      leftSpan: 8,
      rightSpan: 16
    }
  },
  methods: {
    _treeHide() {
      this.isTree = !this.isTree
      if (this.isTree) {
        this.leftSpan = 8
        this.rightSpan = 16
      } else {
        this.leftSpan = 0
        this.rightSpan = 24
      }
    }
  }
}
</script>

<style scoped>
</style>
