2017年12月26日

拍照

摘要: 拍照 阅读全文

posted @ 2017-12-26 18:00 ouruixi 阅读(151) 评论(0) 推荐(0)

类似手机壳加图片功能

摘要: 介绍 上传一张图片,然后通过两个range滑块控制旋转角度和缩放 code 阅读全文

posted @ 2017-12-26 00:31 ouruixi 阅读(188) 评论(0) 推荐(0)

webpack打包大概流程

摘要: webpack 步骤 1. 新建一个webpack.config.prod.js 2. 压缩bundle.js和index.html //设置为生产环境 new webpack.DefinePlugin({ 'process.env': { NODE_ENV: '"production"' } }) 阅读全文

posted @ 2017-12-26 00:27 ouruixi 阅读(484) 评论(0) 推荐(0)

2017年12月25日

微信支付流程图

摘要: 有空再附上描述!!! 阅读全文

posted @ 2017-12-25 20:48 ouruixi 阅读(1013) 评论(0) 推荐(0)

FlappyBird模拟(不完整版本)

摘要: FlappyBird模拟(不完整版本) 准备材料 1. land地 2. sky天 3. pipe管道 4. bird小鸟 Land.js function Land(info) { this.x = info.x; this.canvas = info.canvas; this.context = 阅读全文

posted @ 2017-12-25 20:39 ouruixi 阅读(217) 评论(0) 推荐(0)

canvas动画简单操作

摘要: canvas动画 小球滚动效果 关键api: window.requestAnimationFrame(draw) 会递归调用draw函数,替代setInterval var x = 20; var speed = 4; //电脑的帧率是1秒钟60Hz, 就相当于一秒钟可以播放60张图片,就相当于播 阅读全文

posted @ 2017-12-25 20:04 ouruixi 阅读(9681) 评论(1) 推荐(0)

canvas的常用api

摘要: canvas 标签 不给宽高的话默认是300+150 怎么用 //拿到canvas var canvas = document.getElementById("canvas"); //创建画图工具 var context = canvas.getContext("2d"); 相关的api及用法 // 阅读全文

posted @ 2017-12-25 14:01 ouruixi 阅读(1514) 评论(0) 推荐(0)

2017年12月24日

豆瓣项目(用react+webpack)

摘要: 用豆瓣电影api的项目 电影列表组件渲染 步骤: 1. 发送Ajax请求 1.1 在组件的componentWillMount这个生命周期钩子中发送请求 1.2 发送ajax XMLHttpRequest jQuery Fetch(不支持JSONP),但有个包可以fetch jsonp在npm上找 阅读全文

posted @ 2017-12-24 20:50 ouruixi 阅读(749) 评论(0) 推荐(0)

关于react-router-dom入门配置

摘要: react router dom入门配置 配置 参考:github https://reacttraining.com/react router/web/api/BrowserRouter 1. 导入import {BrowserRouter as Router, Route, Link} from 阅读全文

posted @ 2017-12-24 10:00 ouruixi 阅读(440) 评论(0) 推荐(0)

2017年12月23日

Vue的双向数据绑定原理

摘要: VUE双向绑定数据原理 监听模型的更改 数据劫持 es5 Object.defineProperty() //监听对象中某个数据的更改 Object.defineProperty(data, "key", { set: function(newValue) { bValue = newValue; 阅读全文

posted @ 2017-12-23 10:31 ouruixi 阅读(206) 评论(0) 推荐(0)

导航