摘要: 一.类:es6 res: 二.生命周期函数 组件生命周期概述 1.初始化 在组件初始化阶段会执行 1. constructor 2. static getDerivedStateFromProps() 3. componentWillMount() / UNSAFE_componentWillMou 阅读全文
posted @ 2018-08-12 14:56 飞刀还问情 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 箭头函数扩展: 箭头函数: functoin 函数名(参数){    函数体 } 箭头函数: 1、把function删掉 , 2、参数和{}之间加上 箭头= 简写: 1、参数的简写:只有一个参数才能简写 2、函数体的简写:只有一条语句才能简写 exp: 特殊:json var s 阅读全文
posted @ 2018-08-12 14:56 飞刀还问情 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 状态属性可以修改 this.setState()中可以写对象,也可以写方法 res: 事件: 获取点击坐标 res: 事件冒泡: 没有ev.cancelBubble 用ev.stopPropagation(); 默认事件: return false;//无效 用ev.preventDefault() 阅读全文
posted @ 2018-08-12 14:55 飞刀还问情 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 在a56爆大奖在线娱乐react组件中都有以下几个生命周期方法~a56爆大奖在线娱乐们需要在不同阶段进行讨论 组件生命周期概述 1.初始化 在组件初始化阶段会执行 1. 2. 3. / 4. 5. 2.更新阶段 或`state`的改变可能会引起组件的更新,组件重新渲染的过程中会调用以下方法: 1. / 2. 3. 4. / 5. 6 阅读全文
posted @ 2018-08-12 14:55 飞刀还问情 阅读(189) 评论(0) 推荐(0) 编辑
摘要: vue插件: 使用方式:Vue.use(插件名称); /function 1、对象 export default { install(Vue,options){ } } 2、函数 export default (Vue,options) => { } 插件里面传参数通过 propsData属性进行传 阅读全文
posted @ 2018-08-12 14:54 飞刀还问情 阅读(182) 评论(0) 推荐(0) 编辑
摘要: vue:原理1 = Object.defineProperty 当你把一个普通的 JavaScript 对象传给 Vue 实例的 data 选项,Vue 将遍历此对象所有的属性,并使用 Object.defineProperty 把这些属性全部转为 getter/setter。 https://de 阅读全文
posted @ 2018-08-12 14:53 飞刀还问情 阅读(394) 评论(0) 推荐(0) 编辑
摘要: FilmList.vue 电影列表 <! 正在热映 https://m.maizuo.com/v4/api/film/now playing?__t=1533018029103&page=1&count=7 <! 即将上映 https://m.maizuo.com/v4/api/film/comin 阅读全文
posted @ 2018-08-12 14:52 飞刀还问情 阅读(190) 评论(0) 推荐(0) 编辑
摘要: jwt 官网https://jwt.io/ jwt:json web token jwt simple: https://www.npmjs.com/package/jwt simple jsonwebtoken:https://www.npmjs.com/package/jsonwebtoken 阅读全文
posted @ 2018-08-12 14:52 飞刀还问情 阅读(370) 评论(0) 推荐(0) 编辑
摘要: ==解决跨域:== 1、后台 cors cnpm i S cors 2、前端 jsonp 3、代理 webpack: myvue\config\index.js 找 proxyTable vue插件: axios vue axios vue2 animate vuex swiper cnpm i S 阅读全文
posted @ 2018-08-12 14:51 飞刀还问情 阅读(406) 评论(0) 推荐(0) 编辑
摘要: Vue.config.productionTip = false; ==是否显示提示信息== ==import/export== export xxx 必须跟跟对象或者和定义一起 对象: export {xxxx} 定义: export let a = xxx;   & 阅读全文
posted @ 2018-08-12 14:50 飞刀还问情 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 一.vue路由:https://router.vuejs.org/zh/ 1、定义 2、注入Vue实例中 new Vue({router}) 3、渲染 内容 默认翻译成a标签 <!doctype html 无标题文档 .nav{text decoration:none; border:1px sol 阅读全文
posted @ 2018-08-12 14:49 飞刀还问情 阅读(476) 评论(0) 推荐(0) 编辑
摘要: vue组件(一) 组件嵌套: 1.全局嵌套: <!doctype html 无标题文档 Vue.component("aaa",{ template: });//子组件放在父组件的模板里 Vue.component("bbb",{ template: }); window.onload = func 阅读全文
posted @ 2018-08-12 14:45 飞刀还问情 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1.计算属性 https://cn.vuejs.org/v2/guide/computed.html ++计算属性1.html:++ res: 只要data中的内容改变,methods就运行,computed只有与其相关的data发生变化才运行. ++计算属性2.html:(get,set)++ r 阅读全文
posted @ 2018-08-12 14:43 飞刀还问情 阅读(2653) 评论(0) 推荐(0) 编辑
摘要: vue 指令:v model/text/html/bind/for/if/show v model 绑定数据 数据来源 v text 纯a56爆大奖在线娱乐 简写 {{v model/data}} bind 绑定属性 v bind:属性名="'值'" 简写 :属性名="'值'" v bind="json/{...} 阅读全文
posted @ 2018-08-12 14:42 飞刀还问情 阅读(362) 评论(0) 推荐(0) 编辑
摘要: vue框架 易用、灵活、高效 https://cn.vuejs.org/ mvc M model 数据 模型 V view 视图 dom操作 C controller 控制器 路由 C mvc mvvm mvp mv http://www.ruanyifeng.com/blog/2015/02/mv 阅读全文
posted @ 2018-08-12 14:41 飞刀还问情 阅读(529) 评论(0) 推荐(1) 编辑