1 2 3 4
上一页 1 2 3 4 5 6 ··· 15 下一页
摘要: 我们在做表单的时候经常会遇到一个场景需要数组对象格式的数据,例如我们填写公司成员信息,如下图: 我们需要的数据格式是数组对象,这时我们在getFieldDecorator要如何取名字呢? <Form.Item style={{ margin: 0 }}> {getFieldDecorator(`co 阅读全文
posted @ 2020-06-23 11:04 红鲤鱼与LV 阅读(7031) 评论(0) 推荐(0) 编辑
摘要: 1.失去焦点时验证 <Col span={12}> <Form.Item label="账号" labelCol={{ span: 5 }} wrapperCol={{ span: 16 }} > {isAdd ? ( getFieldDecorator('bank_account', { rule 阅读全文
posted @ 2020-06-23 10:43 红鲤鱼与LV 阅读(9378) 评论(1) 推荐(0) 编辑
摘要: 1.fetch是浏览器自带的,不需要安装或引用,可直接使用 fetch('/api/products') .then(response=>response.json()) .then(result=>{ ....//处理数据 }) 阅读全文
posted @ 2020-06-01 16:37 红鲤鱼与LV 阅读(179) 评论(0) 推荐(0) 编辑
摘要: //类装饰器(无法传参) function logClass(params:any){//params就是当前的类 console.log(params) params.prototype.apiUrl = '动态扩展的属性'; params.prototype.run = function(){ 阅读全文
posted @ 2020-05-22 16:24 红鲤鱼与LV 阅读(473) 评论(0) 推荐(0) 编辑
摘要: //泛型 //泛型就是解决类、接口、方法的复用性,以及对不特定数据类型的支持 //可以支持不特定的数据类型,要求:传入的参数和返回的参数一致 //T表示泛型(只要是任意大写字母就可以),具体什么类型就是调用这个方法的时候决定的 function getData<T>(value:T):T{ retu 阅读全文
posted @ 2020-05-22 15:59 红鲤鱼与LV 阅读(204) 评论(0) 推荐(0) 编辑
摘要: https://juejin.im/post/5aa1395c6fb9a028df223516 阅读全文
posted @ 2020-05-20 14:22 红鲤鱼与LV 阅读(136) 评论(0) 推荐(0) 编辑
摘要: //4.1定义类 class Person{ name:string; constructor(n:string){ this.name = n; } getName():string{ return this.name } setName(name:string):void{ this.name 阅读全文
posted @ 2020-05-15 14:15 红鲤鱼与LV 阅读(144) 评论(0) 推荐(0) 编辑
摘要: //字符 var str:string = "124"; //数字 let a:number = 1; //布尔 let b:boolean = false; //数组 let c:number[] = [1,23,23]; let d:Array<number> = [1,23,45]; let 阅读全文
posted @ 2020-05-12 11:31 红鲤鱼与LV 阅读(1119) 评论(0) 推荐(0) 编辑
摘要: 报primordials is not defined是由于node版本太高了,把node版本切换低些可以参考https://blog.csdn.net/yym836659673/article/details/104847572/#安装npm版本控制器npm install -g n#切换npm版 阅读全文
posted @ 2020-05-09 11:04 红鲤鱼与LV 阅读(5655) 评论(0) 推荐(0) 编辑
摘要: 1.tsconfig-json相关配置 https://www.typescriptlang.org/docs/handbook/tsconfig-json.html2.ts另一个网站: https://ts.xcatliu.com/introduction3.tslint.json相关配置http 阅读全文
posted @ 2020-05-08 15:54 红鲤鱼与LV 阅读(213) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 15 下一页