diff --git a/src/components/uploadBtn/components/FileList.vue b/src/components/uploadBtn/components/FileList.vue
index 8f07843..db7751a 100644
--- a/src/components/uploadBtn/components/FileList.vue
+++ b/src/components/uploadBtn/components/FileList.vue
@@ -8,7 +8,7 @@
-
+
无
@@ -51,6 +51,10 @@ export default {
type: Array,
default: () => [],
},
+ detailMode: {
+ type: Boolean,
+ default: false
+ }
},
data() {
return {
diff --git a/src/components/uploadBtn/index.vue b/src/components/uploadBtn/index.vue
index 87c2b8a..c78fc85 100644
--- a/src/components/uploadBtn/index.vue
+++ b/src/components/uploadBtn/index.vue
@@ -11,15 +11,20 @@
>
{{ buttonText }}
+
+ {{ tips.hint }}
+
+
+
-
+
@@ -81,8 +86,21 @@ export default {
},
methods: {
handleRemoveFile(fileId) {
- this.uploadedFileList = this.uploadedFileList.filter((file) => file.id.toString() !== fileId.toString());
- this.$emit("update-file-list", this.uploadedFileList);
+ console.log("[UploadBtn] handleRemoveFile", fileId);
+ this.$confirm("确定删除此文件?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ this.uploadedFileList = this.uploadedFileList.filter((file) => file.id.toString() !== fileId.toString());
+ this.$emit("update-file-list", this.uploadedFileList);
+ this.$message({
+ type: "success",
+ message: "删除成功!",
+ });
+ })
+ .catch(() => {});
},
handleUploadSuccess(response, file, fileList) {
@@ -96,12 +114,20 @@ export default {
url: uploadedFile.fileUrl,
typeCode: file.typeCode,
};
+
+ /** 通知 */
+ this.$notify({
+ title: "成功",
+ message: "上传成功",
+ type: "success",
+ });
+
this.uploadedFileList.push(fileItem);
this.$emit("update-file-list", this.uploadedFileList);
- this.showMsg = true;
- setTimeout(() => {
- this.showMsg = false;
- }, 3000);
+ // this.showMsg = true;
+ // setTimeout(() => {
+ // this.showMsg = false;
+ // }, 3000);
}
},
},