<template>
  <div>
    <informationEntry :patentNo="patentNo" :projectId="projectId" :reportType="reportType" :isSave="isSave" :isFormEdit="isEdit" @handleEdit="handleEdit">
      <div  slot="save" >
        <el-button v-if="isEdit" type="primary" @click="save">保存</el-button>
        <el-button v-else @click="edit">编辑</el-button>
      </div>
      <div  slot="edit" >
        
      </div>
    </informationEntry>
  </div>
</template>

<script>
import informationEntry from './informationEntry.vue';
export default {
  props:['patentNo','projectId','reportType'],
  components: {
    informationEntry
  },
  data() {
    return {
      isSave: false,
      isEdit:false
    }
  },
  mounted() {

  },
  methods: {
    handleEdit(val) {
      this.isEdit=val
    },
    edit() {
      this.isEdit = !this.isEdit
    },
    save() {
      this.isSave = !this.isSave
    },
  },
}
</script>

<style lang="scss" scoped></style>