<template>
  <div class="collapse-wrap">
    <div
      class="collapse-title block-title"
      @click="isActive=!isActive">
      {{ title }}

      <div class="fr">
        查看详情
        <i
          class="el-collapse-item__arrow el-icon-arrow-right"
          :class="{'is-active':isActive}"></i>
      </div>
    </div>
    <el-collapse-transition>
      <div
        class="collapse-content"
        v-show="isActive">
        <slot></slot>
      </div>
    </el-collapse-transition>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  data () {
    return {
      isActive: false
    }
  }
}
</script>

<style scoped>
.collapse-title{
    cursor: pointer; margin-bottom: 0;
}
</style>
