This repository has been archived on 2023-10-08. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2023-10-07 17:55:41 +08:00
AppScope Feat: init harmoney project 2023-09-24 23:19:23 +08:00
dependencies Feat: init harmoney project 2023-09-24 23:19:23 +08:00
entry Feat: some todo ui 2023-10-07 17:55:41 +08:00
hvigor Feat: init harmoney project 2023-09-24 23:19:23 +08:00
.gitignore Feat: init harmoney project 2023-09-24 23:19:23 +08:00
build-profile.json5 Feat: some todo ui 2023-10-07 17:55:41 +08:00
hvigorfile.ts Feat: init harmoney project 2023-09-24 23:19:23 +08:00
hvigorw Feat: init harmoney project 2023-09-24 23:19:23 +08:00
hvigorw.bat Feat: init harmoney project 2023-09-24 23:19:23 +08:00
oh-package-lock.json5 Feat: init harmoney project 2023-09-24 23:19:23 +08:00
oh-package.json5 Feat: some todo ui 2023-10-07 17:55:41 +08:00
README.md Feat: some todo ui 2023-10-07 17:55:41 +08:00

Template

database

注意事项

  1. 由于constructor()函数不能异步,因此在其中调用getRdbStore() 函数时,不能保证新建对象后,数据库初始化完毕。那么此时如果调用insert等方法时,RdbStore可能还是undefined,导致数据库操作失败。

    因此,只能使用回调来处理。

  aboutToAppear() {
   this.todoTable.getRdbStore(async () => {
      const res = await this.todoTable.query();
      this.todoList = res;
   })
}