样式修改

This commit is contained in:
董宏凯 committed 2026-05-28 17:14:01 +08:00
1 parent 23b9d401b7
commit 7548620683
433 files changed
+61042 -27

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import utils from '../utils.js';
const callbackify = (fn, reducer) => {
return utils.isAsyncFn(fn)
? function (...args) {
const cb = args.pop();
fn.apply(this, args).then((value) => {
try {
reducer ? cb(null, ...reducer(value)) : cb(null, value);
} catch (err) {
cb(err);
}
}, cb);
}
: fn;
};
export default callbackify;