mali-applet-ui 1.1.85 → 1.1.87

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.
@@ -187,7 +187,7 @@ export default {
187
187
  limitCount: Number,
188
188
  limitSize: {
189
189
  type: Number,
190
- default: 20480
190
+ default: Number(globalStore.upload?.limitSize || 20480)
191
191
  },
192
192
  className: String,
193
193
  mediatype: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.85",
3
+ "version": "1.1.87",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",
@@ -20,9 +20,15 @@ export interface MlUtilsCore extends XEUtilsMethods {
20
20
 
21
21
  getFileSuffix(filename: string): string
22
22
  getFileName(filename: string): string
23
+ getAllPreviewTypes(): string[]
24
+ getFilePreviewTypes(): string[]
25
+ getImagePreviewTypes(): string[]
26
+ openFileByUrl(url: string, name?: string, options?: {
27
+ showMsg?: boolean
28
+ }): Promise<{ filePath: string }>
23
29
  saveFileByUrl (url: string, name?: string, options?: {
24
30
  showMsg?: boolean
25
- }): Promise<{ savedFilePath: string }>
31
+ }): Promise<{ filePath: string }>
26
32
 
27
33
  toNumMoneyToChinese (money: any): string
28
34
  toAmountString (value: any, fixed?: number): string
package/utils/file.js CHANGED
@@ -23,7 +23,7 @@ export function getFilePreviewTypes () {
23
23
  }
24
24
 
25
25
  export function getImagePreviewTypes () {
26
- return ['png', 'jpg', 'gif']
26
+ return ['png', 'jpg', 'gif', 'jpeg']
27
27
  }
28
28
 
29
29
  /**
@@ -49,7 +49,7 @@ export function openFileByUrl (fileUrl, fileName, options) {
49
49
  showMenu: true,
50
50
  success () {
51
51
  resolve({
52
- savedFilePath: downRes.filePath || downRes.tempFilePath
52
+ filePath: downRes.filePath || downRes.tempFilePath
53
53
  })
54
54
  },
55
55
  fail (e) {
@@ -63,6 +63,14 @@ export function openFileByUrl (fileUrl, fileName, options) {
63
63
  ],
64
64
  longPressActions: {
65
65
  itemList: ['保存图片']
66
+ },
67
+ success () {
68
+ resolve({
69
+ filePath: downRes.filePath || downRes.tempFilePath
70
+ })
71
+ },
72
+ fail (e) {
73
+ reject(e)
66
74
  }
67
75
  })
68
76
  } else {
@@ -104,7 +112,7 @@ export function saveFileByUrl (fileUrl, fileName, options) {
104
112
  })
105
113
  }
106
114
  resolve({
107
- savedFilePath: res.savedFilePath
115
+ filePath: res.savedFilePath
108
116
  })
109
117
  }
110
118
  })