患者相关文件
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
@CustomDialog
|
||||
export struct InputPopWindow {
|
||||
controller: CustomDialogController; // 控制器(必须)
|
||||
@Prop title: string; // 提示语(从父组件传入)
|
||||
@Link inputValue: string; // 输入框值(双向绑定)
|
||||
|
||||
// 按钮回调函数(通过构造函数传入)
|
||||
private cancel?: () => void;
|
||||
private confirm?: (value: string) => void;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
// 提示语标题
|
||||
Text(this.title)
|
||||
.fontSize(18)
|
||||
.margin({ top: 20, bottom: 15 });
|
||||
|
||||
// 输入框
|
||||
TextInput({ placeholder: '请输入内容', text: this.inputValue })
|
||||
.width('90%')
|
||||
.height(50)
|
||||
.onChange((value: string) => {
|
||||
this.inputValue = value; // 双向绑定更新值
|
||||
})
|
||||
.border({ width: 1, color: '#CCCCCC' })
|
||||
.borderRadius(4)
|
||||
|
||||
// 按钮行(取消 + 确定)
|
||||
Flex({ justifyContent: FlexAlign.SpaceAround }) {
|
||||
Button('取消')
|
||||
.backgroundColor('#FFFFFF')
|
||||
.fontColor('#666666')
|
||||
.onClick(() => {
|
||||
this.cancel?.(); // 触发取消回调
|
||||
this.controller.close(); // 关闭弹窗
|
||||
})
|
||||
|
||||
Button('确定')
|
||||
.backgroundColor('#317AFF')
|
||||
.fontColor('#FFFFFF')
|
||||
.onClick(() => {
|
||||
this.confirm?.(this.inputValue); // 传递输入值给父组件
|
||||
this.controller.close();
|
||||
})
|
||||
}
|
||||
.margin({ top: 20, bottom: 10 })
|
||||
.width('100%')
|
||||
}
|
||||
.width('100%')
|
||||
.padding(10)
|
||||
.borderRadius(16) // 圆角弹窗
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,7 @@ export class BasicConstant {
|
||||
static readonly patientCard = BasicConstant.urlExpertAPI+'patientCard'
|
||||
static readonly toAddNickname = BasicConstant.urlExpert+'toAddNickname'
|
||||
static readonly patientDetail = BasicConstant.urlExpert+'patientDetail'
|
||||
static readonly GroupList = BasicConstant.urlExpertApp+'GroupList'
|
||||
static readonly getStartpage=BasicConstant.urlExpertApp + "startpage";
|
||||
static readonly meetingListV2=BasicConstant.urlExpertAPI + "meetingListV2";
|
||||
static readonly meetingV2Video=BasicConstant.urlExpertAPI + "meetingV2Video";
|
||||
|
||||
Reference in New Issue
Block a user