版本:4.0.0
K.input_beautify方法可以美化HTML控件,但需要相应的控件带有规定的class,对照表如下:
|
控件 |
class名称 |
|
input[type="checkbox"] |
_input_checkboxs或_input_checkbox,第一个为渲染checkbox组,第二个为单独渲染 |
|
input[type="password"] |
_input_password,默认密码5-16位 |
|
input[type="text"] |
_input_json,json数据录入控件 |
|
select |
_input_toggle,select控件美化为开关模式 |
|
input[type="text"] |
_input_label,标签组控件 |
|
input[type="text"] |
_input_time,日期时间选择控件 |
|
input[type="number"] |
_input_number,数字输入控件 |
|
textarea |
_input_code,代码输入控件 |
|
textarea |
_input_editor,编辑器控件 |
K.input2checkboxs(selector, {
hidden: false,
readonly: false
});
K.input2checkbox(selector);
K.input2password(selector), {
maxlength: 16,
minlength: 5,
title: K.L('密码为5-16位,留空或格式非法为不修改')
});
K.input2json(selector);
K.select2toggle(selector);
K.input2label(selector);
K.input2datetime(selector);
K.input2number(selector);
K.codemirror(selector);