diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/entry/src/main/ets/pages/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/entry/src/main/ets/pages/Index.ets index 1ba61845df6f9afc8e1d52adde501435eea6139c..cb46e0b6aeeb66eb81226db4039a27ce5399a31a 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/entry/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/entry/src/main/ets/pages/Index.ets @@ -87,6 +87,7 @@ struct Index { calc1[methodName](14, 15); // 调用成员函数instanceAdd() ns[functionName](16, 17); // 调用全局方法addHarlibrary() }) + // [End dynamic_load_har_module_reflect_call] } else if (item === resourceToString($r('app.string.dynamic_import_HAR_name'))) { // [Start const_dynamic_import_har_name] @@ -94,6 +95,7 @@ struct Index { import('myhar').then((ns: ESObject) => { console.info(ns.add(3, 5)); }) + // [End const_dynamic_import_har_name] } else if (item === resourceToString($r('app.string.dynamic_import_HAR_path'))) { // [Start const_dynamic_import_har_path] @@ -101,6 +103,7 @@ struct Index { import('myhar/Index').then((ns: ESObject) => { console.info(ns.add(3, 5)); }); + // [End const_dynamic_import_har_path] } else if (item === resourceToString($r('app.string.dynamic_import_HSP_name'))) { // [Start const_dynamic_import_hsp_name] @@ -122,6 +125,7 @@ struct Index { import('@ohos/crypto-js').then((ns: ESObject) => { console.info('DynamicImport @ohos/crypto-js: ' + ns.CryptoJS.src); }); + // [End const_dynamic_import_crypto] } else if (item === resourceToString($r('app.string.dynamic_import_ohpm'))) { // [Start const_dynamic_import_ohpm] @@ -129,6 +133,7 @@ struct Index { import('@ohos/hypium').then((ns: ESObject) => { console.info('DynamicImport @ohos/hypium: ', ns.TestType.FUNCTION.toString()); }); + // [End const_dynamic_import_ohpm] } else if (item === resourceToString($r('app.string.dynamic_import_file'))) { // [Start hap_const_dynamic_import] @@ -136,6 +141,7 @@ struct Index { import('../Calc').then((ns: ESObject) => { console.info(ns.add(3, 5)); }) + // [End hap_const_dynamic_import] } else if (item === resourceToString($r('app.string.dynamic_import_native'))) { // [Start hap_const_dynamic_import_native_index] @@ -143,6 +149,7 @@ struct Index { import('libentry.so').then((ns: ESObject) => { console.info('DynamicImport libnativeapi.so: ' + ns.default.add(2, 3)); }); + // [End hap_const_dynamic_import_native_index] } else if (item === resourceToString($r('app.string.dynamic_import_system_app'))) { // [Start hap_const_dynamic_import_api] @@ -166,6 +173,7 @@ struct Index { ns.default.info(0x0000, 'testTag', '%{public}s', 'DynamicImport @ohos.hilog.'); hilog.info(0x000, 'testTag', '%{public}s', ns.default.LogLevel.DEBUG); }); + // [End hap_const_dynamic_import_api] } else if (item === resourceToString($r('app.string.dynamic_import_module_myhar'))) { // [Start variable_dynamic_import] @@ -182,6 +190,7 @@ struct Index { import(filePath).then((ns: ESObject) => { console.info(ns.add(3, 5)); }); + // [End variable_dynamic_import] } else if (item === resourceToString($r('app.string.dynamic_import_HAR_name_variable'))) { // [Start hap_variable_dynamic_import_har] @@ -190,6 +199,7 @@ struct Index { import(harPackageName).then((ns: ESObject) => { console.info(ns.add(3, 5)); }); + // [End hap_variable_dynamic_import_har] } else if (item === resourceToString($r('app.string.dynamic_import_HSP_name_variable'))) { // [Start hap_variable_dynamic_import_hsp] @@ -198,6 +208,7 @@ struct Index { import(hspPackageName).then((ns: ESObject) => { console.info(ns.add(3, 5)); }); + // [End hap_variable_dynamic_import_hsp] } else if (item === resourceToString($r('app.string.dynamic_import_remote_HAR_name_variable'))) { // [Start hap_variable_dynamic_import_har_crypto] @@ -206,6 +217,7 @@ struct Index { import(remoteHarPackageName).then((ns: ESObject) => { console.info('DynamicImport @ohos/crypto-js: ' + ns.CryptoJS.src); }); + // [End hap_variable_dynamic_import_har_crypto] } else if (item === resourceToString($r('app.string.dynamic_import_ohpm_variable'))) { // [Start hap_variable_dynamic_import_ohpm] @@ -214,6 +226,7 @@ struct Index { import(ohpmPackageName).then((ns: ESObject) => { console.info('DynamicImport @ohos/hypium: ', ns.TestType.FUNCTION.toString()); }); + // [End hap_variable_dynamic_import_ohpm] } else if (item === resourceToString($r('app.string.dynamic_import_file_variable'))) { // [Start hap_variable_dynamic_import_calc] @@ -222,6 +235,7 @@ struct Index { import(calcFilePath).then((ns: ESObject) => { console.info(ns.add(3, 5)); }); + // [End hap_variable_dynamic_import_calc] } else if (item === resourceToString($r('app.string.dynamic_import_native_variable'))) { // [Start hap_variable_dynamic_import_native] @@ -230,6 +244,7 @@ struct Index { import(soName).then((ns: ESObject) => { console.info('DynamicImport libnativeapi.so: ' + ns.default.add(2, 3)); }); + // [End hap_variable_dynamic_import_native] } else if (item === resourceToString($r('app.string.dynamic_import_system_app_variable'))) { // [Start hap_variable_dynamic_import_api] @@ -256,6 +271,7 @@ struct Index { import(packageName).then((ns: ESObject) => { ns.default.info(0x0000, 'testTag', '%{public}s', 'DynamicImport @ohos.hilog.'); }) + // [End hap_variable_dynamic_import_api] } else if (item === resourceToString($r('app.string.dynamic_import_HAR'))) { // [Start hap_variable_dynamic_import_har1] @@ -263,6 +279,7 @@ struct Index { import(harName).then((ns: ESObject) => { console.info('DynamicImport addHar1 4 + 5 = ' + ns.addHar1(4, 5)); }); + // [End hap_variable_dynamic_import_har1] } }) diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/Index.ets index e0345cb61d753496fc4de59a5e8d08c67e695009..bcf01c6aa737d78331c43508f8e4dc3809e4c19e 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/Index.ets @@ -17,4 +17,5 @@ export { MainPage } from './src/main/ets/components/MainPage'; // [Start export_add_har1] export { addHar1 } from './src/main/ets/utils/Calc'; + // [End export_add_har1] diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/src/main/ets/utils/Calc.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/src/main/ets/utils/Calc.ets index 7cc5071259ad983e4117ffe8cfbc4be961d60b17..88fba4e43804ae3f9b0081f5a9b0962afb229dff 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/src/main/ets/utils/Calc.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har1/src/main/ets/utils/Calc.ets @@ -24,4 +24,5 @@ export function addHar1(a: number, b: number): number { }); return c; } + // [End function_add_har1] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/Index.ets index 248cad021d26d33980fb855f19ae7cba8ea59f2b..baa09be01918b387ba54555c72864e5a8b0be218 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/Index.ets @@ -17,4 +17,5 @@ export { MainPage } from './src/main/ets/components/MainPage'; // [Start export_add_har2] export { addHar2 } from './src/main/ets/utils/Calc' + // [End export_add_har2] diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/src/main/ets/utils/Calc.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/src/main/ets/utils/Calc.ets index 13cc0fe20a97836f97a2dca506a6d7705a088812..e607390d00cf0ae5d42ffd2a64f2f66be4583a35 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/src/main/ets/utils/Calc.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/har2/src/main/ets/utils/Calc.ets @@ -19,4 +19,5 @@ export function addHar2(a: number, b: number): number { console.info('DynamicImport I am har2, %d + %d = %d', a, b, c); return c; } + // [End function_add_har2] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/Index.ets index ce8819144b46a1b13a52e65fac1975f790871cd7..b289115fc626bb31d641fd63aecf393215f78484 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/Index.ets @@ -17,4 +17,5 @@ export { MainPage } from './src/main/ets/components/MainPage' // [Start module_members_export] export { Calc, addHarlibrary } from './src/main/ets/utils/Calc' + // [End module_members_export] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/src/main/ets/utils/Calc.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/src/main/ets/utils/Calc.ets index 022d3ccd82446561cd408adad7c1764bf76dd418..f3896e4bc481a98e99abd3e01335281240878f1b 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/src/main/ets/utils/Calc.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport/harlibrary/src/main/ets/utils/Calc.ets @@ -33,4 +33,5 @@ export function addHarlibrary(a: number, b: number): number { console.info('DynamicImport I am harlibrary in addHarlibrary, %d + %d = %d', a, b, c); return c; } + // [End dynamic_call_add] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/build-profile.json5 b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/build-profile.json5 index 472a9260420cea77f8d432f967a475169d6cea87..f8333da5e22c7d11d64f817e100e81b72e2ff720 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/build-profile.json5 +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/build-profile.json5 @@ -37,6 +37,7 @@ }, // [EndExclude hap_load_native_dependence_01] }, + // [End hap_load_native_dependence_01] "buildOptionSet": [ { diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/oh-package.json5 b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/oh-package.json5 index d11c699914c5da1f6f69880a2bbcc07a1f26de71..53dac59ce57e5478c9bf7b106a5ab816bfbfdc24 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/oh-package.json5 +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/oh-package.json5 @@ -24,5 +24,6 @@ "dependencies": { "libentry.so": "file:./src/main/cpp/types/libentry" }, + // [End hap_load_native_dependence] } \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/cpp/types/libentry/index.d.ts b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/cpp/types/libentry/index.d.ts index 0069b64ba2422995f2a96e701ec78bd063c26d64..39eb6d9fb88ce31eb268cc906e94aae7f97a5572 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/cpp/types/libentry/index.d.ts +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/cpp/types/libentry/index.d.ts @@ -15,4 +15,5 @@ // [Start hap_load_native] export const add: (a: number, b: number) => number; + // [End hap_load_native] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/ets/pages/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/ets/pages/Index.ets index 169d519a7c4425b187148d5b091ce29c37c7f9d2..5b522f8d9008d9f0685641929d00f627977b1dee 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/ets/pages/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/entry/src/main/ets/pages/Index.ets @@ -28,6 +28,7 @@ struct Index { //HAP加载系统库模块 let hilog: ESObject = loadNativeModule('@ohos.hilog'); hilog.info(0, 'testTag', 'loadNativeModule ohos.hilog success'); + // [End hap_load_system_module] this.message = 'loadNativeModule ohos.hilog success' }) @@ -40,6 +41,7 @@ struct Index { //HAP加载Native库 let module: ESObject = loadNativeModule('libentry.so'); let sum: number = module.add(1, 2); + // [End load_native_module_libentry] this.message = 'loadNativeModule libentry.so success result: ' + sum.toString(); }) diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/module.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/module.ets index 77afe81b29fc135ba68bdf81d4e3e23a62f8b176..e817c4237b228ef40b8f4f471fda9d45a5e73125 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/module.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/module.ets @@ -17,4 +17,5 @@ export let data = 'data from module'; globalThis.someGlobalVar = 100; + // [End import_global_module_data] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/moduleUseGlobalVar.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/moduleUseGlobalVar.ets index a3b18a7ad8d9070c3e937e1d9c45326cc54e3741..f4278f3d0d2a664583ede93d7a59c2b8551f32b7 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/moduleUseGlobalVar.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/LazyImportChangeExecutionOrder/moduleUseGlobalVar.ets @@ -35,6 +35,7 @@ struct moduleUseGlobalVar { this.message1 = 'SideEffect: ' + globalThis.someGlobalVar; console.log(data); // 使用到module模块的变量,此时module模块执行,someGlobalVar的值变为100 }) + // [EndExclude lazy_import_global_module_data] Divider() .vertical(true) diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/main.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/main.ets index e000c0c023b5ad1182418ca77e83c3d9212a8a56..58e5c6ce4ac55a97afac4fb997c422fcb931c0a5 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/main.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/main.ets @@ -25,6 +25,7 @@ function maybeNotCalledAtAll() { console.log(data1); console.log(data2); } + // [End import_change_global_var] function maybeNotCalledAtAllOptimize() { diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/module.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/module.ets index 78c9caab64651ec67f1edfaa3218bbf684010c83..ee4303ddc64427f84d0928f35f6226d8d463d4ee 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/module.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/module.ets @@ -17,4 +17,5 @@ export let data1 = 'data from module'; globalThis.someGlobalVar = 100; // 改变了全局状态 + // [End export_change_global_data_100] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/moduleUseGlobalVar.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/moduleUseGlobalVar.ets index 91c18c7516e5c64b92d3519fe94878b1a83d4189..052eb7b9d92b50852f7b70084d5b7141e438dc68 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/moduleUseGlobalVar.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/moduleUseGlobalVar.ets @@ -20,4 +20,5 @@ export function useGlobalVar() { console.log(data1); console.log(globalThis.someGlobalVar); // 此时由于main.ets中加载了sideEffectModule模块,someGlobalVar的值已经被改为200 } + // [End export_change_some_global_var] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/sideEffectModule.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/sideEffectModule.ets index 1f401a0dfdccf84e16662d7bd38a18daa3ae29f8..6ebd10c6085030c0def08e8f26f2a0a391718f1e 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/sideEffectModule.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyGlobalObject/sideEffectModule.ets @@ -17,4 +17,5 @@ export let data2 = 'data from side effect module'; globalThis.someGlobalVar = 200; // 也变了全局状态 + // [End export_change_global_data_200] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/Index.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/Index.ets index bd12a8a0a2886136879620db995e1c1bdb31d537..1fdf6ac524ec37bf5b46be545bb1bf0a20eb2e5c 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/Index.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/Index.ets @@ -60,6 +60,7 @@ struct Index { function maybeNotCalledAtAll() { console.log(data); } + // [End set_app_storage_var_200] function maybeNotCalledAtAllOptimize() { diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/module.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/module.ets index 8d84ffea4937a5161a0840123a26f27b6459e53f..221498215ad901daabd6356c3cca40fb79c90376 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/module.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyTheApplicationLevelArkUI/module.ets @@ -17,4 +17,5 @@ export let data = 'data from module'; AppStorage.setOrCreate('SomeAppStorageVar1', 200); // 修改应用全局的UI状态 + // [End set_app_storage_var] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/a.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/a.ets index 2d5fc12b0819cc5ea08d1b49435f701386dab24a..732e3dbf476efd1c6bd7b0a93a36b73e15922b5a 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/a.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/a.ets @@ -19,4 +19,5 @@ import { b } from './b'; console.log('Module A: ', b); export const a = 'A'; + // [End module_cycle_dependence_a] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/b.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/b.ets index 106641288af9a5e5fe0fb47e006d1f2f50124bc7..646246d9407cf394efe88e9b72a40c3d40cd7870 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/b.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/b.ets @@ -19,4 +19,5 @@ import { a } from './a'; console.log('Module B: ', a); export const b = 'B'; + // [End module_cycle_dependence_b] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/main.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/main.ets index 5a06290dd99809176464a385cf826c600b961725..4238ef7c177c04f926455c5f95202eb8aec5f3a7 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/main.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/main.ets @@ -72,4 +72,5 @@ struct main { .width('100%') } } + // [End call_modify_array_prototype_include] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/modifyPrototype.ts b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/modifyPrototype.ts index e67a9730726c1de2fc16c23abd5786c58bfb2943..0b48732dd93067d94bbfe8cf866660a1c1189623 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/modifyPrototype.ts +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/ModifyingGlobalVariables/modifyPrototype.ts @@ -19,4 +19,5 @@ export let data = 'data from modifyPrototype'; Array.prototype.includes = function (value) { return this.indexOf(value) == -1; }; + // [End array_prototype_include] \ No newline at end of file diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/main.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/main.ets index d327b4e0df14c133ba8fed5008dc9d68347b69ce..1e13d770a55ea9152aacb247dbe768880a98ff4b 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/main.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/main.ets @@ -17,6 +17,7 @@ import { data } from './topCodeModule'; // 导入时,module.ets中的console.log会执行,产生输出。 import { dataOptimizeOne } from './topCodeModuleOptimize'; import { dataOptimizeTwo } from './module'; + // [End import_put_console_log] @Entry diff --git a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/module.ets b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/module.ets index d83291a9749632fe4fed48fec4b3e90ca3097958..9ae49e4861147b69761c2545fe0fdc59a650b09c 100755 --- a/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/module.ets +++ b/code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/entry/src/main/ets/pages/TopCodeModification/module.ets @@ -17,6 +17,7 @@ export function initialize() { console.log('Module loaded!'); } + // [End module_load_directly] // [Start module_load_optimize]