![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
-多巴胺-
这个作者很懒,什么都没留下…
展开
-
$notify实现倒计时效果
//倒计时countDown() { const TIME_COUNT = 10; if (!this.timer) { this.count = TIME_COUNT; this.timer = setInterval(() => { if (this.count > 0 && this.count <= TIME_COUNT) { this.count-原创 2021-06-04 10:13:02 · 570 阅读 · 0 评论 -
VUE中全局定义防抖节流;
//防抖节流 const throttle = function (func, delay) { //上一次函数执行时间 let prev = 0; //arguments return function () { let now = Date.now(); if (now - prev >= delay) { func.apply(this, arg原创 2021-05-06 17:21:32 · 212 阅读 · 0 评论 -
echarts外部触发echarts事件 VUE
//显示事件listMousEnter(event){ event.target.style.backgroundColor='#f00'; console.log(event.target.innerText.match("[\u4e00-\u9fa5]+")) //显示高亮 this.myChart.dispatchAction({ type: 'highlight', name: event.ta原创 2021-02-23 15:29:34 · 795 阅读 · 1 评论 -
解决Vue项目中VueX数据页面刷新数据丢失的问题
//将vuex中的数据存贮以防刷新丢失setStore (){ if (sessionStorage.getItem("store") ) { //replaceState(state: Object):替换 store 的根状态,仅用状态合并或时光旅行调试 //Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象分配到目标对象。它将返回目标对象。 this.$store.replaceState(Object.assign({},this.$store.sta原创 2020-11-24 16:53:37 · 782 阅读 · 0 评论