You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
624 B
68 lines
624 B
### 项目结构
|
|
|
|
src/
|
|
├─ main/
|
|
│ ├─ etc/
|
|
│ │ ├─ entryability/
|
|
│ │ ├─ pages/
|
|
│ │ ├─ entrybackupability/
|
|
│ │ ├─ view/
|
|
│ │ ├─ viewmodel/
|
|
│ │ ├─ apis/
|
|
│ │ ├─ utils/
|
|
│ ├─ resources/
|
|
├─ ohosTest/
|
|
├─ test/
|
|
├─ mock/
|
|
|
|
### 国际化
|
|
|
|
可以根据系统来切换中英文
|
|
|
|
|
|
|
|
|
|
|
|
### ArkTS基础语法
|
|
|
|
枚举
|
|
|
|
联合类型
|
|
|
|
```ts
|
|
@State message: string | null = null;
|
|
实现键值对表达
|
|
键的类型,值的类型
|
|
@State map: Record<string, string> = {
|
|
'key1': 'value1',
|
|
'key2': 'value2',
|
|
};
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|