调整子窗口行高

This commit is contained in:
JackLee 2026-04-10 23:05:03 +08:00
parent 8c11896d28
commit 5a9727957a
2 changed files with 12 additions and 12 deletions

View File

@ -66,7 +66,7 @@ export struct SWImportFile {
Text('文档单位').fontSize(20)
}
}
}.height('10%')
Row({space:5}){
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
@ -102,7 +102,7 @@ export struct SWImportFile {
Text('导入到全新图层').fontSize(20)
}
Blank().layoutWeight(1)
}
}.height('10%')
Row({space:5}){
Text('导入模型路径:')
.width(mwInfo.width*this.scalingText)
@ -130,7 +130,7 @@ export struct SWImportFile {
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
}
})
}
}.height('10%')
Blank().layoutWeight(1)
Row(){
Button('确定')
@ -138,7 +138,7 @@ export struct SWImportFile {
.fontColor($r('sys.color.font_emphasize'))
.fontWeight(FontWeight.Medium)
.fontSize($r('sys.float.Body_L'))
}.alignItems(VerticalAlign.Center)
}.alignItems(VerticalAlign.Center).height('10%')
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
}
}

View File

@ -5,6 +5,7 @@ import { TextComboBox } from "../../CustomController/ComboBox";
import {XNRandomId} from '../ExCom'
import { CreateModelType,DocUnitsType } from './FileStr';
import { mwInfo } from '../../DispWinInfo/DispWinInfo'
import { window } from '@kit.ArkUI';
function CurrentTime():string {
let now = new Date();
@ -36,11 +37,11 @@ export struct SWNewFile {
Row({space:5}){
TextComboBox({name:'创建文档模块:',menu:CreateModelType})
Blank().layoutWeight(1)
}
}.height('10%')
Row({space:5}){
TextComboBox({name:'建模单位:',menu:DocUnitsType})
Blank().layoutWeight(1)
}
}.height('10%')
Row({space:5}){
Text('保存目录:')
.width(mwInfo.width*this.scalingText)
@ -55,7 +56,6 @@ export struct SWNewFile {
let context = getContext(this) as common.Context;
try {
let documentSelectOptions = new picker.DocumentSelectOptions();
documentSelectOptions.selectMode = picker.DocumentSelectMode.FOLDER;
let documentPicker = new picker.DocumentViewPicker(context);
documentPicker.select(documentSelectOptions,(err: BusinessError,documentSelectResult: Array<string>) => {
this.dir =documentSelectResult.toString();
@ -68,7 +68,7 @@ export struct SWNewFile {
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
}
})
}
}.height('10%')
Row({space:5}){
Text('文件名:').width(mwInfo.width*this.scalingText)
TextInput({placeholder:this.fileName}).layoutWeight(1)
@ -81,11 +81,11 @@ export struct SWNewFile {
.onClick(() => {
this.fileName='OpenCAX_'+XNRandomId();
})
}
}.height('10%')
Row({space:5}){
Text('文档创建人:').width(mwInfo.width*this.scalingText)
TextInput({placeholder:this.fileName}).layoutWeight(1)
}
}.height('10%')
Row({space:5}){
Text('文档创建时间:').width(mwInfo.width*this.scalingText)
TextInput({placeholder:this.docCreateTime}).layoutWeight(1)
@ -98,7 +98,7 @@ export struct SWNewFile {
.onClick(()=>{
this.docCreateTime=CurrentTime();
})
}
}.height('10%')
Blank().layoutWeight(1)
Row(){
Button('确定')
@ -106,7 +106,7 @@ export struct SWNewFile {
.fontColor($r('sys.color.font_emphasize'))
.fontWeight(FontWeight.Medium)
.fontSize($r('sys.float.Body_L'))
}.alignItems(VerticalAlign.Center)
}.alignItems(VerticalAlign.Center).height('10%')
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
}
}