@xtdev/xt-miniprogram-ui 1.2.78 → 1.2.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,12 +129,20 @@ Component({
129
129
  onDelete(e) {
130
130
  const url = e.currentTarget.dataset.url;
131
131
  const index = e.currentTarget.dataset.index;
132
- this.properties.fileList.splice(index, 1);
133
- this.triggerEvent('delete', {
134
- fileList: this.properties.fileList,
135
- url,
136
- index,
132
+ let { tempFileList } = this.properties;
133
+ // 判断删除的本地临时文件还是后台图片
134
+ tempFileList.splice(index, 1);
135
+ this.setData({
136
+ tempFileList,
137
137
  });
138
+ if (!url.startsWith('http://tmp')) {
139
+ const fileList = tempFileList.map(item => item.url);
140
+ this.triggerEvent('delete', {
141
+ fileList,
142
+ url,
143
+ index,
144
+ });
145
+ }
138
146
  },
139
147
  // 上传成功
140
148
  onUploadSuccess(files, url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtdev/xt-miniprogram-ui",
3
- "version": "1.2.78",
3
+ "version": "1.2.79",
4
4
  "description": "",
5
5
  "miniprogram": "libs",
6
6
  "publishConfig": {