Skip to content

补充web下previewImage的current#2117

Merged
hiyuki merged 14 commits intomasterfrom
feat-preview-image-add-current
Aug 27, 2025
Merged

补充web下previewImage的current#2117
hiyuki merged 14 commits intomasterfrom
feat-preview-image-add-current

Conversation

@wangxiaokou
Copy link
Collaborator

No description provided.

// 不需要转换 or 用户已定义回调,则不处理
if (!promisifyFilter(key)) {
if (!promisifyFilter(key)) {
result[key] = function (...args) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result[key] = listObj[key].bind(ENV_OBJ)

const originSuccess = obj.success
const originFail = obj.fail
if (originSuccess || originFail) {
warn(`The ${key} method has been promisified, please do not use success or fail callback. If you are certain that you want to handle the callback with options, please set usePromise to true. `)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [${key}] method has been promisified, please use .then or .catch to handle the result, if you need to handle the result with options.success/fail, please set options.usePromise to false to close the promisify in this call temporarily.

} else {
result[key] = function (...args) {
const obj = args[0] || {}
const { usePromise = true } = obj
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不需要加这个默认值

@hiyuki hiyuki merged commit 688919d into master Aug 27, 2025
6 checks passed
@hiyuki hiyuki deleted the feat-preview-image-add-current branch August 27, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants