mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-19 16:43:34 -04:00
Update: update the order of parameters for forEach and relevant UT
Signed-off-by: laibo102 <laibo2@huawei.com> Change-Id: Iaa01ec5ca7b8f63e0c68d2a1a4a144a36cd2192c
This commit is contained in:
@@ -1035,10 +1035,10 @@ function addForEachIdFuncParameter(argumentsArray: ts.Expression[]): ts.Identifi
|
||||
ts.factory.createIdentifier(ELMTID),
|
||||
ts.factory.createIdentifier(argumentsArray[0] && argumentsArray[0].getText())
|
||||
);
|
||||
addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMGENFUNCTION));
|
||||
if (argumentsArray[2]) {
|
||||
addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMIDFUNC));
|
||||
}
|
||||
addForEachIdFuncParameterArr.push(ts.factory.createIdentifier(FOREACHITEMGENFUNCTION));
|
||||
return addForEachIdFuncParameterArr;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ exports.expectResult =
|
||||
Text.pop();
|
||||
};
|
||||
const forEachItemIdFunc = item => item.toString();
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemIdFunc, forEachItemGenFunction);
|
||||
this.forEachUpdateFunction(elmtId, this.arr, forEachItemGenFunction, forEachItemIdFunc);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ class Parent extends ViewPU {
|
||||
}
|
||||
};
|
||||
const forEachItemIdFunc = item => item.text;
|
||||
this.forEachUpdateFunction(elmtId, this.models, forEachItemIdFunc, forEachItemGenFunction);
|
||||
this.forEachUpdateFunction(elmtId, this.models, forEachItemGenFunction, forEachItemIdFunc);
|
||||
if (!isInitialRender) {
|
||||
ForEach.pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user