K.str_replace方法
版本:4.0.0
K.str_replace方法功能类似PHP的str_replace函数,注意该方法只接受字符串类型或数组元素字符串类型,不接受数字类型。
// search为要搜索的字符串/数组,replace为要替换成的新字符串/数组,subject为被搜索的字符串
K.str_replace(search, replace, subject)
用法举例:
K.str_replace('1','','121223');
// 返回"2223"
K.str_replace(
2021-05-20
K.return_set_html方法_快速生成HTML输入框
版本:4.0.0
K.return_set_html方法可以快速生成HTML输入框,type支持:text,number,email,label,password,checkbox,checkboxs,textarea,code,nav,json,editor,switch,toggle,upload,uploads,time
/*
* data:[{"name":"","title":"","content":"","type":"","value":""},]
*/
K.return_set_
2021-05-21
K.select2hintbox方法_弹出式菜单方法
版本:4.0.0/*
* 弹出式提示框,支持select变换
* options = {
data:[{name,value,disabled,selected,click},],
css:弹出框的css,
spanstyle:'', //仅select对象时有效
spanclass:'', //仅select对象时有效,
hover:false, //true为鼠标划过弹出,false为点击弹出,
click:'', // 全局点击事件,会带回value参数,
arrow
2021-06-23
K.templates方法_简易前端HTML模板列表渲染方法
版本:4.0.0
该方法为K.template的附加方法,一般用于渲染列表集。
K.templates(html, arr);
用法举例:
K.templates('<div>${name}</div>',[{name:"no1"},{name:"no2"},{name:"no3"}]);
// 返回"<div>no1</div><div>no2</div><div>no3</div>"
2021-06-23