Commit c5d621ee by huangqy

修复BUG

parent f534b4ef
...@@ -32,8 +32,6 @@ interface FormData { ...@@ -32,8 +32,6 @@ interface FormData {
@Component @Component
export struct BasicDialog { export struct BasicDialog {
private title: string; private title: string;
@Link formData: FormData;
@Link clickItem: UniListItem
controller: CustomDialogController controller: CustomDialogController
cancel: () => void cancel: () => void
...@@ -51,15 +49,15 @@ export struct BasicDialog { ...@@ -51,15 +49,15 @@ export struct BasicDialog {
.color('#19ac88') .color('#19ac88')
.opacity(0.6) .opacity(0.6)
.margin({ left: 8, right: 8 }) .margin({ left: 8, right: 8 })
Text(this.clickItem.title).fontSize(20) Text(this.title).fontSize(20)
} }
.padding({ top: 10, bottom: 10 }) .padding({ top: 10, bottom: 10 })
} }
Column() { Column() {
TextInput({ placeholder: '', text: this.formData[this.clickItem?.key] }).height(40).width('90%').borderRadius(4) TextInput({ placeholder: '', text: this.title }).height(40).width('90%').borderRadius(4)
.onChange((value: string) => { .onChange((value: string) => {
this.formData[this.clickItem?.key] = value this.title = value
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论