上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: 状态属性可以修改 this.setState()中可以写对象,也可以写方法 res: 事件: 获取点击坐标 res: 事件冒泡: 没有ev.cancelBubble 用ev.stopPropagation(); 默认事件: return false;//无效 用ev.preventDefault() 阅读全文
posted @ 2018-08-12 14:55 飞刀还问情 阅读(145) 评论(0) 推荐(0)
摘要: 在每个react组件中都有以下几个生命周期方法~我们需要在不同阶段进行讨论 组件生命周期概述 1.初始化 在组件初始化阶段会执行 1. 2. 3. / 4. 5. 2.更新阶段 或`state`的改变可能会引起组件的更新,组件重新渲染的过程中会调用以下方法: 1. / 2. 3. 4. / 5. 6 阅读全文
posted @ 2018-08-12 14:55 飞刀还问情 阅读(197) 评论(0) 推荐(0)
摘要: vue插件: 使用方式:Vue.use(插件名称); /function 1、对象 export default { install(Vue,options){ } } 2、函数 export default (Vue,options) => { } 插件里面传参数通过 propsData属性进行传 阅读全文
posted @ 2018-08-12 14:54 飞刀还问情 阅读(188) 评论(0) 推荐(0)
摘要: vue:原理1 = Object.defineProperty 当你把一个普通的 JavaScript 对象传给 Vue 实例的 data 选项,Vue 将遍历此对象所有的属性,并使用 Object.defineProperty 把这些属性全部转为 getter/setter。 https://de 阅读全文
posted @ 2018-08-12 14:53 飞刀还问情 阅读(412) 评论(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 飞刀还问情 阅读(214) 评论(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 飞刀还问情 阅读(393) 评论(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 飞刀还问情 阅读(418) 评论(0) 推荐(0)
摘要: Vue.config.productionTip = false; ==是否显示提示信息== ==import/export== export xxx 必须跟跟对象或者和定义一起 对象: export {xxxx} 定义: export let a = xxx;   & 阅读全文
posted @ 2018-08-12 14:50 飞刀还问情 阅读(335) 评论(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 飞刀还问情 阅读(488) 评论(0) 推荐(0)
摘要: vue组件(一) 组件嵌套: 1.全局嵌套: <!doctype html 无标题文档 Vue.component("aaa",{ template: });//子组件放在父组件的模板里 Vue.component("bbb",{ template: }); window.onload = func 阅读全文
posted @ 2018-08-12 14:45 飞刀还问情 阅读(228) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页