mali-applet-ui 0.2.72 → 0.2.73
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.
- package/components/ml-amount-input/ml-amount-input.vue +3 -0
- package/components/ml-input/ml-input.vue +3 -0
- package/components/ml-number-input/ml-number-input.vue +3 -0
- package/components/ml-province-city-picker/ml-province-city-picker.vue +5 -2
- package/components/ml-tabbar/ml-tabbar.vue +1 -1
- package/components/ml-textarea/ml-textarea.vue +0 -1
- package/components/ml-upload/ml-upload.vue +7 -6
- package/package.json +1 -1
|
@@ -87,7 +87,7 @@ export default {
|
|
|
87
87
|
},
|
|
88
88
|
provinceList () {
|
|
89
89
|
if (this.isAll) {
|
|
90
|
-
return [{ name: '全部', code: '' }].concat(provinceCity)
|
|
90
|
+
return [{ name: '全部', code: '', _all: true }].concat(provinceCity)
|
|
91
91
|
}
|
|
92
92
|
return provinceCity
|
|
93
93
|
},
|
|
@@ -137,7 +137,10 @@ export default {
|
|
|
137
137
|
this.closePopup()
|
|
138
138
|
},
|
|
139
139
|
confirmEvent () {
|
|
140
|
-
|
|
140
|
+
let value = [this.selectProvinceValue, this.selectCityValue]
|
|
141
|
+
if (this.isAll && this.selectProvinceItem && this.selectProvinceItem._all) {
|
|
142
|
+
value = ['', '']
|
|
143
|
+
}
|
|
141
144
|
this.$emit('update:province', value[0])
|
|
142
145
|
this.$emit('update:city', value[1])
|
|
143
146
|
this.$emit('input', value)
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<view class="ml-upload-file-info">
|
|
36
36
|
<view class="ml-upload-file-name">{{ item[nameField] }}</view>
|
|
37
37
|
<view class="ml-upload-file-desc">
|
|
38
|
-
<ml-button v-if="
|
|
38
|
+
<ml-button v-if="previewTypes.includes(item[typeField])" status="primary" type="text" @click="previewDocs(item)">预览</ml-button>
|
|
39
39
|
<ml-button status="primary" type="text" @click="downloadEvent(item)">下载</ml-button>
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
@@ -118,6 +118,9 @@ export default {
|
|
|
118
118
|
}
|
|
119
119
|
return this.form ? this.form.readonly : false
|
|
120
120
|
},
|
|
121
|
+
previewTypes () {
|
|
122
|
+
return this.docsTypes.concat(this.imgTypes)
|
|
123
|
+
},
|
|
121
124
|
imageList () {
|
|
122
125
|
return this.value ? this.value.filter(item => this.imgTypes.includes(item[this.typeField])) : []
|
|
123
126
|
},
|
|
@@ -288,13 +291,11 @@ export default {
|
|
|
288
291
|
},
|
|
289
292
|
previewDocs (item) {
|
|
290
293
|
// 仅支持文档和图片
|
|
291
|
-
|
|
292
|
-
const supportImg = this.imgTypes.includes(item[this.typeField])
|
|
293
|
-
if (supportDocs || supportImg) {
|
|
294
|
+
if (previewTypes.includes(item[this.typeField])) {
|
|
294
295
|
uni.downloadFile({
|
|
295
296
|
url: this.getUrl(item),
|
|
296
297
|
success: (downRes) => {
|
|
297
|
-
if (
|
|
298
|
+
if (this.docsTypes.includes(item[this.typeField])) {
|
|
298
299
|
uni.openDocument({
|
|
299
300
|
filePath: downRes.tempFilePath,
|
|
300
301
|
showMenu: true,
|
|
@@ -306,7 +307,7 @@ export default {
|
|
|
306
307
|
})
|
|
307
308
|
}
|
|
308
309
|
})
|
|
309
|
-
} else if (
|
|
310
|
+
} else if (this.imgTypes.includes(item[this.typeField])) {
|
|
310
311
|
this.previewImg(item)
|
|
311
312
|
}
|
|
312
313
|
},
|