调整子窗口行高
This commit is contained in:
parent
8c11896d28
commit
5a9727957a
@ -66,7 +66,7 @@ export struct SWImportFile {
|
|||||||
Text('文档单位').fontSize(20)
|
Text('文档单位').fontSize(20)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
|
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
|
||||||
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
|
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
|
||||||
@ -102,7 +102,7 @@ export struct SWImportFile {
|
|||||||
Text('导入到全新图层').fontSize(20)
|
Text('导入到全新图层').fontSize(20)
|
||||||
}
|
}
|
||||||
Blank().layoutWeight(1)
|
Blank().layoutWeight(1)
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Text('导入模型路径:')
|
Text('导入模型路径:')
|
||||||
.width(mwInfo.width*this.scalingText)
|
.width(mwInfo.width*this.scalingText)
|
||||||
@ -130,7 +130,7 @@ export struct SWImportFile {
|
|||||||
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
|
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}.height('10%')
|
||||||
Blank().layoutWeight(1)
|
Blank().layoutWeight(1)
|
||||||
Row(){
|
Row(){
|
||||||
Button('确定')
|
Button('确定')
|
||||||
@ -138,7 +138,7 @@ export struct SWImportFile {
|
|||||||
.fontColor($r('sys.color.font_emphasize'))
|
.fontColor($r('sys.color.font_emphasize'))
|
||||||
.fontWeight(FontWeight.Medium)
|
.fontWeight(FontWeight.Medium)
|
||||||
.fontSize($r('sys.float.Body_L'))
|
.fontSize($r('sys.float.Body_L'))
|
||||||
}.alignItems(VerticalAlign.Center)
|
}.alignItems(VerticalAlign.Center).height('10%')
|
||||||
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
|
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5,6 +5,7 @@ import { TextComboBox } from "../../CustomController/ComboBox";
|
|||||||
import {XNRandomId} from '../ExCom'
|
import {XNRandomId} from '../ExCom'
|
||||||
import { CreateModelType,DocUnitsType } from './FileStr';
|
import { CreateModelType,DocUnitsType } from './FileStr';
|
||||||
import { mwInfo } from '../../DispWinInfo/DispWinInfo'
|
import { mwInfo } from '../../DispWinInfo/DispWinInfo'
|
||||||
|
import { window } from '@kit.ArkUI';
|
||||||
|
|
||||||
function CurrentTime():string {
|
function CurrentTime():string {
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
@ -36,11 +37,11 @@ export struct SWNewFile {
|
|||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
TextComboBox({name:'创建文档模块:',menu:CreateModelType})
|
TextComboBox({name:'创建文档模块:',menu:CreateModelType})
|
||||||
Blank().layoutWeight(1)
|
Blank().layoutWeight(1)
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
TextComboBox({name:'建模单位:',menu:DocUnitsType})
|
TextComboBox({name:'建模单位:',menu:DocUnitsType})
|
||||||
Blank().layoutWeight(1)
|
Blank().layoutWeight(1)
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Text('保存目录:')
|
Text('保存目录:')
|
||||||
.width(mwInfo.width*this.scalingText)
|
.width(mwInfo.width*this.scalingText)
|
||||||
@ -55,7 +56,6 @@ export struct SWNewFile {
|
|||||||
let context = getContext(this) as common.Context;
|
let context = getContext(this) as common.Context;
|
||||||
try {
|
try {
|
||||||
let documentSelectOptions = new picker.DocumentSelectOptions();
|
let documentSelectOptions = new picker.DocumentSelectOptions();
|
||||||
documentSelectOptions.selectMode = picker.DocumentSelectMode.FOLDER;
|
|
||||||
let documentPicker = new picker.DocumentViewPicker(context);
|
let documentPicker = new picker.DocumentViewPicker(context);
|
||||||
documentPicker.select(documentSelectOptions,(err: BusinessError,documentSelectResult: Array<string>) => {
|
documentPicker.select(documentSelectOptions,(err: BusinessError,documentSelectResult: Array<string>) => {
|
||||||
this.dir =documentSelectResult.toString();
|
this.dir =documentSelectResult.toString();
|
||||||
@ -68,7 +68,7 @@ export struct SWNewFile {
|
|||||||
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
|
console.error(`DocumentViewPicker failed with err: ${err.code}, ${err.message}`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Text('文件名:').width(mwInfo.width*this.scalingText)
|
Text('文件名:').width(mwInfo.width*this.scalingText)
|
||||||
TextInput({placeholder:this.fileName}).layoutWeight(1)
|
TextInput({placeholder:this.fileName}).layoutWeight(1)
|
||||||
@ -81,11 +81,11 @@ export struct SWNewFile {
|
|||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
this.fileName='OpenCAX_'+XNRandomId();
|
this.fileName='OpenCAX_'+XNRandomId();
|
||||||
})
|
})
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Text('文档创建人:').width(mwInfo.width*this.scalingText)
|
Text('文档创建人:').width(mwInfo.width*this.scalingText)
|
||||||
TextInput({placeholder:this.fileName}).layoutWeight(1)
|
TextInput({placeholder:this.fileName}).layoutWeight(1)
|
||||||
}
|
}.height('10%')
|
||||||
Row({space:5}){
|
Row({space:5}){
|
||||||
Text('文档创建时间:').width(mwInfo.width*this.scalingText)
|
Text('文档创建时间:').width(mwInfo.width*this.scalingText)
|
||||||
TextInput({placeholder:this.docCreateTime}).layoutWeight(1)
|
TextInput({placeholder:this.docCreateTime}).layoutWeight(1)
|
||||||
@ -98,7 +98,7 @@ export struct SWNewFile {
|
|||||||
.onClick(()=>{
|
.onClick(()=>{
|
||||||
this.docCreateTime=CurrentTime();
|
this.docCreateTime=CurrentTime();
|
||||||
})
|
})
|
||||||
}
|
}.height('10%')
|
||||||
Blank().layoutWeight(1)
|
Blank().layoutWeight(1)
|
||||||
Row(){
|
Row(){
|
||||||
Button('确定')
|
Button('确定')
|
||||||
@ -106,7 +106,7 @@ export struct SWNewFile {
|
|||||||
.fontColor($r('sys.color.font_emphasize'))
|
.fontColor($r('sys.color.font_emphasize'))
|
||||||
.fontWeight(FontWeight.Medium)
|
.fontWeight(FontWeight.Medium)
|
||||||
.fontSize($r('sys.float.Body_L'))
|
.fontSize($r('sys.float.Body_L'))
|
||||||
}.alignItems(VerticalAlign.Center)
|
}.alignItems(VerticalAlign.Center).height('10%')
|
||||||
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
|
}.margin({ top:5, left: 5, bottom: 5, right: 5 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user