08 2020 档案

摘要:getNowFormatDate(n) { if(n==''){ n=new Date() } var date = new Date(n); var seperator1 = "-"; var year = date.getFullYear(); var month = date.getMonth 阅读全文
posted @ 2020-08-20 15:08 syqaily 阅读(561) 评论(0) 推荐(0)
摘要:GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); var s 阅读全文
posted @ 2020-08-20 15:02 syqaily 阅读(120) 评论(0) 推荐(0)
摘要:var url=window.location.href; //获取当前页面的url if(url.indexOf("?")!=-1){ //判断是否存在参数 url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数 window.history.pushState 阅读全文
posted @ 2020-08-20 15:01 syqaily 阅读(531) 评论(0) 推荐(0)
摘要:import axios from 'axios'; import router from 'vue-router' import { Message } from 'element-ui' // axios.defaults.timeout = 5000; // axios.defaults.ba 阅读全文
posted @ 2020-08-10 13:35 syqaily 阅读(221) 评论(0) 推荐(0)
摘要:方案一: getDescribe(id) { // 直接调用$router.push 实现携带参数的跳转 this.$router.push({ path: `/describe/${id}`, }) 方案一,需要对应路由配置如下: { path: '/describe/:id', name: 'D 阅读全文
posted @ 2020-08-10 11:57 syqaily 阅读(160) 评论(0) 推荐(0)
摘要:全局路由钩子: router.beforeEach((to, from, next) => { //会在任意路由跳转前执行,next一定要记着执行,不然路由不能跳转了 console.log('beforeEach') console.log(to,from) // next() }) // rou 阅读全文
posted @ 2020-08-10 11:44 syqaily 阅读(257) 评论(0) 推荐(0)
摘要:1.省略function换成=> 一个参数的时候()可以省略 一个return的时候{}可以省略 2.箭头函数的this是静态的,始终指向声明函数时的作用域 3.箭头函数不能作为构造函数的实例化对象 4.箭头函数不能使用arguments变量 阅读全文
posted @ 2020-08-01 09:09 syqaily 阅读(991) 评论(0) 推荐(0)