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.
package/package.json
CHANGED
package/types/utils/index.d.ts
CHANGED
|
@@ -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<{
|
|
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
|
-
|
|
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
|
-
|
|
115
|
+
filePath: res.savedFilePath
|
|
108
116
|
})
|
|
109
117
|
}
|
|
110
118
|
})
|