feat: wire ArkTS pages with component trees
This commit is contained in:
1 parent
f8f18f185e
commit
879e1526f1
4 files changed
+117
-6
No files matched your search
@@ -1,4 +1,10 @@
|
||||
import { ImportStore } from '../store/ImportStore'
|
||||
import { PageHeader } from '../components/common/PageHeader'
|
||||
import { StatusBanner } from '../components/common/StatusBanner'
|
||||
import { ImportSourceSelector } from '../components/import/ImportSourceSelector'
|
||||
import { PackagePreviewCard } from '../components/import/PackagePreviewCard'
|
||||
import { ImportProgressPanel } from '../components/import/ImportProgressPanel'
|
||||
import { ImportResultPanel } from '../components/import/ImportResultPanel'
|
||||
|
||||
@Component
|
||||
export struct ImportPage {
|
||||
@@ -6,8 +12,23 @@ export struct ImportPage {
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Text('ImportPage')
|
||||
Text(`phase: ${this.store.phase}`)
|
||||
PageHeader({ title: '导入应用' })
|
||||
if (this.store.error) {
|
||||
StatusBanner({ text: this.store.error.message })
|
||||
}
|
||||
ImportSourceSelector()
|
||||
if (this.store.previewInfo) {
|
||||
PackagePreviewCard({ name: this.store.previewInfo.name })
|
||||
}
|
||||
if (this.store.phase === 'importing') {
|
||||
ImportProgressPanel({ text: '导入中' })
|
||||
}
|
||||
if (this.store.phase === 'success') {
|
||||
ImportResultPanel({ text: '导入成功' })
|
||||
}
|
||||
if (this.store.phase === 'failed') {
|
||||
ImportResultPanel({ text: '导入失败' })
|
||||
}
|
||||
}
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
|
||||
Reference in new issue
Block a user