Compare commits
No commits in common. "dc2d4d0b26445726489d18aaed73537e86988a88" and "a4a6528a369d3f3d9b2a09385447bdf8eca300e3" have entirely different histories.
dc2d4d0b26
...
a4a6528a36
@ -4,17 +4,18 @@ import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
|||||||
import { TitleModel } from "../LayoutInterface/Interface/ModelInterface";
|
import { TitleModel } from "../LayoutInterface/Interface/ModelInterface";
|
||||||
import { TitleTabData } from '../LayoutInterface/Layout/TitleTabData';
|
import { TitleTabData } from '../LayoutInterface/Layout/TitleTabData';
|
||||||
import { mwInfo } from '../AppStorageV2Class';
|
import { mwInfo } from '../AppStorageV2Class';
|
||||||
|
import {BaseMenu } from './Menu';
|
||||||
|
import { BaseMenuData } from '../LayoutInterface/Interface/MenuInterface';
|
||||||
|
|
||||||
//按钮统一尺寸,该按钮为正方形,所以以主窗口宽为基准,长=高->正方形
|
//按钮统一尺寸,该按钮为正方形,所以以主窗口宽为基准,长=高->正方形
|
||||||
let ebWidth=mwInfo.mainWindowWidth*0.02;
|
let ebWidth=mwInfo.mainWindowWidth*0.02;
|
||||||
let ebHeigth=mwInfo.mainWindowWidth*0.02;
|
let ebHeigth=mwInfo.mainWindowWidth*0.02;
|
||||||
//占位符的高度
|
//占位符的高度
|
||||||
let edHeigth=mwInfo.mainWindowWidth*0.005
|
let edHeigth=mwInfo.mainWindowWidth*0.005
|
||||||
|
|
||||||
|
|
||||||
//单一功能按钮
|
//单一功能按钮
|
||||||
//图片->文本
|
//图片->文本
|
||||||
//不能用于模块切换
|
//不能用于模块切换
|
||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct EventBtn {
|
export struct EventBtn {
|
||||||
//按钮动态布局类型,目前处于开发阶段两种状态.
|
//按钮动态布局类型,目前处于开发阶段两种状态.
|
||||||
@ -29,6 +30,7 @@ export struct EventBtn {
|
|||||||
build() {
|
build() {
|
||||||
Column({ space: 2 }) {
|
Column({ space: 2 }) {
|
||||||
//如果该类型是false表示为配普通事件按钮
|
//如果该类型是false表示为配普通事件按钮
|
||||||
|
if(!this.eventBtnType){
|
||||||
if (this.eventBtn != undefined) {
|
if (this.eventBtn != undefined) {
|
||||||
Button()
|
Button()
|
||||||
.width(ebWidth)
|
.width(ebWidth)
|
||||||
@ -41,9 +43,23 @@ export struct EventBtn {
|
|||||||
height: '90%' // 图片高度占满按钮
|
height: '90%' // 图片高度占满按钮
|
||||||
})
|
})
|
||||||
.onClick(()=>{
|
.onClick(()=>{
|
||||||
if(!this.eventBtnType){
|
|
||||||
ExecuteCommand(this.eventBtn as TitleButton);
|
ExecuteCommand(this.eventBtn as TitleButton);
|
||||||
|
})
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
|
//判断类型为true,属于模块切换事件
|
||||||
|
if (this.eventBtn != undefined) {
|
||||||
|
Button()
|
||||||
|
.width(ebWidth)
|
||||||
|
.height(ebHeigth)
|
||||||
|
.backgroundImage($r('app.media.' + this.eventBtn.eIcon))
|
||||||
|
.backgroundImagePosition({ x: '5%', y: '5%' })
|
||||||
|
.backgroundColor(Color.Transparent)
|
||||||
|
.backgroundImageSize({
|
||||||
|
width: '90%', // 图片宽度占满按钮
|
||||||
|
height: '90%' // 图片高度占满按钮
|
||||||
|
})
|
||||||
|
.onClick(() => {
|
||||||
if (this.eventBtn?.eEvent == 'Switch_Model_CAD') {
|
if (this.eventBtn?.eEvent == 'Switch_Model_CAD') {
|
||||||
this.curtModel = TitleTabData.mModels.get(1)
|
this.curtModel = TitleTabData.mModels.get(1)
|
||||||
} else if (this.eventBtn?.eEvent == 'Switch_Model_CAM') {
|
} else if (this.eventBtn?.eEvent == 'Switch_Model_CAM') {
|
||||||
@ -51,9 +67,9 @@ export struct EventBtn {
|
|||||||
} else if (this.eventBtn?.eEvent == 'Switch_Model_CAE') {
|
} else if (this.eventBtn?.eEvent == 'Switch_Model_CAE') {
|
||||||
this.curtModel = TitleTabData.mModels.get(3)
|
this.curtModel = TitleTabData.mModels.get(3)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (this.eventBtn != undefined) {
|
if (this.eventBtn != undefined) {
|
||||||
Text()
|
Text()
|
||||||
.width('auto')
|
.width('auto')
|
||||||
@ -74,34 +90,20 @@ export struct EventBtn {
|
|||||||
//功能目录菜单,主要用于针对单一按钮多个功能形式
|
//功能目录菜单,主要用于针对单一按钮多个功能形式
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct MenuBtn {
|
export struct MenuBtn {
|
||||||
@Param menus: Array<TitleButton> | undefined = undefined;
|
@Param menuBtn: Array<TitleButton> | undefined = undefined;
|
||||||
@Local curtIndex:number=0;
|
@Local curtIndex:number=0;
|
||||||
|
@Local argsMenu:BaseMenuData= {
|
||||||
@Builder
|
aMenus: this.menuBtn as Array<TitleButton|Array<TitleButton>>,
|
||||||
BaseMenu (){
|
aIndex: this.curtIndex
|
||||||
Menu() {
|
};
|
||||||
ForEach(this.menus, (item: TitleButton, index: number) => {
|
|
||||||
//如果是功能组则
|
|
||||||
if(!Array.isArray(item)){
|
|
||||||
MenuItem({ startIcon: $r('app.media.'+item.eIcon), content: item.eName })
|
|
||||||
.onClick(()=> {
|
|
||||||
this.curtIndex=index;
|
|
||||||
ExecuteCommand(item as TitleButton);
|
|
||||||
})
|
|
||||||
.size({height: ebWidth})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}.fontSize(20)
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
Column({ space: 0 }) {
|
Column({ space: 0 }) {
|
||||||
if (this.menus != undefined) {
|
if (this.menuBtn != undefined) {
|
||||||
Button()
|
Button()
|
||||||
.bindMenu(this.BaseMenu)
|
.bindMenu(BaseMenu(this.argsMenu))
|
||||||
.width(ebWidth)
|
.width(ebWidth)
|
||||||
.height(ebHeigth)
|
.height(ebHeigth)
|
||||||
.backgroundImage($r('app.media.' + this.menus[this.curtIndex].eIcon))
|
.backgroundImage($r('app.media.' + this.menuBtn[this.curtIndex].eIcon))
|
||||||
.backgroundImagePosition({ x: '5%', y: '5%' })
|
.backgroundImagePosition({ x: '5%', y: '5%' })
|
||||||
.backgroundColor(Color.Transparent)
|
.backgroundColor(Color.Transparent)
|
||||||
.backgroundImageSize({
|
.backgroundImageSize({
|
||||||
@ -110,14 +112,14 @@ export struct MenuBtn {
|
|||||||
})
|
})
|
||||||
Button()
|
Button()
|
||||||
.type(ButtonType.Normal)
|
.type(ButtonType.Normal)
|
||||||
.bindMenu(this.BaseMenu)
|
.bindMenu(BaseMenu(this.argsMenu))
|
||||||
.width(ebWidth)
|
.width(ebWidth)
|
||||||
.height(edHeigth)
|
.height(edHeigth)
|
||||||
.backgroundImage($r('app.media.base_chevron_down'))
|
.backgroundImage($r('app.media.base_chevron_down'))
|
||||||
.backgroundImagePosition({ x: '35%', y: '0%' })
|
.backgroundImagePosition({ x: '35%', y: '0%' })
|
||||||
.backgroundColor(Color.Transparent)
|
.backgroundColor(Color.Transparent)
|
||||||
|
|
||||||
Text((this.menus[this.curtIndex].eName))
|
Text(this.menuBtn[this.curtIndex].eName)
|
||||||
.fontSize(16)
|
.fontSize(16)
|
||||||
.width('auto')
|
.width('auto')
|
||||||
.height(edHeigth)
|
.height(edHeigth)
|
||||||
@ -128,67 +130,31 @@ export struct MenuBtn {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Title Sub功能目录菜单
|
||||||
//图片按钮菜单功能.
|
|
||||||
//该符合组件支持用户选择Button的Icon的Index联动
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct SubColumnMenu {
|
export struct SubColumnMenu {
|
||||||
@Param menus: Array<TitleButton|Array<TitleButton>> = [];
|
@Param menus: Array<TitleButton>| undefined = undefined;
|
||||||
|
@Param icon:string='';
|
||||||
@Local curtIndex:number=0;
|
@Local curtIndex:number=0;
|
||||||
@Param icon:string|undefined=undefined;
|
@Local argsMenu:BaseMenuData= {
|
||||||
@Param name:string|undefined=undefined;
|
aMenus: this.menus as Array<TitleButton|Array<TitleButton>>,
|
||||||
@Builder
|
aIndex: this.curtIndex
|
||||||
SubMenu (subMenu:Array<TitleButton>) {
|
};
|
||||||
Menu() {
|
|
||||||
ForEach(subMenu, (subItem: TitleButton, index: number) => {
|
|
||||||
MenuItem({
|
|
||||||
startIcon: $r('app.media.' + subItem.eIcon),
|
|
||||||
content: subItem.eName,
|
|
||||||
})
|
|
||||||
.onClick(() => {
|
|
||||||
ExecuteCommand(subItem as TitleButton);
|
|
||||||
})
|
|
||||||
.size({ height: ebWidth })
|
|
||||||
})
|
|
||||||
}.fontSize(20)
|
|
||||||
}
|
|
||||||
@Builder
|
|
||||||
BaseMenu (){
|
|
||||||
Menu() {
|
|
||||||
ForEach(this.menus, (item: TitleButton|Array<TitleButton>, index: number) => {
|
|
||||||
//如果是功能组则
|
|
||||||
if(!Array.isArray(item)){
|
|
||||||
MenuItem({ startIcon: $r('app.media.'+item.eIcon), content: item.eName })
|
|
||||||
.onClick(()=> {
|
|
||||||
this.curtIndex=index;
|
|
||||||
ExecuteCommand(item as TitleButton);
|
|
||||||
})
|
|
||||||
.size({height: ebWidth})
|
|
||||||
}else{
|
|
||||||
MenuItem({
|
|
||||||
startIcon: $r('app.media.' + item[0].eIcon),
|
|
||||||
content: item[0].eName,
|
|
||||||
builder: this.SubMenu(item)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}.fontSize(20)
|
|
||||||
}
|
|
||||||
|
|
||||||
build(){
|
build(){
|
||||||
Row(){
|
Row(){
|
||||||
Button(){
|
Button()
|
||||||
Row(){
|
.padding(1)
|
||||||
Image($r('app.media.'+(this.icon!=undefined ? this.icon:(this.menus[this.curtIndex]as TitleButton).eIcon)))
|
.width(mwInfo.mainWindowWidth*0.013)
|
||||||
if(this.name!=undefined){
|
.height(mwInfo.mainWindowWidth*0.013)
|
||||||
Text(this.name).fontSize(20)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.width(ebWidth)
|
|
||||||
.height(ebWidth)
|
|
||||||
.backgroundColor(Color.Transparent)
|
.backgroundColor(Color.Transparent)
|
||||||
.bindMenu(this.BaseMenu)
|
.backgroundImage($r('app.media.'+this.icon))
|
||||||
|
.backgroundImagePosition({ x: '5%', y: '5%' })
|
||||||
|
.backgroundImageSize({
|
||||||
|
width: '90%', // 图片宽度占满按钮
|
||||||
|
height: '90%' // 图片高度占满按钮
|
||||||
|
})
|
||||||
|
.bindMenu(BaseMenu(this.argsMenu))
|
||||||
.type(ButtonType.Normal)
|
.type(ButtonType.Normal)
|
||||||
}.width(this.name!=undefined ?mwInfo.mainWindowWidth*0.03:ebWidth)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,43 +1,27 @@
|
|||||||
import { mwInfo } from "../AppStorageV2Class";
|
import { mwInfo } from "../AppStorageV2Class";
|
||||||
import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
||||||
|
|
||||||
//按钮统一尺寸,该按钮为正方形,所以以主窗口宽为基准,长=高->正方形
|
|
||||||
let ebWidth=mwInfo.mainWindowWidth*0.075;
|
|
||||||
let ebHeigth=mwInfo.mainWindowHeight*0.03;
|
|
||||||
//占位符的高度
|
|
||||||
let edHeigth=mwInfo.mainWindowWidth*0.005
|
|
||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct TextComboBox {
|
export struct TextComboBox {
|
||||||
@Param menu: Array<TitleButton> = new Array<TitleButton>;
|
@Param menu: Array<TitleButton> = new Array<TitleButton>;
|
||||||
@Local selectIndex:number=0;
|
@Local selectIndex:number=0;
|
||||||
@Param name:string|undefined=undefined;
|
|
||||||
@Builder
|
@Builder
|
||||||
EventMenu() {
|
EventMenu() {
|
||||||
Menu() {
|
Menu() {
|
||||||
ForEach(this.menu, (item: TitleButton, index: number) => {
|
ForEach(this.menu, (item: TitleButton, index: number) => {
|
||||||
MenuItem({ content: item.eName })
|
MenuItem({ content: item.eName })
|
||||||
.size({height: ebHeigth})
|
.size({height: mwInfo.mainWindowWidth*0.02})
|
||||||
.onClick(()=>{
|
.onClick(()=>{
|
||||||
this.selectIndex=index;
|
this.selectIndex=index;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}.fontSize(20)
|
}
|
||||||
}
|
}
|
||||||
build() {
|
build() {
|
||||||
Row() {
|
Row() {
|
||||||
Text(this.name!=undefined?this.name:'')
|
|
||||||
.fontSize(18)
|
|
||||||
.width('auto')
|
|
||||||
Text(this.menu[this.selectIndex].eName)
|
Text(this.menu[this.selectIndex].eName)
|
||||||
.bindMenu(this.EventMenu)
|
.bindMenu(this.EventMenu)
|
||||||
.width('50%')
|
}
|
||||||
.fontSize(18)
|
|
||||||
.backgroundColor('#ffe6e6e3')
|
|
||||||
.height(mwInfo.mainWindowHeight*0.022)
|
|
||||||
.margin({ top:0, left: 5, bottom: 0, right: 0 })
|
|
||||||
}.width(ebWidth)
|
|
||||||
.height(ebHeigth)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
@ -49,7 +33,7 @@ export struct TextInputComboBox {
|
|||||||
Menu() {
|
Menu() {
|
||||||
ForEach(this.menu, (item: TitleButton, index: number) => {
|
ForEach(this.menu, (item: TitleButton, index: number) => {
|
||||||
MenuItem({ content: item.eName })
|
MenuItem({ content: item.eName })
|
||||||
.size({height: ebHeigth})
|
.size({height: mwInfo.mainWindowWidth*0.02})
|
||||||
.onClick(()=>{
|
.onClick(()=>{
|
||||||
this.selectIndex=index;
|
this.selectIndex=index;
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
import { mwInfo } from "../AppStorageV2Class";
|
|
||||||
import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
import { TitleButton } from "../LayoutInterface/Interface/ButtonInterface";
|
||||||
import {SwitchView} from "../LayoutInterface/Layout/SwitchView"
|
import {SwitchView} from "../LayoutInterface/Layout/SwitchView"
|
||||||
|
|
||||||
//按钮统一尺寸,该按钮为正方形,所以以主窗口宽为基准,长=高->正方形
|
|
||||||
let ebWidth=mwInfo.mainWindowWidth*0.02;
|
|
||||||
let ebHeigth=mwInfo.mainWindowWidth*0.02;
|
|
||||||
//视图切换弹窗
|
//视图切换弹窗
|
||||||
@CustomDialog
|
@CustomDialog
|
||||||
export struct ViewDialog {
|
export struct ViewDialog {
|
||||||
@ -15,19 +11,14 @@ export struct ViewDialog {
|
|||||||
ForEach(SwitchView, (item: TitleButton, index?: number | undefined) => {
|
ForEach(SwitchView, (item: TitleButton, index?: number | undefined) => {
|
||||||
GridCol({ span: 1 }) {
|
GridCol({ span: 1 }) {
|
||||||
Row() {
|
Row() {
|
||||||
Button()
|
Image($r('app.media.' + item.eIcon))
|
||||||
.backgroundColor(Color.Transparent)
|
.width('35vp')
|
||||||
.backgroundImage($r('app.media.' + item.eIcon))
|
.height('35vp')
|
||||||
.backgroundImageSize({
|
.objectFit(ImageFit.Contain)
|
||||||
width: '100%', // 图片宽度占满按钮
|
|
||||||
height: '100%' // 图片高度占满按钮
|
|
||||||
})
|
|
||||||
.width(ebWidth)
|
|
||||||
.height(ebWidth)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}.margin({ top: 5, left: 1, bottom: 1, right: 1 })
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,6 +9,8 @@ import { BaseMenuData } from "../LayoutInterface/Interface/MenuInterface";
|
|||||||
let ebWidth=mwInfo.mainWindowWidth*0.02;
|
let ebWidth=mwInfo.mainWindowWidth*0.02;
|
||||||
let ebHeigth=mwInfo.mainWindowWidth*0.02;
|
let ebHeigth=mwInfo.mainWindowWidth*0.02;
|
||||||
|
|
||||||
|
|
||||||
|
//不带Index的Menu
|
||||||
@Builder
|
@Builder
|
||||||
export function BaseMenu(indexMenu:BaseMenuData) {
|
export function BaseMenu(indexMenu:BaseMenuData) {
|
||||||
Menu() {
|
Menu() {
|
||||||
@ -23,6 +25,7 @@ export function BaseMenu(indexMenu:BaseMenuData) {
|
|||||||
}else{
|
}else{
|
||||||
MenuItem({ startIcon: $r('app.media.'+item.eIcon), content: item.eName })
|
MenuItem({ startIcon: $r('app.media.'+item.eIcon), content: item.eName })
|
||||||
.onClick(()=> {
|
.onClick(()=> {
|
||||||
|
indexMenu.aIndex = index;
|
||||||
ExecuteCommand(item as TitleButton);
|
ExecuteCommand(item as TitleButton);
|
||||||
})
|
})
|
||||||
.size({height: ebWidth})
|
.size({height: ebWidth})
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import { SubColumnMenu} from "../CustomStyle/Button";
|
|||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct TitleColumnSub {
|
export struct TitleColumnSub {
|
||||||
|
|
||||||
@Local layerArray: Array<TitleButton> = [];
|
@Local layerArray: Array<TitleButton> = [];
|
||||||
@Local dX:number=0;
|
@Local dX:number=0;
|
||||||
@Local dY:number=0;
|
@Local dY:number=0;
|
||||||
@ -21,8 +22,8 @@ export struct TitleColumnSub {
|
|||||||
private ViewDialog(): CustomDialogController {
|
private ViewDialog(): CustomDialogController {
|
||||||
return new CustomDialogController({
|
return new CustomDialogController({
|
||||||
builder: ViewDialog(), // 确保 ViewDialog 组件已正确定义
|
builder: ViewDialog(), // 确保 ViewDialog 组件已正确定义
|
||||||
width: mwInfo.mainWindowWidth*0.06,
|
width: mwInfo.mainWindowWidth*0.04,
|
||||||
height: mwInfo.mainWindowWidth*0.052,
|
height: mwInfo.mainWindowWidth*0.04,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
cornerRadius: 5,
|
cornerRadius: 5,
|
||||||
isModal: true,
|
isModal: true,
|
||||||
@ -33,16 +34,21 @@ export struct TitleColumnSub {
|
|||||||
|
|
||||||
build(){
|
build(){
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
SubColumnMenu({
|
SubColumnMenu({menus:FileMenuData.aMenus as Array<TitleButton>,icon:'base_shortcut_menu'})
|
||||||
menus:FileMenuData.aMenus as Array<TitleButton>, icon:'base_shortcut_menu',name:'菜单'})
|
|
||||||
.margin({ top:0, left: 5, bottom: 0, right: 0 })
|
.margin({ top:0, left: 5, bottom: 0, right: 0 })
|
||||||
Text('|')
|
Text('菜单')
|
||||||
.fontSize(20)
|
.fontSize(20)
|
||||||
TextComboBox({name:'拾取类型:',menu:SelectionFilter})
|
Text('|')
|
||||||
|
Text('拾取类型:')
|
||||||
|
.fontSize(20)
|
||||||
|
TextComboBox({menu:SelectionFilter})
|
||||||
|
.borderWidth(1)
|
||||||
|
.borderColor(Color.Grey)
|
||||||
|
.borderRadius(5)
|
||||||
Text('图层:')
|
Text('图层:')
|
||||||
.fontSize(20)
|
.fontSize(20)
|
||||||
TextInputComboBox({menu:this.layerArray}).width('10%')
|
TextInputComboBox({menu:this.layerArray}).width('10%')
|
||||||
SubColumnMenu({menus:LayoutSwitch})
|
SubColumnMenu({menus:LayoutSwitch,icon:LayoutSwitch[0].eIcon})
|
||||||
//视角弹窗
|
//视角弹窗
|
||||||
Button().onClick((event) => {
|
Button().onClick((event) => {
|
||||||
this.dX=event.windowX
|
this.dX=event.windowX
|
||||||
@ -51,15 +57,15 @@ export struct TitleColumnSub {
|
|||||||
this.viewDialog=this.ViewDialog();
|
this.viewDialog=this.ViewDialog();
|
||||||
}
|
}
|
||||||
this.viewDialog.open();
|
this.viewDialog.open();
|
||||||
}).width(mwInfo.mainWindowWidth*0.014)
|
}).width(mwInfo.mainWindowWidth*0.013)
|
||||||
.height(mwInfo.mainWindowWidth*0.014)
|
.height(mwInfo.mainWindowWidth*0.013)
|
||||||
.backgroundColor(Color.Transparent)
|
.backgroundColor(Color.Transparent)
|
||||||
.backgroundImage($r('app.media.' + SwitchView[0].eIcon))
|
.backgroundImage($r('app.media.' + SwitchView[0].eIcon))
|
||||||
.backgroundImageSize({
|
.backgroundImageSize({
|
||||||
width: '100%', // 图片宽度占满按钮
|
width: '100%', // 图片宽度占满按钮
|
||||||
height: '100%' // 图片高度占满按钮
|
height: '100%' // 图片高度占满按钮
|
||||||
})
|
})
|
||||||
SubColumnMenu({menus:DisplayMode})
|
SubColumnMenu({menus:DisplayMode,icon:DisplayMode[0].eIcon})
|
||||||
}.margin({ top: 1, left: 1, bottom: 1, right: 1 })
|
}.margin({ top: 1, left: 1, bottom: 1, right: 1 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,8 +3,8 @@ import {TitleTabData, TitleModel} from '../LayoutInterface/Layout/TitleTabData'
|
|||||||
import { FileMenuData } from "../LayoutInterface/Layout/FileMenuData";
|
import { FileMenuData } from "../LayoutInterface/Layout/FileMenuData";
|
||||||
import {TitleTabContent} from './TitleTabContent'
|
import {TitleTabContent} from './TitleTabContent'
|
||||||
import { mwInfo } from '../AppStorageV2Class';
|
import { mwInfo } from '../AppStorageV2Class';
|
||||||
import { TitleButton } from '../LayoutInterface/Interface/ButtonInterface';
|
|
||||||
import { BaseMenu} from '../CustomStyle/Menu';
|
import { BaseMenu} from '../CustomStyle/Menu';
|
||||||
|
import { TitleButton } from '../LayoutInterface/Interface/ButtonInterface';
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { TitleGroup} from '../LayoutInterface/Interface/GroupInterface';
|
|||||||
import {GroupTextEventMenu} from '../CustomStyle/Menu'
|
import {GroupTextEventMenu} from '../CustomStyle/Menu'
|
||||||
import {EventBtn,MenuBtn} from '../CustomStyle/Button'
|
import {EventBtn,MenuBtn} from '../CustomStyle/Button'
|
||||||
import { TitleModel } from '../LayoutInterface/Layout/TitleTabData';
|
import { TitleModel } from '../LayoutInterface/Layout/TitleTabData';
|
||||||
|
import { mwInfo } from '../AppStorageV2Class';
|
||||||
|
|
||||||
@ComponentV2
|
@ComponentV2
|
||||||
export struct TitleTabContent {
|
export struct TitleTabContent {
|
||||||
@ -29,24 +30,25 @@ export struct TitleTabContent {
|
|||||||
ForEach(group_item.grpBtn, (btn_item: TitleButton|Array<TitleButton>, index: number) =>{
|
ForEach(group_item.grpBtn, (btn_item: TitleButton|Array<TitleButton>, index: number) =>{
|
||||||
if(this.curtLayout?.cmName=='应用模块'){
|
if(this.curtLayout?.cmName=='应用模块'){
|
||||||
if(Array.isArray(btn_item)){
|
if(Array.isArray(btn_item)){
|
||||||
MenuBtn({menus:btn_item})
|
MenuBtn({menuBtn:btn_item})
|
||||||
}else{
|
}else{
|
||||||
EventBtn({eventBtn:btn_item,eventBtnType:true})
|
EventBtn({eventBtn:btn_item,eventBtnType:true})
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(Array.isArray(btn_item)){
|
if(Array.isArray(btn_item)){
|
||||||
MenuBtn({menus:btn_item})
|
MenuBtn({menuBtn:btn_item})
|
||||||
}else{
|
}else{
|
||||||
EventBtn({eventBtn:btn_item})
|
EventBtn({eventBtn:btn_item})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}.margin({ top: 1,left:10,bottom:1,right:10})
|
}.margin({ top: 1,left:1,bottom:1,right:1})
|
||||||
//功能组名
|
//功能组名
|
||||||
Row(){
|
Row(){
|
||||||
GroupTextEventMenu({grpEvent:group_item})
|
GroupTextEventMenu({grpEvent:group_item})
|
||||||
}.margin({ top: 0,left:0,bottom:-5,right:0})
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Divider().vertical(true).strokeWidth(1).lineCap(LineCapStyle.Round).height('95%').backgroundColor(Color.Gray)
|
Divider().vertical(true).strokeWidth(1).lineCap(LineCapStyle.Round).height('95%').backgroundColor(Color.Gray)
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user