摘要: 优先级 运算类型 关联性 运算符 20 圆括号 n/a(不相关) ( … ) 19 成员访问 从左到右 … . … 需计算的成员访问 从左到右 … [ … ] new (带参数列表) n/a new … ( … ) 函数调用 从左到右 … ( … ) 可选链(Optional chaining) 从 阅读全文
posted @ 2020-02-12 09:15 korea 阅读(486) 评论(2) 推荐(2) 编辑
摘要: 在严格模式下不支持使用 “arguments.callee / arguments.callee.caller” (Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on st 阅读全文
posted @ 2020-02-10 16:35 korea 阅读(229) 评论(0) 推荐(2) 编辑
摘要: 小程序云开发调用HTTP请求中got第三方库使用失败解决方法 错误代码 {"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"The \"original\" argument must be of type 阅读全文
posted @ 2020-02-05 10:37 korea 阅读(1136) 评论(0) 推荐(2) 编辑
摘要: 小程序 APP 全局生命周期函数 //app.js App({ / 页面一加载就会被调用,只调用一次 可以获取用户信息、获取历史缓存信息、获取小程序打开来源 @params options / onLaunch(options) { console.log('APP全局生命周期函数: onLaunc 阅读全文
posted @ 2020-01-30 18:51 korea 阅读(352) 评论(2) 推荐(2) 编辑
摘要: 前端工具集整理(整理自其他博主,不断更新中) Javascript库 Particles.js 一个用来在web中创建炫酷的浮动粒子的库 Three.js 一个用来在web中创建3d物体和3d空间的库 Fullpage.js 快速实现全屏滚动特性 Typed.js 打字机效果 Waypoints.j 阅读全文
posted @ 2020-01-30 12:34 korea 阅读(338) 评论(0) 推荐(2) 编辑
摘要: body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, button, input, textarea, th, td { margin: 0; padding: 0; } body { font size: 阅读全文
posted @ 2020-01-28 11:27 korea 阅读(765) 评论(0) 推荐(2) 编辑
摘要: 内网IP(局域网) 在一个区域内,大家连接的是同一个网络(准确来说:连接同一个WIFI不一定是同一个网络,连接不同的WIFI也可能是相同的网络,一切都看路由交换机的配置),这就是局域网 在同一个局域网下,成员可以互相访问(你的电脑连接了A网络,手机也连接了A网络,那么手机可以访问电脑上的一些信息了 阅读全文
posted @ 2019-12-25 19:44 korea 阅读(402) 评论(0) 推荐(2) 编辑
摘要: 前端开发性能优化方案 在JS中尽量减少闭包的使用(原因:闭包会产生不释放的栈内存) A:循环给元素做事件绑定的时候,尽可能的把后期需要的信息(例如索引)存储到元素的自定义属性上,而不是创建闭包存储 B:可以在最外层形成一个闭包,把一些后续需要的公共信息进行存储,而不是每一个方法都创建闭包(例如单例模 阅读全文
posted @ 2019-12-25 19:09 korea 阅读(164) 评论(0) 推荐(2) 编辑
摘要: ```jsimport React, {Component} from 'react';class LifeCycle extends Component { // [基本流程] // constructor 创建一个组件 constructor(props) { super(props); console.log('constructor'); ... 阅读全文
posted @ 2019-12-11 17:11 korea 阅读(133) 评论(0) 推荐(2) 编辑
摘要: ```js/** * @method createElement * @param type {string} * @param props {Object} * @param children {string} */let createElement = (type, props, ...children) => { props = props || {}; let obj = { ... 阅读全文
posted @ 2019-12-10 17:06 korea 阅读(576) 评论(0) 推荐(2) 编辑