mali-applet-ui 1.0.2 → 1.0.4

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.
@@ -117,7 +117,7 @@ export default {
117
117
  loading: false,
118
118
  fileList: [],
119
119
  docsTypes: ['doc', 'xls', 'ppt', 'pdf', 'docx', 'xlsx', 'pptx'],
120
- imgTypes: ['png', 'jpg']
120
+ imgTypes: ['png', 'jpg', 'gif']
121
121
  }
122
122
  },
123
123
  computed: {
@@ -200,7 +200,7 @@ export default {
200
200
  })
201
201
  if (this.urlList && this.urlList.length) {
202
202
  this.isUpdate = true
203
- this.$emit('input', [...this.fileList])
203
+ this.updateModel()
204
204
  }
205
205
  } else {
206
206
  this.fileList = (this.value || []).map(item => {
@@ -211,13 +211,10 @@ export default {
211
211
  },
212
212
  updateModel () {
213
213
  const urlList = this.fileList.map(item => item[this.urlField])
214
+ const value = this.simpleValue ? urlList : this.fileList
214
215
  this.$emit('update:urlList', urlList)
215
- if (this.simpleValue) {
216
- this.$emit('input', urlList)
217
- } else {
218
- this.$emit('input', this.fileList)
219
- }
220
- this.$emit('change', { value: this.simpleValue ? urlList : this.fileList })
216
+ this.$emit('input', value)
217
+ this.$emit('change', { value })
221
218
  },
222
219
  removeEvent (item) {
223
220
  this.fileList = this.fileList.filter(obj => obj.tempPath !== item.tempPath)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",