<template>
  <view class="info">
    <view class="title" v-if="data.title">{{ data.title }}</view>
    <view class="process" v-if="data.process">
      <uv-parse :content="data.process"></uv-parse>
    </view>
    <view class="content" v-if="data.shortTitle">
      {{ data.shortTitle || '' }}
    </view>
    <view class="flex tag" v-if="data.tags">
      <view class="tag-item" v-for="(item, index) in data.tags" :key="index">
        {{ item }}
      </view>
    </view>
    <view class="btn">
      <image class="btn-img" src="@/static/image/icon-detail.png" mode="widthFix"></image>
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      data: {
        type: Object,
        default() {
          return {}
        }
      }
    }
  }
</script>

<style scoped lang="scss">
  .info {
    padding: 30rpx 24rpx 24rpx 24rpx;
    .title {
      font-size: 32rpx;
      font-weight: 700;
      color: #6851A7;
    }

    .process {
      margin-top: 7rpx;
      display: inline-block;
      font-size: 0;
      color: #FFFFFF;
      padding: 3rpx 16rpx;
      background: #6851A7;
      border-radius: 13rpx;
    }

    .content {
      margin-top: 24rpx;
      font-size: 18rpx;
      font-weight: 500;
      color: #3E3A39;
    }

    .tag {
      margin-top: 16rpx;
      justify-content: flex-start;
      flex-wrap: wrap;
      column-gap: 12rpx;
      row-gap: 8rpx;

      &-item {
        padding: 4rpx 8rpx;
        font-size: 16rpx;
        font-weight: 700;
        color: #FFFFFF;
        background: rgba($color: #6851A7, $alpha: 0.59);
        border-radius: 10rpx;
      }
    }

    .btn {
      margin-top: 16rpx;
      width: 190rpx;
      height: auto;
      &-img {
        width: 100%;
        height: auto;
      }
    }
  }
</style>