mali-applet-ui 0.2.72 → 0.2.74
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-picker-drawer/ml-picker-drawer.vue +22 -14
- 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
|
@@ -3,19 +3,13 @@
|
|
|
3
3
|
<template #header>
|
|
4
4
|
<view class="ml-picker-drawer-header">
|
|
5
5
|
<view class="ml-picker-drawer-title">
|
|
6
|
-
<ml-
|
|
7
|
-
<ml-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<ml-col shrink>
|
|
14
|
-
<view class="ml-picker-drawer-confirm-btn">
|
|
15
|
-
<ml-button type="text" @click="confirmEvent">确定</ml-button>
|
|
16
|
-
</view>
|
|
17
|
-
</ml-col>
|
|
18
|
-
</ml-row>
|
|
6
|
+
<view class="ml-picker-drawer-close-btn" @click="cancelEvent">
|
|
7
|
+
<ml-icon name="close" />
|
|
8
|
+
</view>
|
|
9
|
+
<view class="ml-picker-drawer-title-content">{{ title }}</view>
|
|
10
|
+
<view class="ml-picker-drawer-confirm-btn">
|
|
11
|
+
<ml-button type="text" status="primary" @click="confirmEvent">确定</ml-button>
|
|
12
|
+
</view>
|
|
19
13
|
</view>
|
|
20
14
|
<view class="ml-picker-drawer-top">
|
|
21
15
|
<slot name="top"></slot>
|
|
@@ -87,18 +81,32 @@ export default {
|
|
|
87
81
|
display: block;
|
|
88
82
|
width: 100%;
|
|
89
83
|
.ml-picker-drawer-title {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: row;
|
|
90
86
|
height: 80rpx;
|
|
91
87
|
line-height: 80rpx;
|
|
88
|
+
overflow: hidden;
|
|
92
89
|
}
|
|
93
90
|
.ml-picker-drawer-close-btn {
|
|
91
|
+
flex-shrink: 0;
|
|
94
92
|
width: 80rpx;
|
|
95
93
|
text-align: center;
|
|
94
|
+
padding-right: 20rpx;
|
|
95
|
+
font-size: 28rpx;
|
|
96
96
|
// #ifdef H5
|
|
97
97
|
cursor: pointer;
|
|
98
98
|
// #endif
|
|
99
99
|
}
|
|
100
|
+
.ml-picker-drawer-title-content {
|
|
101
|
+
flex-grow: 1;
|
|
102
|
+
text-align: center;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
}
|
|
100
107
|
.ml-picker-drawer-confirm-btn {
|
|
101
|
-
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
padding-left: 30rpx;
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
112
|
</style>
|
|
@@ -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
|
},
|