<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: 12,
      rightSpan: 12
    }
  },
  methods: {
    _treeHide() {
      this.isTree = !this.isTree
      if (this.isTree) {
        this.leftSpan = 9
        this.rightSpan = 15
      } else {
        this.leftSpan = 0
        this.rightSpan = 24
      }
    }
  }
}
</script>

<style scoped>
</style>
