![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
阿瞒是鞋魔
这个作者很懒,什么都没留下…
展开
-
Vue项目中Object.defineProperty 劫持数据 手写
let uid = 0 // 用于储存订阅者并发布消息 class Dep { constructor() { this.id = uid++ // 设置id 用于区分新的watcher和只改变属性值后新产生的watcher this.subs = [] // 储存订阅者的数组 } depend () { // 触发target上的watcher的addDep的方法,参数为dep的实例本身 Dep.target.addDep(this) } addSub () { // 添加订阅者 th原创 2020-07-10 11:31:07 · 255 阅读 · 0 评论 -
一些简单的js手写代码题 网上很多 自己写来熟悉操作流程的
function creatNew () { // 实现 new 方法 let obj = {} // 1.创建一个空对象 let constructor = [].shift.call(arguments) obj._proto_ = constructor.prototype // 2.链接到原型 let result = constructor.apply(obj, arguments) // 3.绑定this值 return typeof result === 'object' ? ...原创 2020-07-09 16:23:00 · 201 阅读 · 0 评论 -
常用的mixin
/** @module mixin @author: huoyou @description: 通用mixin封装 */ // 定位全屏 .allcover { position: absolute; top: 0; right: 0; } // transform上下左右居中 .tac { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } // transform定位上下居中 .ttc { posi原创 2020-07-07 17:18:49 · 166 阅读 · 0 评论 -
下拉刷新 上拉加载封装
/** @module scroll @author: huoyou @description: 引入mescroll的vue组件 */ import MescrollVue from ‘mescroll.js/mescroll.vue’ export default { components: { MescrollVue }, data () { return { mescroll: null, // mescroll实例对象 mescrollDown: { auto: false, callback原创 2020-06-23 21:38:50 · 183 阅读 · 0 评论 -
keepalive的bug修复问题
/** @module tabsKeepAlive @author: huoyou @description: mescroll 缓存处理 */ export default { // mescrollType-1 普通mescroll // mescrollType-2 带tabs的mescroll mounted () { if (this.KaTeX parse error: Expected 'EOF', got '&' at position 22: …meta.keepAlive &a原创 2020-06-23 21:36:40 · 331 阅读 · 0 评论 -
自己在项目中写的一些柱状折线混合图 外带dataZoom的一些属性
// 折线与柱状混淆图 getoption (echartsList) { // 指定图表的配置项和数据 return { legend: { // 图标标记 右上角 x: 'center', top: 30, right: 0, data: ['逾期额', '逾期率'] }, tooltip: { // 点击数据的坐标轴指示器 show: true, trigger: 'axis', axisPointer: { type: 'line', axis: 'auto', li原创 2020-06-10 16:30:10 · 191 阅读 · 0 评论