mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-29 06:06:52 +08:00
fix(ios): fix ui function callback error
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -135,7 +135,10 @@ Hippy.document = {
|
||||
},
|
||||
callUIFunction(id, name, param, cb) {
|
||||
global.ConsoleModule.debug(`callUIFunction id = ${id}, name = ${name}, param = ${JSON.stringify(param)}`);
|
||||
UIManagerModule.CallUIFunction(id, name, param, cb);
|
||||
const newcb = function (arr) {
|
||||
cb.apply(null, arr);
|
||||
};
|
||||
UIManagerModule.CallUIFunction(id, name, param, newcb);
|
||||
},
|
||||
sendRenderError(error) {
|
||||
if (error) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -74,7 +74,9 @@ void NativeRenderManager::CallFunction(std::weak_ptr<DomNode> dom_node, const st
|
||||
if (node) {
|
||||
DomValue dom_value;
|
||||
param.ToObject(dom_value);
|
||||
// [uiManager_ dispatchFunction:name viewName:node->GetViewName() viewTag:node->GetId() params:dom_value callback:cb];
|
||||
[uiManager_ dispatchFunction:name viewName:node->GetViewName()
|
||||
viewTag:node->GetId() params:dom_value
|
||||
callback:node->GetCallback(name, cb)];
|
||||
}
|
||||
EndBatch();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ using DomArgument = hippy::DomArgument;
|
||||
@implementation NSArray (DomArgument)
|
||||
|
||||
- (DomValue)toDomValue {
|
||||
DomValue::DomValueArrayType array([self count]);
|
||||
DomValue::DomValueArrayType array;
|
||||
for (NSObject *obj in self) {
|
||||
array.push_back([obj toDomValue]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user