10 2020 档案
摘要:1 /** 2 * 处理下载接口返回的文件流数据 3 * @param {*} res http请求返回数据 4 */ 5 function download(res) { 6 // 错误处理 7 if (res.data.type == "application/json") { 8 let re
阅读全文
摘要:1 import { 2 validatenull 3 } from '@/util/validate'; 4 import website from '@/config/website' 5 6 const keyName = website.key + '-'; 7 /** 8 * 存储loca
阅读全文
摘要:1 /** 2 * 将数组转化成树结构 array to tree 3 * @param {*} array 数据源 4 * @param {*} options 字段名配置项 5 */ 6 function arrayToTree( 7 array = [], 8 options = { id:
阅读全文
摘要:1 /** 2 * 防抖函数 3 * @param {*} func 防抖后要执行的回调 4 * @param {*} wait 等待时间 5 * @param {*} immediate 6 */ 7 function debounce(func, wait, immediate) { 8 let
阅读全文
摘要:1 //全站权限设置 2 //permission.js 3 4 const lockPage = store.getters.website.lockPage; //锁屏页 5 6 7 if (store.getters.isLock && to.path !== lockPage) { //如果
阅读全文
摘要:1 /** 2 * 配置编译环境和线上环境之间的切换 3 * 4 * baseUrl: 域名地址 5 * routerMode: 路由模式 6 * dataSources:数据源 7 */ 8 9 let baseUrl = ''; 10 let routerMode = 'hash'; 11 le
阅读全文
摘要:官方文档: https://router.vuejs.org/zh/guide/advanced/scroll-behavior.html#%E5%BC%82%E6%AD%A5%E6%BB%9A%E5%8A%A8 使用前端路由,当切换到新路由时,想要页面滚到顶部,或者是保持原先的滚动位置,就像重新加
阅读全文
摘要:1 import axios from "axios"; 2 import { message, Modal, notification } from "ant-design-vue"; 3 import moment from "moment"; 4 import store from "../s
阅读全文

浙公网安备 33010602011771号