Skip to content

Commit

Permalink
Merge pull request #350 from wanbing/dev_wanbing
Browse files Browse the repository at this point in the history
bindFunctionOf params bugFix
  • Loading branch information
wanbing authored Sep 21, 2023
2 parents b238588 + d134db0 commit c853f88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fair/lib/src/internal/bind_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,16 @@ class BindingData {
return ([props]) {
var arguments = [];
if (props != null) {
arguments.addAll(props);
arguments.add(props);
}
if (args != null) {
arguments.addAll(args);
}
_functions?['runtimeInvokeMethod']?.call(rFuncName, arguments);
_functions?['runtimeInvokeMethod']?.call(rFuncName, true, arguments);
};
} else {
return ([props]) =>
_functions?['runtimeInvokeMethod']?.call(funcName, props);
_functions?['runtimeInvokeMethod']?.call(funcName, false, props);
}
} else {
return _functions?[funcName];
Expand Down
8 changes: 6 additions & 2 deletions fair/lib/src/runtime/runtime_fair_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ abstract class RuntimeFairDelegate {
}

void bindBaseFunc() {
_bindFunctionsMap['runtimeInvokeMethod'] = (funcName, [props]) {
_bindFunctionsMap['runtimeInvokeMethod'] = (funcName, isMultiParams, [props]) {
var arguments;
if (props != null) {
arguments = [];
arguments.addAll(props);
if (isMultiParams) {
arguments.addAll(props);
} else {
arguments.add(props);
}
}
return runtime?.invokeMethod(pageName, funcName, arguments);
};
Expand Down

0 comments on commit c853f88

Please sign in to comment.