feat: wire ArkTS pages with component trees

This commit is contained in:
OpenClaw committed 2026-03-09 14:41:25 +08:00
1 parent f8f18f185e
commit 879e1526f1
4 files changed
+117 -6

No files matched your search

+18 -2
View File
@@ -1,4 +1,10 @@
import { AppCatalogStore } from '../store/AppCatalogStore'
import { PageHeader } from '../components/common/PageHeader'
import { LoadingBlock } from '../components/common/LoadingBlock'
import { EmptyState } from '../components/common/EmptyState'
import { StatusBanner } from '../components/common/StatusBanner'
import { ImportEntryButton } from '../components/appList/ImportEntryButton'
import { AppListView } from '../components/appList/AppListView'
@Entry
@Component
@@ -11,8 +17,18 @@ struct AppListPage {
build() {
Column() {
Text('AppListPage')
Text(`apps: ${this.store.items.length}`)
PageHeader({ title: '应用列表' })
if (this.store.error) {
StatusBanner({ text: this.store.error.message })
}
if (this.store.loading) {
LoadingBlock({ text: '正在加载应用列表' })
} else if (this.store.items.length === 0) {
EmptyState({ text: '暂无已导入应用' })
ImportEntryButton()
} else {
AppListView({ items: this.store.items })
}
}
.width('100%')
.height('100%')