优化模块调用
This commit is contained in:
parent
fc26212ddd
commit
31ee109990
@ -9,18 +9,6 @@ import { TitleModel } from '../LayoutInterface/Layout/TabContent';
|
||||
export struct TitleTabContent {
|
||||
@Param curtLayout:TitleModel|undefined=undefined;
|
||||
|
||||
@Builder
|
||||
BtnMenu(item:Array<TitleButton>){
|
||||
MenuBtn({menuBtn:item})
|
||||
}
|
||||
@Builder
|
||||
BtnEvent(item: TitleButton){
|
||||
EventBtn({eventBtn:item})
|
||||
}
|
||||
@Builder
|
||||
BtnSwitchMode(item: TitleButton){
|
||||
SwitchModelBtn({eventBtn:item})
|
||||
}
|
||||
build() {
|
||||
//垂直布局展示多行
|
||||
Column({ space: 0 }) {
|
||||
@ -40,15 +28,15 @@ export struct TitleTabContent {
|
||||
ForEach(group_item.grpBtn, (btn_item: TitleButton|Array<TitleButton>, index: number) =>{
|
||||
if(this.curtLayout?.cmName=='应用模块'){
|
||||
if(Array.isArray(btn_item)){
|
||||
this.BtnMenu(btn_item)
|
||||
MenuBtn({menuBtn:btn_item})
|
||||
}else{
|
||||
this.BtnSwitchMode(btn_item)
|
||||
SwitchModelBtn({eventBtn:btn_item})
|
||||
}
|
||||
}else{
|
||||
if(Array.isArray(btn_item)){
|
||||
this.BtnMenu(btn_item)
|
||||
MenuBtn({menuBtn:btn_item})
|
||||
}else{
|
||||
this.BtnEvent(btn_item)
|
||||
EventBtn({eventBtn:btn_item})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user