随笔分类 -  Vue.js

一个渐进式前端框架
摘要:https://blog.csdn.net/skh2015java/article/details/114097896 阅读全文
posted @ 2021-09-14 13:01 expworld 阅读(41) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/22bd5b98e38a 阅读全文
posted @ 2021-09-14 12:50 expworld 阅读(21) 评论(0) 推荐(0) 编辑
摘要:iSub(arg1, arg2) { // 减法 let r1, r2, m, n try { r1 = arg1.toString().split('.')[1].length } catch (e) { r1 = 0 } try { r2 = arg2.toString().split('.') 阅读全文
posted @ 2021-08-10 14:01 expworld 阅读(243) 评论(0) 推荐(0) 编辑
摘要:/** * 设置有时效的localStorage * @调用:setSessionStorage('access_token', '123456', 5000); * @调用:getSessionStorage('access_token'); */ export function setLocal 阅读全文
posted @ 2021-08-05 19:48 expworld 阅读(387) 评论(0) 推荐(1) 编辑
摘要:https://www.jianshu.com/p/479af513ecf9 阅读全文
posted @ 2021-03-29 17:25 expworld 阅读(18) 评论(0) 推荐(0) 编辑
摘要:util.dateFormatFn = function(date,format='YYYY-MM-DD HH:mm:ss'){ let config = { YYYY:date.getFullYear(), MM:date.getMonth()+1 >10?date.getMonth()+1:'0 阅读全文
posted @ 2021-03-11 14:49 expworld 阅读(147) 评论(0) 推荐(0) 编辑
摘要:由于在网上都没有找到关于这两种模式的简单实现,所以自己撸一个: mode:hash 代码简单实现: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width= 阅读全文
posted @ 2020-06-30 18:05 expworld 阅读(333) 评论(0) 推荐(0) 编辑
摘要:vue router生命周期router中的参数router异步解析执行,此时router在 resolve 完之前一直处于 等待中。 三个参数: to: Route: 即将要进入的目标 路由对象 from: Route: 当前导航正要离开的路由 next: Function: 一定要调用该方法来 阅读全文
posted @ 2020-06-30 14:48 expworld 阅读(1403) 评论(0) 推荐(0) 编辑
摘要:转载自 https://www.cnblogs.com/sysuhanyf/p/7454530.html Vue keep-alive实践总结 <keep-alive>是Vue的内置组件,能在组件切换过程中将状态保留在内存中,防止重复渲染DOM。 <keep-alive> 包裹动态组件时,会缓存不活 阅读全文
posted @ 2020-06-29 17:49 expworld 阅读(138) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-06-28 13:54 expworld 阅读(0) 评论(0) 推荐(0) 编辑
摘要:1、html 中引入 echarts html中添加script标签如下: <script src="//cdn.bootcss.com/echarts/4.2.1/echarts.simple.min.js"></script> 2、在 webpack 中配置使用 echarts CDN 在vue 阅读全文
posted @ 2019-11-25 11:10 expworld 阅读(5119) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/22f214bb4294 阅读全文
posted @ 2019-10-21 14:16 expworld 阅读(93) 评论(0) 推荐(0) 编辑
摘要:由于 Vuex 的状态存储本来就是响应式的,从 store 实例中读取状态最简单的方法,就是在计算属性中返回某个状态。 在 B 页面引入以下代码: 此时,当 A 页面通过某种方式更改了 this.$store.state.someValue 的值,B 页面中 myValue 的值便会自动得到更新。 阅读全文
posted @ 2019-07-23 18:00 expworld 阅读(5711) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/abcde158308/article/details/81013156 阅读全文
posted @ 2019-07-21 01:20 expworld 阅读(437) 评论(0) 推荐(0) 编辑
摘要:在vue移动端使用lib-flexible和px2remLoader适配屏幕 阅读全文
posted @ 2019-07-17 10:45 expworld 阅读(180) 评论(0) 推荐(0) 编辑
摘要:import Login from './Login' export default { install: function(Vue){ Vue.component('Login', Login); } } // The Vue build version to load with the `import` command // (runtime... 阅读全文
posted @ 2019-06-15 10:59 expworld 阅读(132) 评论(0) 推荐(0) 编辑
摘要:Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won't work. 提示:构建的文件应该通过HTTP服务器提供服务。在文件:/上打开index.html不起作 阅读全文
posted @ 2019-05-08 02:00 expworld 阅读(3197) 评论(0) 推荐(0) 编辑
摘要:vue.$nextTick 解决了哪些问题 阅读全文
posted @ 2019-05-06 01:56 expworld 阅读(204) 评论(0) 推荐(0) 编辑
摘要:VUE图片懒加载-vue lazyload插件的简单使用 VUE图片懒加载-vue lazyload插件的简单使用 VUE图片懒加载-vue lazyload插件的简单使用 阅读全文
posted @ 2019-05-06 01:55 expworld 阅读(123) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/33e5fb3f3a86 https://segmentfault.com/a/1190000015782272 写在前面: 1、创建一个store.js ES6【解构赋值】知识点 在main.js引入 store 应用与组件内: 推荐使用: 大型 阅读全文
posted @ 2019-05-04 20:06 expworld 阅读(181) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示