<template>
  <div>
    <el-dialog title="维修建议" :visible.sync="dialogVisible" width="40%" v-dialogDrag append-to-body>
      <el-input type="textarea" v-model="repairAdvice" :autosize="{ minRows: 5, maxRows: 10}"/>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="handleOK">确 定</el-button>
        <el-button @click="dialogVisible = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "RepairAdvice",
  props:{
    value:{
      type: String,
      default: ""
    }
  },
  watch:{
    value(val){
      this.repairAdvice = val
    }
  },
  data() {
    return {
      dialogVisible: false,
      repairAdvice: null
    }
  },
  methods: {
    open(){
      this.dialogVisible = true
    },
    handleOK(){
      this.$emit("input", this.repairAdvice)
      this.dialogVisible = false
    }
  }
}
</script>

<style scoped lang="scss">

</style>
