From ec90e010dca75908753c7249628b240da7f1d919 Mon Sep 17 00:00:00 2001 From: lxsang Date: Fri, 10 Jul 2020 16:06:49 +0200 Subject: [PATCH] add input type to prompt dialog --- src/core/BaseDialog.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/BaseDialog.ts b/src/core/BaseDialog.ts index cffe28b..4c99e35 100644 --- a/src/core/BaseDialog.ts +++ b/src/core/BaseDialog.ts @@ -281,7 +281,8 @@ namespace OS { * { * title: string, // window title * label: string, // label text - * value: string // user input text + * value: string, // user input text + * type: string // input type: text or password * } * ``` * @@ -318,6 +319,11 @@ namespace OS { $input.val(this.data.value); } + if (this.data && this.data.type) + { + ($input[0] as HTMLInputElement).type = this.data.type + } + (this.find("btnOk") as tag.ButtonTag).onbtclick = (e) => { if (this.handle) { this.handle($input.val());