@neteast/k-tools
v2.0.4
Published
前端工具库
Downloads
2
Readme
安装说明
npm install k-tools --save
k-tools 工具库文档
参数注释
示例
//引入组件
import { Constant, Reg, Utils } from 'k-tools'
const { CONS_DOMAIN, CONS_SUBSTR_KEYWORD } = Constant;
const { testVerifyCode, testEmail } = Reg;
const { funcMoneyFormat, funcRenderTypeName } = Utils;
class Demo extends React.Component {
console.log("常量", CONS_DOMAIN, CONS_SUBSTR_KEYWORD);
console.log("正则", testVerifyCode(123456), testEmail([email protected]));
console.log("方法", funcMoneyFormat(10.52), funcRenderTypeName([{text: '名称', value: 'value'}], 'value'));
render() {
return <div></div>;
}
}
export default Demo;