上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 遇到js代码,浏览器将其传递给javascript引擎,并且要求它去执行。 setTimeout是浏览器引擎的API,产生宏任务;Promise产生的是js引擎内部的微任务。 阅读全文
posted @ 2021-09-26 15:23 阿兰儿 阅读(41) 评论(0) 推荐(0)
摘要: 每个对象都有一个__proto__属性,并且指向它的prototype原型对象 每个构造函数都有一个prototype原型对象 prototype原型对象里的constructor指向构造函数本身 示例1 class Person { constructor(options) { this.name 阅读全文
posted @ 2021-09-24 19:50 阿兰儿 阅读(96) 评论(0) 推荐(0)
摘要: Vue Vue中最重要的就是数据驱动和组件化,每个组件都有自己的data,template,methods。 Vuex 进行状态管理,负责组件中的通信。 多个视图依赖同一状态; 来自不同视图的行为需要变更同一状态; Vue的插件; 插件一般用来给Vue添加全局功能。 使用插件 Vue.use(myP 阅读全文
posted @ 2021-09-24 19:48 阿兰儿 阅读(85) 评论(0) 推荐(0)
摘要: 对图片进行压缩,选无损极速,覆盖源 阅读全文
posted @ 2021-09-14 16:35 阿兰儿 阅读(23) 评论(0) 推荐(0)
摘要: 安装swiper版本4.0.5版本后 npm install swiper@4.0.5 --save 引入方法 import Swiper from 'swiper'; import 'swiper/dist/css/swiper.css'; 使用 new Swiper('#certify .swi 阅读全文
posted @ 2021-09-14 13:06 阿兰儿 阅读(1320) 评论(0) 推荐(1)
摘要: px转rem单位。 可配合媒体查询自适应屏幕。 阅读全文
posted @ 2021-09-08 14:50 阿兰儿 阅读(81) 评论(0) 推荐(0)
摘要: let Vue//myVuex.jsclass Store { constructor(options) { this.vm = new Vue({ data: { state: options.state } }) let getters = options.getter || {} this.g 阅读全文
posted @ 2021-08-18 15:04 阿兰儿 阅读(51) 评论(0) 推荐(0)
摘要: var a = 20; var b = a; b = 30; // 这时a的值是多少? 问题2: var a = { name: '前端开发' } var b = a; b.name = '进阶'; // 这时a.name的值是多少 问题3: var a = { name: '前端开发' } var 阅读全文
posted @ 2021-08-16 18:40 阿兰儿 阅读(54) 评论(0) 推荐(0)
摘要: Access-Control-Allow-Origin为*的时候,前端设置withCredentials:true,将不能发送cookie到服务端。 此外,前端要发送cookie到服务端,还要 XMLHttpRequest 的 withCredentials 标志设置为 true,且 服务器端的响应 阅读全文
posted @ 2021-08-16 16:49 阿兰儿 阅读(1149) 评论(0) 推荐(0)
摘要: 浅拷贝: Object.assign()、Array.slice()、JSON.parse(JSON.stringfy(obj)) 深拷贝: function qCopy(source) { if(typeof source!=='object' && source!==null) return s 阅读全文
posted @ 2021-08-10 20:09 阿兰儿 阅读(29) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页