hy-app 0.7.1 → 0.7.3
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/README.md +17 -1
- package/attributes.json +1 -1
- package/components/hy-list/hy-list.vue +360 -228
- package/components/hy-list/index.scss +0 -1
- package/components/hy-list/props.ts +69 -69
- package/components/hy-modal/props.ts +1 -1
- package/components/hy-modal/typing.d.ts +52 -16
- package/components/hy-number-step/hy-number-step.vue +1 -3
- package/libs/common/versionControl.ts +286 -102
- package/package.json +1 -1
- package/web-types.json +1 -1
- package/libs/composables/useTouch.md +0 -237
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import type { PropType } from 'vue'
|
|
2
|
-
|
|
3
|
-
const listProps = {
|
|
4
|
-
/** 数据列表 */
|
|
5
|
-
list: {
|
|
6
|
-
type: Array,
|
|
7
|
-
default: () => []
|
|
8
|
-
},
|
|
9
|
-
/** 容器高度,必须给个高度,否则加载全部数据 */
|
|
10
|
-
containerHeight: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: '100%'
|
|
13
|
-
},
|
|
14
|
-
/** 子容器的高度,必须和内容一致,否则计算有问题 */
|
|
15
|
-
itemHeight: {
|
|
16
|
-
type: [String, Number],
|
|
17
|
-
default: '40px'
|
|
18
|
-
},
|
|
19
|
-
/** 子容器的底部,会计算到容器内 */
|
|
20
|
-
marginBottom: {
|
|
21
|
-
type: [String, Number],
|
|
22
|
-
default: 0
|
|
23
|
-
},
|
|
24
|
-
/** 子容器的内边距 */
|
|
25
|
-
padding: {
|
|
26
|
-
type: [String, Number],
|
|
27
|
-
default: 10
|
|
28
|
-
},
|
|
29
|
-
/** 子容器的圆角,单位px */
|
|
30
|
-
borderRadius: {
|
|
31
|
-
type: [String, Number],
|
|
32
|
-
default: '3px'
|
|
33
|
-
},
|
|
34
|
-
/** 容器背景色 */
|
|
35
|
-
background: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'transparent'
|
|
38
|
-
},
|
|
39
|
-
/** 是否显示边框 */
|
|
40
|
-
border: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false
|
|
43
|
-
},
|
|
44
|
-
/** 展示几列 */
|
|
45
|
-
line: {
|
|
46
|
-
type: Number,
|
|
47
|
-
default: 1
|
|
48
|
-
},
|
|
49
|
-
/** 每一项的唯一标识key */
|
|
50
|
-
keyField: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: 'id'
|
|
53
|
-
},
|
|
54
|
-
/**
|
|
55
|
-
* 加载状态
|
|
56
|
-
* @values loadMore,loading,noMore
|
|
57
|
-
* */
|
|
58
|
-
load: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: 'loadMore'
|
|
61
|
-
},
|
|
62
|
-
/** 显示底部加载状态 */
|
|
63
|
-
showDivider: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: true
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export default listProps
|
|
1
|
+
import type { PropType } from 'vue'
|
|
2
|
+
|
|
3
|
+
const listProps = {
|
|
4
|
+
/** 数据列表 */
|
|
5
|
+
list: {
|
|
6
|
+
type: Array,
|
|
7
|
+
default: () => []
|
|
8
|
+
},
|
|
9
|
+
/** 容器高度,必须给个高度,否则加载全部数据 */
|
|
10
|
+
containerHeight: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '100%'
|
|
13
|
+
},
|
|
14
|
+
/** 子容器的高度,必须和内容一致,否则计算有问题 */
|
|
15
|
+
itemHeight: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
default: '40px'
|
|
18
|
+
},
|
|
19
|
+
/** 子容器的底部,会计算到容器内 */
|
|
20
|
+
marginBottom: {
|
|
21
|
+
type: [String, Number],
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
/** 子容器的内边距 */
|
|
25
|
+
padding: {
|
|
26
|
+
type: [String, Number],
|
|
27
|
+
default: 10
|
|
28
|
+
},
|
|
29
|
+
/** 子容器的圆角,单位px */
|
|
30
|
+
borderRadius: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: '3px'
|
|
33
|
+
},
|
|
34
|
+
/** 容器背景色 */
|
|
35
|
+
background: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'transparent'
|
|
38
|
+
},
|
|
39
|
+
/** 是否显示边框 */
|
|
40
|
+
border: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
/** 展示几列 */
|
|
45
|
+
line: {
|
|
46
|
+
type: Number,
|
|
47
|
+
default: 1
|
|
48
|
+
},
|
|
49
|
+
/** 每一项的唯一标识key */
|
|
50
|
+
keyField: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'id'
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* 加载状态
|
|
56
|
+
* @values loadMore,loading,noMore
|
|
57
|
+
* */
|
|
58
|
+
load: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'loadMore'
|
|
61
|
+
},
|
|
62
|
+
/** 显示底部加载状态 */
|
|
63
|
+
showDivider: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default listProps
|
|
@@ -1,16 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
export interface HyModalProps {
|
|
2
|
+
/** 是否显示模态框 */
|
|
3
|
+
modelValue: boolean
|
|
4
|
+
/** 标题内容 */
|
|
5
|
+
title?: string
|
|
6
|
+
/** 模态框内容 */
|
|
7
|
+
content?: string
|
|
8
|
+
/** 确认按钮的文字 */
|
|
9
|
+
confirmText?: string
|
|
10
|
+
/** 取消按钮的文字 */
|
|
11
|
+
cancelText?: string
|
|
12
|
+
/** 是否显示确认按钮 */
|
|
13
|
+
showConfirmButton?: boolean
|
|
14
|
+
/** 是否显示取消按钮 */
|
|
15
|
+
showCancelButton?: boolean
|
|
16
|
+
/** 确认按钮的颜色 */
|
|
17
|
+
confirmColor?: string
|
|
18
|
+
/** 取消按钮的颜色 */
|
|
19
|
+
cancelColor?: string
|
|
20
|
+
/** 对调确认和取消的位置 */
|
|
21
|
+
buttonReverse?: boolean
|
|
22
|
+
/** 是否开启缩放模式 */
|
|
23
|
+
zoom?: boolean
|
|
24
|
+
/** 弹窗的圆角 */
|
|
25
|
+
round?: string | number
|
|
26
|
+
/** 点击确认按钮自动关闭 */
|
|
27
|
+
autoClose?: boolean
|
|
28
|
+
/** 加载按钮 */
|
|
29
|
+
loading?: boolean
|
|
30
|
+
/** 是否允许点击遮罩关闭Modal */
|
|
31
|
+
closeOnClickOverlay?: boolean
|
|
32
|
+
/** 往上偏移的值 */
|
|
33
|
+
negativeTop?: number
|
|
34
|
+
/** modal宽度 */
|
|
35
|
+
width?: string | number
|
|
36
|
+
/** 确认按钮的样式 */
|
|
37
|
+
confirmButtonShape?: 'circle' | 'square'
|
|
38
|
+
/** 文案对齐方式 */
|
|
39
|
+
contentTextAlign?: 'left' | 'center' | 'right'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface IModalEmits {
|
|
43
|
+
/** 点击确认按钮时触发 */
|
|
44
|
+
(e: 'confirm'): void
|
|
45
|
+
/** 点击取消按钮时触发 */
|
|
46
|
+
(e: 'cancel'): void
|
|
47
|
+
/** 点击遮罩关闭时触发 */
|
|
48
|
+
(e: 'close'): void
|
|
49
|
+
/** 更新值触发 */
|
|
50
|
+
(e: 'update:modelValue', show: boolean): void
|
|
51
|
+
(e: 'update:loading', show: boolean): void
|
|
52
|
+
}
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
v-if="showPlus && $slots.plus"
|
|
93
93
|
@touchend.stop="onClearTimeout"
|
|
94
94
|
>
|
|
95
|
-
<slot name="plus" />
|
|
95
|
+
<slot name="plus" :disabled="isDisabled('plus')" />
|
|
96
96
|
</view>
|
|
97
97
|
<view
|
|
98
98
|
v-else-if="showPlus"
|
|
@@ -175,7 +175,6 @@ const format = (value: number | string): number => {
|
|
|
175
175
|
// 对比最大最小值,取在min和max之间的值
|
|
176
176
|
value = Math.max(Math.min(props.max, value), props.min)
|
|
177
177
|
// 如果设定了最大的小数位数,使用toFixed去进行格式化
|
|
178
|
-
console.log(value, 111)
|
|
179
178
|
if (props.decimalLength !== null) {
|
|
180
179
|
value = parseFloat(value.toFixed(props.decimalLength))
|
|
181
180
|
}
|
|
@@ -197,7 +196,6 @@ watch(
|
|
|
197
196
|
if (newValue !== currentValue.value) {
|
|
198
197
|
currentValue.value = format(props.modelValue)
|
|
199
198
|
}
|
|
200
|
-
console.log(currentValue.value)
|
|
201
199
|
},
|
|
202
200
|
{ immediate: true }
|
|
203
201
|
)
|
|
@@ -1,102 +1,286 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
1
|
+
export interface UpdateVersionOptions {
|
|
2
|
+
/** 最新版本号 */
|
|
3
|
+
version: string
|
|
4
|
+
/** 更新内容 */
|
|
5
|
+
description: string
|
|
6
|
+
/** 下载地址 */
|
|
7
|
+
url: string
|
|
8
|
+
/** 是否强制更新 */
|
|
9
|
+
force?: boolean
|
|
10
|
+
/** iOS AppStore地址 */
|
|
11
|
+
iosStoreUrl?: string
|
|
12
|
+
/** 下载进度 */
|
|
13
|
+
onProgress?: (progress: OnProgressDownloadResult) => void
|
|
14
|
+
/** 更新前回调 */
|
|
15
|
+
beforeUpdate?: (version: string) => boolean | void
|
|
16
|
+
/** 更新成功 */
|
|
17
|
+
onSuccess?: () => void
|
|
18
|
+
/** 更新失败 */
|
|
19
|
+
onFail?: (error: string) => void
|
|
20
|
+
/** 点击确认回调 */
|
|
21
|
+
onConfirm?: () => void
|
|
22
|
+
/** 点击取消回调 */
|
|
23
|
+
onCancel?: () => void
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const appInit = {
|
|
27
|
+
/**
|
|
28
|
+
* 检查更新
|
|
29
|
+
*/
|
|
30
|
+
updateVersion(options: UpdateVersionOptions) {
|
|
31
|
+
const {
|
|
32
|
+
version,
|
|
33
|
+
description,
|
|
34
|
+
url,
|
|
35
|
+
force = false,
|
|
36
|
+
iosStoreUrl,
|
|
37
|
+
onProgress,
|
|
38
|
+
beforeUpdate,
|
|
39
|
+
onSuccess,
|
|
40
|
+
onFail,
|
|
41
|
+
onConfirm,
|
|
42
|
+
onCancel
|
|
43
|
+
} = options
|
|
44
|
+
|
|
45
|
+
if (!version) {
|
|
46
|
+
console.error('version不能为空')
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
|
|
51
|
+
const localVersion = widgetInfo.version
|
|
52
|
+
const compareResult = this.compareVersion(version, localVersion)
|
|
53
|
+
if (compareResult !== 1) {
|
|
54
|
+
return uni.showToast({ title: '已是最新版本', icon: 'none' })
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (typeof beforeUpdate === 'function') {
|
|
58
|
+
const result = beforeUpdate(version)
|
|
59
|
+
|
|
60
|
+
if (result === false) {
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
uni.showModal({
|
|
66
|
+
title: `发现新版本 V${version}`,
|
|
67
|
+
content: description,
|
|
68
|
+
showCancel: !force,
|
|
69
|
+
confirmText: '立即更新',
|
|
70
|
+
success: (res) => {
|
|
71
|
+
if (!res.confirm) {
|
|
72
|
+
if (typeof onCancel === 'function') {
|
|
73
|
+
onCancel()
|
|
74
|
+
}
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (typeof onConfirm === 'function') {
|
|
79
|
+
onConfirm()
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const platform = uni.getSystemInfoSync().platform
|
|
83
|
+
|
|
84
|
+
// iOS
|
|
85
|
+
if (platform === 'ios') {
|
|
86
|
+
if (iosStoreUrl) {
|
|
87
|
+
plus.runtime.openURL(iosStoreUrl)
|
|
88
|
+
} else {
|
|
89
|
+
uni.showToast({
|
|
90
|
+
title: '请配置AppStore地址',
|
|
91
|
+
icon: 'none'
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Android
|
|
98
|
+
this.downloadApp(url, {
|
|
99
|
+
onProgress,
|
|
100
|
+
onSuccess,
|
|
101
|
+
onFail
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* 比较版本号
|
|
110
|
+
* @param serverVersion 服务端版本
|
|
111
|
+
* @param localVersion 本地版本
|
|
112
|
+
* @returns
|
|
113
|
+
* 1: 服务端版本更高
|
|
114
|
+
* 0: 版本相同
|
|
115
|
+
* -1: 本地版本更高
|
|
116
|
+
*/
|
|
117
|
+
compareVersion(serverVersion: string, localVersion: string) {
|
|
118
|
+
if (!serverVersion || !localVersion) return 0
|
|
119
|
+
const v1 = serverVersion.split('.').map(Number)
|
|
120
|
+
const v2 = localVersion.split('.').map(Number)
|
|
121
|
+
const length = Math.max(v1.length, v2.length)
|
|
122
|
+
|
|
123
|
+
for (let i = 0; i < length; i++) {
|
|
124
|
+
const n1 = v1[i] || 0
|
|
125
|
+
const n2 = v2[i] || 0
|
|
126
|
+
|
|
127
|
+
if (n1 > n2) {
|
|
128
|
+
return 1
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (n1 < n2) {
|
|
132
|
+
return -1
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return 0
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* 下载更新包
|
|
141
|
+
*/
|
|
142
|
+
downloadApp(
|
|
143
|
+
downloadUrl: string,
|
|
144
|
+
callbacks?: {
|
|
145
|
+
onProgress?: (progress: OnProgressDownloadResult) => void
|
|
146
|
+
onSuccess?: () => void
|
|
147
|
+
onFail?: (error: string) => void
|
|
148
|
+
}
|
|
149
|
+
) {
|
|
150
|
+
const { onProgress, onSuccess, onFail } = callbacks || {}
|
|
151
|
+
|
|
152
|
+
if (!downloadUrl) {
|
|
153
|
+
const msg = '下载地址不能为空'
|
|
154
|
+
|
|
155
|
+
uni.showToast({
|
|
156
|
+
title: msg,
|
|
157
|
+
icon: 'none'
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
onFail?.(msg)
|
|
161
|
+
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const downloadTask = uni.downloadFile({
|
|
166
|
+
url: downloadUrl,
|
|
167
|
+
|
|
168
|
+
success: (res) => {
|
|
169
|
+
if (res.statusCode !== 200) {
|
|
170
|
+
const msg = '下载失败'
|
|
171
|
+
|
|
172
|
+
uni.showToast({
|
|
173
|
+
title: msg,
|
|
174
|
+
icon: 'none'
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
onFail?.(msg)
|
|
178
|
+
|
|
179
|
+
return
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
this.installPackage(res.tempFilePath, downloadUrl, onSuccess, onFail)
|
|
183
|
+
},
|
|
184
|
+
|
|
185
|
+
fail: (err) => {
|
|
186
|
+
console.error('下载失败', err)
|
|
187
|
+
|
|
188
|
+
const msg = '下载失败'
|
|
189
|
+
|
|
190
|
+
uni.showToast({
|
|
191
|
+
title: msg,
|
|
192
|
+
icon: 'none'
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
onFail?.(msg)
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
downloadTask.onProgressUpdate((res) => {
|
|
200
|
+
onProgress?.(res)
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* 安装更新包
|
|
206
|
+
*/
|
|
207
|
+
installPackage(
|
|
208
|
+
filePath: string,
|
|
209
|
+
downloadUrl: string,
|
|
210
|
+
onSuccess?: () => void,
|
|
211
|
+
onFail?: (error: string) => void
|
|
212
|
+
) {
|
|
213
|
+
const isWgt = downloadUrl.toLowerCase().endsWith('.wgt')
|
|
214
|
+
|
|
215
|
+
const isApk = downloadUrl.toLowerCase().endsWith('.apk')
|
|
216
|
+
|
|
217
|
+
// WGT热更新
|
|
218
|
+
if (isWgt) {
|
|
219
|
+
plus.runtime.install(
|
|
220
|
+
filePath,
|
|
221
|
+
{
|
|
222
|
+
force: false
|
|
223
|
+
},
|
|
224
|
+
() => {
|
|
225
|
+
uni.showToast({
|
|
226
|
+
title: '更新成功'
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
onSuccess?.()
|
|
230
|
+
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
plus.runtime.restart()
|
|
233
|
+
}, 1000)
|
|
234
|
+
},
|
|
235
|
+
(err) => {
|
|
236
|
+
console.error('安装失败', err)
|
|
237
|
+
|
|
238
|
+
const msg = `安装失败:${err.message}`
|
|
239
|
+
|
|
240
|
+
uni.showToast({
|
|
241
|
+
title: msg,
|
|
242
|
+
icon: 'none'
|
|
243
|
+
})
|
|
244
|
+
|
|
245
|
+
onFail?.(msg)
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// APK整包更新
|
|
253
|
+
if (isApk) {
|
|
254
|
+
plus.runtime.openFile(
|
|
255
|
+
filePath,
|
|
256
|
+
{},
|
|
257
|
+
() => {
|
|
258
|
+
onSuccess?.()
|
|
259
|
+
},
|
|
260
|
+
(err) => {
|
|
261
|
+
console.error('APK安装失败', err)
|
|
262
|
+
|
|
263
|
+
const msg = 'APK安装失败'
|
|
264
|
+
|
|
265
|
+
uni.showToast({
|
|
266
|
+
title: msg,
|
|
267
|
+
icon: 'none'
|
|
268
|
+
})
|
|
269
|
+
|
|
270
|
+
onFail?.(msg)
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
return
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const msg = '未知安装包格式'
|
|
278
|
+
|
|
279
|
+
uni.showToast({
|
|
280
|
+
title: msg,
|
|
281
|
+
icon: 'none'
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
onFail?.(msg)
|
|
285
|
+
}
|
|
286
|
+
}
|