![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
前端卡农
这个作者很懒,什么都没留下…
展开
-
vue 实现页面打印功能
const Print = function (dom, options) { if (!(this instanceof Print)) return new Print(dom, options) this.options = this.extend({ noPrint: '.no-print', onStart: function () { }, onEnd: function () { }, }, options) if ((typeof dom) ===原创 2022-01-19 17:05:24 · 1209 阅读 · 0 评论 -
vue双向绑定原理浅谈
vue双向绑定原理分析 当我们学习angular或者vue的时候,其双向绑定为我们开发带来了诸多便捷,今天我们就来分析一下vue双向绑定的原理。 简易vue源码地址:https://github.com/jiangzhenfei/simple-Vue 1.vue双向绑定原理 vue.js 则是采用数据劫持结合发布者-订阅者模式的方式,通过Object.defineProperty()来劫持各个属性的setter,getter,在数据变动时发布消息给订阅者,触发相应的监听回调。我们先来看Object.defi原创 2020-08-13 14:39:47 · 128 阅读 · 0 评论