<template>
  <section class="dm-form__wrap">
    <h3 class="dm-title__label">分享设置</h3>
    <el-form-item label="分享到朋友圈" class="width50 is-required">
      <el-radio-group v-model="shareGroup">
        <el-radio :label="1">可分享</el-radio>
        <el-radio :label="2">不可分享</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="分享给朋友" class="width50 is-required">
      <el-radio-group v-model="shareFriend">
        <el-radio :label="1">可分享</el-radio>
        <el-radio :label="2">不可分享</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="分享图" class="width50 is-required">
      <dm-upload-avatar :model.sync="shareImg" fileType="fileShare" label="上传图片" tips="图片建议尺寸：高度200px*200px" :disabled="isInfo"></dm-upload-avatar>
    </el-form-item>
    <el-form-item label="分享标题" prop="shareTitle" class="width50">
      <dm-input v-model="shareTitle" class="w400" placeholder="请输入分享标题" :disabled="isInfo" :maxlength="20"></dm-input>
    </el-form-item>
    <el-form-item label="分享描述" prop="shareTextInfo" class="width50">
      <dm-input type="textarea" class="w400" :rows="4" v-model="shareTextInfo" placeholder="请输入分享描述" :disabled="isInfo" :maxlength="50"></dm-input>
    </el-form-item>
  </section>
</template>


<script>
export default {
  props:{
    shareGroup: {
      type: Number,
      default: 1
    },
    shareFriend: {
      type: Number,
      default: 1
    },
    shareImg: {
      type: Object,
      default() {
        return {
          imgUrl: '',
          code: ''
        }
      }
    },
    shareTitle: {
      type: String,
      default: ''
    },
    shareTextInfo : {
      type:String,
      default:''
    },
    isInfo: {
      type: Boolean,
      default:false
    }
  },
  watch: {
    childData : {
      handler(val) {

      },
      deep:true
    }
  }
}
</script>
