就让风继续吹吧

贫瘠小行星,种一颗玫瑰

导航

2021年4月24日 #

JS 中的继承

摘要: 1. 原型链继承 function Parent() { this.name = 'parent' this.play = [1, 2, 3] } function Child() { } Child.prototype = new Parent() const a = new Child() co 阅读全文

posted @ 2021-04-24 17:28 就让风继续吹吧 阅读(53) 评论(0) 推荐(0) 编辑

2021年4月23日 #

ES6 实现单例模式

摘要: 单例模式:保证一个类只有一个实例,并且提供它的全局访问点。 通过构造函数 class Singleton { constructor() { if(!Singleton.instance) { // 将 this 挂载到单例上 Singleton.instance = this } return S 阅读全文

posted @ 2021-04-23 10:11 就让风继续吹吧 阅读(1610) 评论(1) 推荐(0) 编辑

2021年4月13日 #

TypeScript 当中 interface 和 type 的区别

摘要: 1.type 可以用来声明类型别名, interface 不行 type Dog = { name: string age: number } type Cat = { breed: string } type Animal = Dog | Cat 2.type 可以使用计算属性, interfac 阅读全文

posted @ 2021-04-13 22:44 就让风继续吹吧 阅读(123) 评论(0) 推荐(0) 编辑

js的深浅拷贝

摘要: 1.浅拷贝 只是复制基本类型的数据或者指向某个对象的指针,而不是复制对象本身,源对象和目标对象共享同一块内存;如果对目标对象修改,那么源对象也会被修改。 对象实现 const shallowClone = sourceObj => { let targetObj = {} for (const ke 阅读全文

posted @ 2021-04-13 22:30 就让风继续吹吧 阅读(60) 评论(0) 推荐(0) 编辑

2020年5月11日 #

vue + echars + 高德地图 实现省市区三级联动下钻(可点击标签返回)

摘要: vue 阅读全文

posted @ 2020-05-11 19:47 就让风继续吹吧 阅读(952) 评论(0) 推荐(0) 编辑

2019年10月30日 #

ES6 数组去重

摘要: 1 const a = ['1', '2', '3']; 2 const b = [...a, '4', ...a]; 3 // 去重 4 const c = Array.from(new Set(b)); 5 console.log(c); // ['1', '2', '3', '4']; 阅读全文

posted @ 2019-10-30 18:05 就让风继续吹吧 阅读(103) 评论(0) 推荐(0) 编辑

2019年10月8日 #

vue项目 v-html 插入文章图片无法等比缩放的解决办法

摘要: 通过 CSS 设置样式行不通,只能修改返回的数据了~ 阅读全文

posted @ 2019-10-08 15:31 就让风继续吹吧 阅读(1531) 评论(0) 推荐(0) 编辑

2019年8月23日 #

umi + dva + typescript编写项目

摘要: 1.配置测试环境和生产环境域名 贴上官网链接:https://umijs.org/zh/guide/env-variables.html#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AE 阅读全文

posted @ 2019-08-23 16:26 就让风继续吹吧 阅读(3001) 评论(0) 推荐(0) 编辑

vue2 配置代理域名

摘要: 然后在 axios 配置文件里 阅读全文

posted @ 2019-08-23 10:25 就让风继续吹吧 阅读(3494) 评论(0) 推荐(0) 编辑

2019年8月21日 #

使用 scss 完成网页换肤

摘要: 文章来源:http://www.teamsfy.com/html/r_0026737b6fe846fd944a492a010f2ba8.html 阅读全文

posted @ 2019-08-21 17:39 就让风继续吹吧 阅读(299) 评论(0) 推荐(0) 编辑