<template>
  <div>
    <div class="conditionblock moreCondition">
      <div class="conditionborder" @click="setCon">
        <div class="box">
          <div class="skew">
            <div class="skew-main">
              <div v-show="showTitle">
                <span>
                  <span v-text="$t('950400')">更多条件</span>
                  <Icon type="ios-arrow-down" />
                </span>
              </div>
              <div v-show="!showTitle">
                <span>
                  <span v-text="$t('950401')">收起条件</span>
                  <Icon type="ios-arrow-up" />
                </span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name: 'MoreCon-btn', // 组件名称
    data () {
        return {
            showTitle: false
        };
    },
    // 传参使用
    props: {
        morecondition: Boolean
    },
    created () {},
    methods: {
        setCon () {
            this.showTitle = !this.morecondition;
            this.$emit('getCon', this.morecondition);
        }
    }
};
</script>

<style lang="less" scoped>
.conditionblock {
  position: relative;
}

//查询条件缩放的倾斜样式
.conditionborder {
  cursor: pointer;
  position: absolute;
  right: -6px;
  bottom: -11px;
  height: 30px;
  width: 115px;
  padding-left: 15px;
  line-height: 30px;
  border: 1px solid rgb(171, 171, 238);
  background: #fff;
  // margin: 0 auto;
  text-align: center;
  transform: skew(-15deg);
}

.conditionborder::before {
  position: absolute;
  right: -6px;
  bottom: -6px;
  height: 30px;
  width: 115px;
}

.box {
  width: 115px;
}

.skew {
  width: 115px;
  height: 30px;
  background: #fff;
  margin: 0 auto;
  color: #000;
  font-size: 12px;
  line-height: 30px;
  text-align: left;
  transform: skew(-15deg);
}

.skew-main {
  transform: skew(15deg);
}

//搜索 更多条件按钮
.moreCondition {
  position: relative;
  .conditionborder {
    position: absolute;
    right: 10px;
    bottom: 10px;
    height: 31.89px;
    width: 75px;
    padding-left: 0px;
    line-height: 31.89px;
    border: 0px solid #ababee;
    background: #fff;
    text-align: center;
    -webkit-transform: none;
    transform: none;
    border-radius: 3px;
    .box {
      width: 75px;
      .skew {
        width: 75px;
        height: 31.89px;
        background: #fff;
        margin: 0 auto;
        color: #000;
        font-size: 12px;
        line-height: 31.89px;
        text-align: left;
        -webkit-transform: none;
        transform: none;
        border-radius: 3px;
        .skew-main {
          -webkit-transform: none;
          transform: none;
          color: #fff;
          background-color: #2d8cf0;
          border-color: #2d8cf0;
          border-radius: 3px;
          padding-left: 7px;
        }
      }
    }
  }
}
</style>
