<template>
  <span style="color:#999999;cursor:pointer" @click="handle">删除</span>
</template>

<script>
import removeFile from '@/utils/removeFile'
export default {
  name: '',
  data() {
    return {
    };
  },
  computed: {
  },
  watch: {
  },
  props: { obj: Object, deleteFile: Function },
  methods: {
    //删除文件
    handle() {
      removeFile.removeFileList([this.obj]).then(res => {
        if (res == 1) {
          this.$notify({
            title: '提示',
            message: '删除成功',
            type: 'success'
          })
          this.$emit("deleteFile", this.obj.linksid)
          // this.$parent.$parent.$parent.$parent.uploadCacheData.attinfos.splice(this.$parent.$parent.$parent.$parent.uploadCacheData.attinfos.filter(item => this.data == item),1)
        } else {
          this.$notify({
            title: '提示',
            message: '删除失败',
            type: 'error'
          })
        }
      })
    },
  },
};
</script>

<style scoped>
</style>
