提交 8713a0ab 编写于 作者: Q qiang

fix: 修复 app-v3 uni.previewImage longPressActions 参数无效的问题

上级 af39305e
import {
onMethod,
invokeMethod
} from '../../platform'
const longPressActionsCallbackId = 'longPressActionsCallback'
let longPressActions = {}
onMethod(longPressActionsCallbackId, function (res) {
const errMsg = res.errMsg || ''
if (new RegExp('\\:\\s*fail').test(errMsg)) {
longPressActions.fail && longPressActions.fail(res)
} else {
longPressActions.success && longPressActions.success(res)
}
longPressActions.complete && longPressActions.complete(res)
})
export function previewImage (args = {}) {
longPressActions = args.longPressActions || {}
if (longPressActions.success || longPressActions.fail || longPressActions.complete) {
longPressActions.callbackId = longPressActionsCallbackId
}
return invokeMethod('previewImagePlus', args)
}
......@@ -6,7 +6,7 @@ import {
publish
} from '../../bridge'
export function previewImage ({
export function previewImagePlus ({
current = 0,
background = '#000000',
indicator = 'number',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册