HMRouter集成
This commit is contained in:
@@ -8,31 +8,28 @@ export struct InputPopWindow {
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 提示语标题
|
||||
Text(this.title)
|
||||
.fontSize(18)
|
||||
.margin({ top: 20, bottom: 15 });
|
||||
|
||||
// 输入框
|
||||
TextInput({ placeholder: '分组名' })
|
||||
.width('90%')
|
||||
.height(50)
|
||||
.onChange((value: string) => {
|
||||
this.inputValue = value; // 双向绑定更新值
|
||||
this.inputValue = value
|
||||
})
|
||||
.border({ width: 1, color: '#CCCCCC' })
|
||||
.backgroundColor(Color.White)
|
||||
.borderRadius(4)
|
||||
|
||||
// 按钮行(取消 + 确定)
|
||||
Flex({ justifyContent: FlexAlign.SpaceAround }) {
|
||||
Text('取消')
|
||||
.fontColor('#666666')
|
||||
.textAlign(TextAlign.Center)
|
||||
.width('30%')
|
||||
.onClick(() => {
|
||||
this.cancel?.(); // 触发取消回调
|
||||
this.controller.close(); // 关闭弹窗
|
||||
this.cancel?.()
|
||||
this.controller.close()
|
||||
})
|
||||
|
||||
Text('确定')
|
||||
@@ -40,8 +37,7 @@ export struct InputPopWindow {
|
||||
.textAlign(TextAlign.Center)
|
||||
.width('30%')
|
||||
.onClick(() => {
|
||||
this.confirm?.(this.inputValue); // 传递输入值给父组件
|
||||
this.controller.close();
|
||||
this.confirm?.(this.inputValue)
|
||||
})
|
||||
}
|
||||
.margin({ top: 20, bottom: 10 })
|
||||
|
||||
Reference in New Issue
Block a user