diff --git a/README.en.md b/README.en.md deleted file mode 100644 index aa66e9ee1a8a4f4e1c539dc2d9b52681d4fe9468..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,37 +0,0 @@ -# ArkTS Basic Syntax Demo - -## Introduction - - - -## Preview - - - -## Usage - - - -## Project Structure - -``` -├──entry/src/main/ets/ -│ ├──entryability -│ │ └──EntryAbility.ets -│ ├──entrybackupability -│ │ └──EntryBackupAbility.ets -│ └──pages -│ ├──BasicPage.ets // Basic syntax example -│ ├──BubbleSortPage.ets // Bubble sort -│ ├──DaffodilsNumberPage.ets // Print daffodil numbers -│ └──MultiplicationTablePage.ets // Print the multiplication table -└───entry/src/main/resources // Application resources directory -``` - -## Permissions - - - -## Constraints and Limitations - - diff --git a/README.md b/README.md index ab966948f1fa1a37688d4eaec0780111ea87f918..e5e9238d01ac0fc52b95a1029f4cca60cb7301c5 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ 1. 本示例仅支持预览器运行。 -2. HarmonyOS系统:HarmonyOS 6.0.0 Release及以上。 +2. HarmonyOS系统:HarmonyOS 5.0.5 Release及以上。 3. DevEco Studio版本:DevEco Studio 6.0.0 Release及以上。 diff --git a/build-profile.json5 b/build-profile.json5 index c8fdfbdb868270a626083b04ab2b2fc4c04274df..1a6814dc8468417c33947ca74d02b3b3a12db35c 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -6,7 +6,7 @@ "name": "default", "signingConfig": "default", "targetSdkVersion": "6.0.0(20)", - "compatibleSdkVersion": "6.0.0(20)", + "compatibleSdkVersion": "5.0.5(17)", "runtimeOS": "HarmonyOS", "buildOption": { "strictMode": { diff --git a/entry/src/main/ets/pages/BasicPage.ets b/entry/src/main/ets/pages/BasicPage.ets index 00671768a495e2986cf44bc84e19d93c0b6f6a01..298a8da663fab5deb336870b95753253a832fc37 100644 --- a/entry/src/main/ets/pages/BasicPage.ets +++ b/entry/src/main/ets/pages/BasicPage.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /** * 变量与声明 */ @@ -68,7 +69,6 @@ function primitiveTypes() { primitiveTypes(); - // 引用类型 function referenceTypes() { // Object类型 @@ -455,7 +455,6 @@ function makeMilkTeaWithOptionalUseDefault(flavor: string, sweetness: string = ' console.log(makeMilkTeaWithOptionalUseDefault('strawberry')); - // 剩余参数 function makeMilkTeaWithRest(flavor: string, sweetness: string = 'full sugar', ...toppings: string[]): string { let tea = `A cup of ${flavor} milk tea with ${sweetness}`; diff --git a/entry/src/main/ets/pages/BubbleSortPage.ets b/entry/src/main/ets/pages/BubbleSortPage.ets index 9fb4b02391da848fbdba4c69900b38199bfa3b4a..b56b89a6132fac4a9187475b6fca1897560c1d4a 100644 --- a/entry/src/main/ets/pages/BubbleSortPage.ets +++ b/entry/src/main/ets/pages/BubbleSortPage.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // 冒泡排序: 通过交换相邻元素,对数字数组进行升序排序。 function BubbleSort(arr: number[]): number[] { const n = arr.length; diff --git a/entry/src/main/ets/pages/DaffodilsNumberPage.ets b/entry/src/main/ets/pages/DaffodilsNumberPage.ets index 65949295ca1b053d719574aa9a8bb3a8ecfc128e..dd461f7e5e334d12dda309835ad12a16e316713d 100644 --- a/entry/src/main/ets/pages/DaffodilsNumberPage.ets +++ b/entry/src/main/ets/pages/DaffodilsNumberPage.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // 找出所有三位数的水仙花数 function DaffodilsNumber() { let result: number[] = []; diff --git a/entry/src/main/ets/pages/MultiplicationTablePage.ets b/entry/src/main/ets/pages/MultiplicationTablePage.ets index e67bd2c08ca34df589f4688e21f854f0b69ce173..1567b5a6197038e055862d495efc1cac129c816e 100644 --- a/entry/src/main/ets/pages/MultiplicationTablePage.ets +++ b/entry/src/main/ets/pages/MultiplicationTablePage.ets @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + // 打印九九乘法表 function MultiplicationTable() { let result = ''; @@ -47,6 +48,4 @@ struct MultiplicationTablePage { .height('100%') .width('100%') } -} - - +} \ No newline at end of file