摘要: 执行get请求 执行post 阅读全文
posted @ 2019-03-27 18:01 Haoyin-杰克 阅读(3739) 评论(0) 推荐(0) 编辑
摘要: 1.在getInitialState中初始化isloading,初始值false 2. 解决方法: 增加一个加载状态,默认为 false,调用 componentWillMount() 时,设置为 true,当这个加载状态是 true 时,暂不渲染,当回调函数执行完毕后,设置为 false,此时再调 阅读全文
posted @ 2019-03-21 14:23 Haoyin-杰克 阅读(6408) 评论(0) 推荐(0) 编辑
摘要: handleResetClick = e => { this.props.form.resetFields();}; 阅读全文
posted @ 2019-03-21 10:45 Haoyin-杰克 阅读(4605) 评论(0) 推荐(0) 编辑
摘要: 新浪新闻API ustcmio 关注 2017.01.15 20:44* 字数 536 阅读 2479评论 2喜欢 7 ustcmio 关注 2017.01.15 20:44* 字数 536 阅读 2479评论 2喜欢 7 2017.01.15 20:44* 字数 536 阅读 2479评论 2喜欢 阅读全文
posted @ 2019-03-11 18:02 Haoyin-杰克 阅读(2899) 评论(0) 推荐(0) 编辑
摘要: 1、active-class是哪个组件的属性?嵌套路由怎么定义?答:vue-router模块的router-link组件。 2、怎么定义vue-router的动态路由?怎么获取传过来的动态参数? 答:在router目录下的index.js文件中,对path属性加上/:id。 使用router对象的p 阅读全文
posted @ 2019-03-04 10:48 Haoyin-杰克 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 答:vue.js 是采用数据劫持结合发布者-订阅者模式的方式,通过Object.defineProperty()来劫持各个属性的setter,getter,在数据变动时发布消息给订阅者,触发相应的监听回调。 具体步骤: 第一步:需要observe的数据对象进行递归遍历,包括子属性对象的属性,都加上  阅读全文
posted @ 2019-03-04 10:30 Haoyin-杰克 阅读(1758) 评论(0) 推荐(0) 编辑
摘要: axios封装 调用: 阅读全文
posted @ 2019-02-26 15:14 Haoyin-杰克 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 一、安装Jsonp npm install jsonp --save 二、封装组件 建一个axios文件夹,创建index.js文件 1 import Jsonp from 'jsonp' 2 import axios from 'axios' 3 import {Modal} from 'antd 阅读全文
posted @ 2019-02-26 14:48 Haoyin-杰克 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1 createSwiper1() { 2 var option = { 3 // slidesPerView: 5, 4 slidesPerView: 3, 5 centeredSlides:true, 6 }; 7 if (this.state.newData.length > 2) { 8 o 阅读全文
posted @ 2019-01-21 15:02 Haoyin-杰克 阅读(1384) 评论(0) 推荐(0) 编辑
摘要: 我们引用的是axios 给src目录增加 api 文件夹 里面写上index.js 接口处理函数 这个函数每个项目都是不一样的,我现在调整的是适用于 https://cnodejs.org/api/v1 的接口,如果是其他接口 需要根据接口的参数进行调整。参考说明文档地址: https://cnod 阅读全文
posted @ 2019-01-21 14:49 Haoyin-杰克 阅读(4084) 评论(0) 推荐(0) 编辑