|
|
@ -48,6 +48,33 @@ const builder = { |
|
|
|
* @returns {Component} |
|
|
|
*/ |
|
|
|
input: function (attr = {}) { return builder.genTag("input", attr); }, |
|
|
|
inputTags: function (attr = {}) { |
|
|
|
return { |
|
|
|
button() { return builder.genTag("input", Object.assign(attr, { "type": "button" })) }, |
|
|
|
checkbox() { return builder.genTag("input", Object.assign(attr, { "type": "checkbox" })) }, |
|
|
|
color() { return builder.genTag("input", Object.assign(attr, { "type": "color" })) }, |
|
|
|
date() { return builder.genTag("input", Object.assign(attr, { "type": "date" })) }, |
|
|
|
datetime() { return builder.genTag("input", Object.assign(attr, { "type": "datetime" })) }, |
|
|
|
datetime_local() { return builder.genTag("input", Object.assign(attr, { "type": "datetime-local" })) }, |
|
|
|
email() { return builder.genTag("input", Object.assign(attr, { "type": "email" })) }, |
|
|
|
file() { return builder.genTag("input", Object.assign(attr, { "type": "file" })) }, |
|
|
|
image() { return builder.genTag("input", Object.assign(attr, { "type": "image" })) }, |
|
|
|
month() { return builder.genTag("input", Object.assign(attr, { "type": "month" })) }, |
|
|
|
number() { return builder.genTag("input", Object.assign(attr, { "type": "number" })) }, |
|
|
|
password() { return builder.genTag("input", Object.assign(attr, { "type": "password" })) }, |
|
|
|
radio() { return builder.genTag("input", Object.assign(attr, { "type": "radio" })) }, |
|
|
|
range() { return builder.genTag("input", Object.assign(attr, { "type": "range" })) }, |
|
|
|
reset() { return builder.genTag("input", Object.assign(attr, { "type": "reset" })) }, |
|
|
|
search() { return builder.genTag("input", Object.assign(attr, { "type": "search" })) }, |
|
|
|
submit() { return builder.genTag("input", Object.assign(attr, { "type": "submit" })) }, |
|
|
|
tel() { return builder.genTag("input", Object.assign(attr, { "type": "tel" })) }, |
|
|
|
text() { return builder.genTag("input", Object.assign(attr, { "type": "text" })) }, |
|
|
|
time() { return builder.genTag("input", Object.assign(attr, { "type": "time" })) }, |
|
|
|
url() { return builder.genTag("input", Object.assign(attr, { "type": "url" })) }, |
|
|
|
week() { return builder.genTag("input", Object.assign(attr, { "type": "week" })) } |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {Map<string,string>} attr |
|
|
@ -90,12 +117,6 @@ const builder = { |
|
|
|
* @returns {Component} |
|
|
|
*/ |
|
|
|
option: function (attr = {}) { return builder.genTag("option", attr); }, |
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {Map<string,string>} attr |
|
|
|
* @returns {Component} |
|
|
|
*/ |
|
|
|
select: function (attr = {}) { return builder.genTag("select", attr); }, |
|
|
|
/** |
|
|
|
* |
|
|
|
* @param {Map<string,string>} attr |
|
|
|