mali-applet-ui 1.0.128 → 1.0.129
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-upload" :class="[className || '', {'is-loading': loading}]">
|
|
3
3
|
<!-- 上传图片 -->
|
|
4
|
-
<view v-if="mediatype === 'image'" class="ml-upload-image-list">
|
|
4
|
+
<view v-if="mediatype === 'image' || platformEnv.isDDMP" class="ml-upload-image-list">
|
|
5
5
|
<view class="ml-upload-image-item" v-for="(item, index) in fileList" :key="index">
|
|
6
6
|
<image class="ml-upload-image-img" mode="aspectFill" :src="getThumbnailFileUrl(item)" @tap="previewImageEvent(item, index)"></image>
|
|
7
7
|
<view v-if="!isFromReadonly" class="ml-upload-image-del-btn" @tap="removeEvent(item)">
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
<script>
|
|
69
69
|
import globalStore from '../../../config/store'
|
|
70
|
-
import { getFileSuffix, getFileName } from '../../../utils'
|
|
70
|
+
import { getPlatformEnv, getFileSuffix, getFileName } from '../../../utils'
|
|
71
71
|
|
|
72
72
|
function normalizeChooseAndUploadFileRes (res, fileType) {
|
|
73
73
|
res.tempFiles.forEach((item) => {
|
|
@@ -225,7 +225,8 @@ export default {
|
|
|
225
225
|
loading: false,
|
|
226
226
|
fileList: [],
|
|
227
227
|
docsTypes: ['doc', 'xls', 'ppt', 'pdf', 'docx', 'xlsx', 'pptx'],
|
|
228
|
-
imgTypes: ['png', 'jpg', 'gif']
|
|
228
|
+
imgTypes: ['png', 'jpg', 'gif'],
|
|
229
|
+
platformEnv: getPlatformEnv()
|
|
229
230
|
}
|
|
230
231
|
},
|
|
231
232
|
computed: {
|
|
@@ -479,7 +480,8 @@ export default {
|
|
|
479
480
|
return
|
|
480
481
|
}
|
|
481
482
|
let chooseMethod = uploadAllFiles
|
|
482
|
-
|
|
483
|
+
// 钉钉暂时只支持图片
|
|
484
|
+
if (this.mediatype === 'image' || this.platformEnv.isDDMP) {
|
|
483
485
|
chooseMethod = uploadImageFiles
|
|
484
486
|
}
|
|
485
487
|
const uploadMethod = this.uploadFile ? this.uploadFile : (globalStore.upload ? globalStore.upload.uploadFile : null)
|
package/package.json
CHANGED
package/utils/applet.js
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 检查新版本
|
|
3
|
+
*/
|
|
4
|
+
export function checkForUpdate () {
|
|
5
|
+
const updateManager = uni.getUpdateManager()
|
|
6
|
+
updateManager.onCheckForUpdate((res) => {
|
|
7
|
+
console.log('检查版本', res.hasUpdate)
|
|
8
|
+
})
|
|
9
|
+
updateManager.onUpdateReady(() => {
|
|
10
|
+
uni.showModal({
|
|
11
|
+
title: '更新提示',
|
|
12
|
+
content: '新版本已经准备好,是否重启应用?',
|
|
13
|
+
success (res) {
|
|
14
|
+
if (res.confirm) {
|
|
15
|
+
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
16
|
+
updateManager.applyUpdate()
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
/**
|
|
2
24
|
* 当前小程序运行环境
|
|
3
25
|
*/
|