diff --git a/arkui/ace_ets_web_dev/AppScope/app.json b/arkui/ace_ets_web_dev/AppScope/app.json index 94d263ab9d2753d8581f3416d8a71f96498811ae..11be5a436922e50eedf1060fcfa630f7efaf5e5a 100644 --- a/arkui/ace_ets_web_dev/AppScope/app.json +++ b/arkui/ace_ets_web_dev/AppScope/app.json @@ -11,10 +11,10 @@ "distributedNotificationEnabled": true, "keepAlive": true, "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, + "minAPIVersion": 10, + "targetAPIVersion": 10, "car": { - "apiCompatibleVersion": 9, + "apiCompatibleVersion": 10, "singleUser": false } } diff --git a/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets b/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets index 8a3b35926fcbd8e30a1f3fa1ea9c5f944dfdb510..c69fc9e305d73419cdf3df47f99d8ce395c9b3f8 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets +++ b/arkui/ace_ets_web_dev/entry/src/main/ets/MainAbility/pages/web.ets @@ -56,6 +56,8 @@ struct Index { @State webVisibility: Visibility = Visibility.Visible @State isProgressFinish:boolean=false @State isHttpErrorReceive:boolean=false + @State isLargeThan:boolean=false + onPageShow(){ let valueChangeEvent={ eventId:10, @@ -414,7 +416,7 @@ struct Index { case "emitOnHttpErrorReceive":{ this.isHttpErrorReceive=true await Utils.sleep(1000) - this.controller.loadUrl({url:'https://example1.com/path/does/not/exist/index.jsp'}) + this.controller.loadUrl({url:'http://1.1.1.123/index.html'}) break; } case "emitOnTitleReceive":{ @@ -651,7 +653,11 @@ struct Index { if(this.isHttpErrorReceive){ console.info("isHttpErrorReceive==>") this.httpErrorReceive = event.response.getResponseCode() - Utils.emitEvent(this.httpErrorReceive,66) + if(this.httpErrorReceive>400){ + this.isLargeThan=true + Utils.emitEvent(this.isLargeThan,66) + } + this.isLargeThan=false this.isHttpErrorReceive=false } }) diff --git a/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets b/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets index e328f33c9f8c9f03728ec38f46af9464a05cfc5a..38180ee8eda31698668b58cfeea43cc6404d5ff5 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets +++ b/arkui/ace_ets_web_dev/entry/src/main/ets/test/WebJsunit.test.ets @@ -449,7 +449,7 @@ export default function webJsunit() { */ it('onHttpErrorReceive',0,async function(done){ emitKey="emitOnTitleReceive"; - Utils.registerEvent("onHttpErrorReceive",404,66,done); + Utils.registerEvent("onHttpErrorReceive",true,66,done); sendEventByKey('webcomponent',10,''); }) /* diff --git a/arkui/ace_ets_web_dev/entry/src/main/module.json b/arkui/ace_ets_web_dev/entry/src/main/module.json index 41c05e5752f4729a2bb12f8f608856faa804b94e..0729db882db60f8b8798a190efe02dbd546c03b4 100644 --- a/arkui/ace_ets_web_dev/entry/src/main/module.json +++ b/arkui/ace_ets_web_dev/entry/src/main/module.json @@ -14,6 +14,12 @@ "installationFree": false, "uiSyntax": "ets", "pages": "$profile:main_pages", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], "abilities": [{ "name": "com.example.myapplication.MainAbility", "srcEntrance": "./ets/MainAbility/MainAbility.ts", diff --git a/arkui/ace_ets_web_dev_four/entry/src/main/module.json b/arkui/ace_ets_web_dev_four/entry/src/main/module.json index 41c05e5752f4729a2bb12f8f608856faa804b94e..988c1bf8ec01db2c0d6e6b065039889cb768089f 100644 --- a/arkui/ace_ets_web_dev_four/entry/src/main/module.json +++ b/arkui/ace_ets_web_dev_four/entry/src/main/module.json @@ -14,6 +14,12 @@ "installationFree": false, "uiSyntax": "ets", "pages": "$profile:main_pages", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], "abilities": [{ "name": "com.example.myapplication.MainAbility", "srcEntrance": "./ets/MainAbility/MainAbility.ts", diff --git a/arkui/ace_ets_web_dev_two/AppScope/app.json b/arkui/ace_ets_web_dev_two/AppScope/app.json index a76ab24e0556f48bfbce8e0200a07fff24b0bd08..7da2b7958c7ee9676283f7eab42adc6dc936ed49 100644 --- a/arkui/ace_ets_web_dev_two/AppScope/app.json +++ b/arkui/ace_ets_web_dev_two/AppScope/app.json @@ -11,10 +11,10 @@ "distributedNotificationEnabled": true, "keepAlive": true, "singleUser": true, - "minAPIVersion": 9, - "targetAPIVersion": 9, + "minAPIVersion": 10, + "targetAPIVersion": 10, "car": { - "apiCompatibleVersion": 9, + "apiCompatibleVersion": 10, "singleUser": false } } diff --git a/arkui/ace_ets_web_dev_two/entry/src/main/module.json b/arkui/ace_ets_web_dev_two/entry/src/main/module.json index 41c05e5752f4729a2bb12f8f608856faa804b94e..988c1bf8ec01db2c0d6e6b065039889cb768089f 100644 --- a/arkui/ace_ets_web_dev_two/entry/src/main/module.json +++ b/arkui/ace_ets_web_dev_two/entry/src/main/module.json @@ -14,6 +14,12 @@ "installationFree": false, "uiSyntax": "ets", "pages": "$profile:main_pages", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "true" + } + ], "abilities": [{ "name": "com.example.myapplication.MainAbility", "srcEntrance": "./ets/MainAbility/MainAbility.ts",