OpenCAX/entry/src/main/ets/pages/EventSubWindow/SWExtrude.ets

30 lines
991 B
Plaintext

import { mwInfo } from '../AppStorageV2Class';
import { Expandable } from '../CustomStyle/Expandable';
@Entry
@ComponentV2
struct SWExtrude {
// 控制内容区域显示与隐藏的状态
@Provider('isSubExpanded') isExpanded:boolean=true;
build() {
Column({ space: 5 }) {
Column(){
Expandable({title:"拉伸"});
Row(){
// 内容区域,使用条件渲染来控制显示与隐藏
if (this.isExpanded) {
Text('*选择曲线(0)')
Blank().width('30%')
Button('绘制曲线')
Button('选择曲线')
}
}.justifyContent(FlexAlign.Start)
}
}.width('100%') // 容器宽度
.padding(15) // 内边距
.backgroundColor('#ffffff') // 背景色
.borderRadius(8) // 边框圆角
.shadow({ radius: 4, color: '#1f000000', offsetX: 2, offsetY: 2 }) // 添加阴影
.margin({ top: 5, left: 5, bottom: 5, right: 5 })
}
}