2
0
mirror of https://github.com/esiur/iui.git synced 2025-06-27 09:23:12 +00:00
This commit is contained in:
2024-07-04 12:31:24 +03:00
parent 0709891cf0
commit d5a139b5d6
2 changed files with 77 additions and 72 deletions

View File

@ -55,7 +55,11 @@ export default IUI.module(
this._span = document.createElement("span");
this._span.innerHTML = this.getAttribute("caption");
this._input = document.createElement("input");
let type = this.hasAttribute("type")
? this.getAttribute("type").toLowerCase()
: "text";
this._input = document.createElement(type == "multiline" ? "textarea" : "input");
this._input.placeholder = this.getAttribute("placeholder") || "";
let self = this;
@ -69,9 +73,6 @@ export default IUI.module(
self._emit("change", { value: self.value });
});
this.type = this.hasAttribute("type")
? this.getAttribute("type").toLowerCase()
: "text";
this.accept = this.getAttribute("accept");