| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 | <template>  <div>    <div class="container">      <div class="title">        <div class="redcolumn"></div>        <div class="container-title">{{ title }}</div>      </div>      <div v-if="showBtn" class="container-foot" @click="open">        <div v-show="show" style="height: 20px">          <span><i class="el-icon-arrow-up" :style="styleIocup"/></span>        </div>        <div v-show="!show" style="height: 20px">          <span><i class="el-icon-arrow-down"/></span>        </div>      </div>    </div>    <div      class="basic-container"      :style="styleName"      :class="{ 'basic-container--block': block }"    >      <el-card class="basic-container__card" style="padding: 0;">        <el-collapse-transition>          <div v-show="show">            <slot></slot>          </div>        </el-collapse-transition>      </el-card>    </div>  </div></template><script>export default {  name: 'basicContainer',  data() {    return {};  },  props: {    radius: {      type: [String, Number],      default: 10    },    background: {      type: String    },    block: {      type: Boolean,      default: false    },    showBtn: {      type: Boolean,      default: true    },    title: {      type: String    },    show: {      type: Boolean,      default: true    },    styleIocup: {      type: String,      default: ''    }  },  methods: {    open() {      this.show = !this.show;      this.$emit('openClose', this.show);    }  },  computed: {    styleName() {      return {        borderRadius: this.setPx(this.radius),        background: this.background      };    }  }};</script><style lang="scss" scoped>.container {  display: flex;  justify-content: space-between;  margin-left: 10px;  margin-right: 10px;  background-color: inherit;  height: 18px;  // padding-bottom: 12px;  vertical-align: middle;  .title {    display: flex;    .redcolumn {      width: 4px;      height: 13px;      background-color: #d6000f;      margin: 3px 4px 0 0;    }    .container-title {      font-size: 12px;      line-height: 20px;      font-family: PingFangSC-Semibold, PingFang SC;      font-weight: 600;      color: #323233;    }  }  .container-foot {    font-size: 16px;    font-weight: 1000;  }}.basic-container {  padding: 5px 6px;  box-sizing: border-box;  &--block {    height: 100%;    .basic-container__card {      height: 100%;    }  }  ::v-deep .el-card .el-card__body {    padding: 5px !important;  }  &__card {    width: 100%;  }  &:first-child {    padding-top: 6px;  }}</style>
 |