<template>
  <div class='full-width flex flex-center text-center border-bottom padding-top padding-bottom'>
    <div class='flex-child-average text-left'>{{item.title}}</div>
    <div class='flex-child-average'>{{item.updateTime}}</div>
    <div class='flex-child-average'>
      <el-radio-group v-model="check" @change='change'>
        <el-radio label="3" size="large">不可查看</el-radio>
        <el-radio label="1" size="large">可见</el-radio>
        <el-radio label="2" size="large">可编辑</el-radio>
      </el-radio-group>
    </div>
  </div>
</template>

<script>
export default {
  name: 'item1',
  props: {
    data: Object,
    index: Number,
    check: {
      type: String,
      default: ''
    }
  },
  watch: {
    data: {
      handler (val) {
        this.item = val
      },
      immediate: true
    }
  },
  data () {
    return {
      item: null
    }
  },
  methods: {
    change (res) {
      this.item.type = res
      this.$emit('change', { ...this.item, index: this.index })
    }
  }
}
</script>

<style scoped>

</style>
