|
@@ -14,6 +14,9 @@ Component({
|
|
|
},
|
|
|
callBack: {
|
|
|
type: Function
|
|
|
+ },
|
|
|
+ deleteFile: {
|
|
|
+ type: Function
|
|
|
}
|
|
|
},
|
|
|
options: {
|
|
@@ -35,7 +38,18 @@ Component({
|
|
|
const {
|
|
|
item
|
|
|
} = e.currentTarget.dataset;
|
|
|
- if (this.data.butType == '播放') return this.triggerEvent("callBack", item);
|
|
|
+ const that = this;
|
|
|
+ if (this.data.butType == '播放') {
|
|
|
+ this.triggerEvent("callBack", item);
|
|
|
+ } else if (this.data.butType == '删除') {
|
|
|
+ wx.showModal({
|
|
|
+ title: "通知",
|
|
|
+ content: "是否确认删除该附件?",
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) that.triggerEvent("deleteFile", item);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
checkFile(e) {
|
|
|
const {
|