HMRouter集成
This commit is contained in:
@@ -10,7 +10,7 @@ struct PatientDetailsPage {
|
||||
}
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
Column() {
|
||||
PatientDetailsComp()
|
||||
}
|
||||
.height('100%')
|
||||
|
||||
@@ -1,17 +1,43 @@
|
||||
import { PatientsGroup } from 'patient'
|
||||
import { HMDefaultGlobalAnimator, HMNavigation } from '@hadss/hmrouter'
|
||||
import { AttributeUpdater } from '@kit.ArkUI'
|
||||
import { TabBarComp } from 'netease'
|
||||
|
||||
class NavModifier extends AttributeUpdater<NavigationAttribute> {
|
||||
initializeModifier(instance: NavigationAttribute): void {
|
||||
instance.mode(NavigationMode.Stack);
|
||||
instance.navBarWidth('100%');
|
||||
instance.hideTitleBar(true);
|
||||
instance.hideToolBar(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct PatientsGroupPage {
|
||||
@Provide refreshFlag:boolean = false;
|
||||
modifier: NavModifier = new NavModifier()
|
||||
@State
|
||||
activeIndex: number = 0
|
||||
|
||||
onPageShow(): void {
|
||||
this.refreshFlag = !this.refreshFlag;
|
||||
}
|
||||
|
||||
build() {
|
||||
RelativeContainer() {
|
||||
PatientsGroup();
|
||||
Column() {
|
||||
HMNavigation({
|
||||
navigationId:"PatientsGroupPageNavigation",
|
||||
homePageUrl:'PatientsGroup',
|
||||
options:{
|
||||
standardAnimator:HMDefaultGlobalAnimator.STANDARD_ANIMATOR,
|
||||
dialogAnimator:HMDefaultGlobalAnimator.DIALOG_ANIMATOR,
|
||||
modifier:this.modifier
|
||||
}
|
||||
}) {
|
||||
// PatientsGroup()
|
||||
TabBarComp({ activeIndex: this.activeIndex})
|
||||
}
|
||||
}
|
||||
.height('100%')
|
||||
.width('100%')
|
||||
|
||||
Reference in New Issue
Block a user