06 2020 档案
摘要:搬运自:https://www.jianshu.com/p/b358a91bdf2d 前言 vue.config.js 是一个可选的配置文件,如果项目的 (和 package.json 同级的) 根目录中存在这个文件,那么它会被 @vue/cli-service 自动加载。 也可以使用 packag
阅读全文
摘要:参考: https://blog.csdn.net/Liu_yunzhao/article/details/90520028 https://www.cnblogs.com/xiangsj/p/8905648.html 概念 同源策略 同源策略是一种约定,它是浏览器最核心也最基本的安全功能,如果缺少
阅读全文
摘要:参考:https://www.antdv.com/docs/vue/customize-theme-cn/ 项目根目录下新建文件vue.config.js // vue.config.js for less-loader@6.0.0 module.exports = { css: { loaderO
阅读全文
摘要:搬运自:https://blog.csdn.net/qq_39043923/article/details/106918747?%3E?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1 vue项目中,经常需要使用如elementUI
阅读全文
摘要:效果: html: <!DOCTYPE html> <html lang="cn"> <head> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="view
阅读全文
摘要:参考:https://blog.csdn.net/qq_41619796/article/details/88552029?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-6 效果: 代码:https://github.com/pla
阅读全文
摘要:参考:https://www.cnblogs.com/qq254980080/p/11785677.html https://blog.csdn.net/u014091101/article/details/88057449 https://blog.csdn.net/qq_39207948/art
阅读全文
摘要:1. 配置baseUrl 在package.json同级目录下新建一个faceConfig.js文件 faceConfig.js: // 前端所有配置放这里 const faceConfig = () => { return { // 正式环节 'devServer': window.locatio
阅读全文
摘要:搬运自:https://www.cnblogs.com/xxjcai/p/10865321.html js中substr和substring都是截取字符串中子串,非常相近,可以有一个或两个参数。 语法:substr(start [,length]) 第一个字符的索引是0,start必选 length
阅读全文
摘要:参考:https://blog.csdn.net/hong_taizi/article/details/80387980?utm_source=blogxgwz6 问题:axios返回200状态码(即请求成功)却走进了catch里面 原因: 1. 当axios请求完成后走的时then的代码块,如果t
阅读全文
摘要:参考:https://www.w3school.com.cn/tags/att_input_autocomplete.asp autocomplete 属性是 HTML5 中的新属性。 定义和用法 autocomplete 属性规定输入字段是否应该启用自动完成功能。 自动完成允许浏览器预测对字段的输
阅读全文
摘要:搬运自:https://segmentfault.com/a/1190000021913990?utm_source=tag-newest 1. 下载print.js https://github.com/zxc19890923/print/blob/master/print.js 在src目录下面
阅读全文
摘要:解决方法:使用upload.clearFiles()方法清空文件列表 页面: <el-upload ref="upload_file" action="" :multiple="false" :limit="1" :show-file-list="false" :on-change="importE
阅读全文
摘要:参考:https://www.jianshu.com/p/c9324d237a8e 关于window.location的详解: window.location 对象不仅可以获得当前页面的地址 (URL),还能够将浏览器重定向到新的页面。 下面,以http://www.myurl.com:8866/t
阅读全文
摘要:页面: <a-table :scroll={x:200} :locale="{emptyText: '暂无数据'}" :columns="columns" :dataSource="dataTable" :pagination="false"> ···</a-table> css: /deep/ .
阅读全文
摘要:参考:https://blog.csdn.net/weixin_43905402/article/details/106074435 我的问题:vue项目中使用ant-design-vue,表单中输入框输入很卡顿 原因:vue在进行输入时,进行了多次的render刷新渲染操作,导致了input框输入
阅读全文
vue——子组件报错:The data property "isHome" is already declared as a prop. Use prop default value instead.
摘要:我的需求:多个页面顶部共用一个组件topBar,topBar内有"首页"按钮,点击可返回到首页,想做成当前页为首页时,不显示这个按钮,其他则显示。 原topBar: 其他组件: 发现报错 : The data property "isHome" is already declared as a pr
阅读全文
摘要:参考:https://blog.csdn.net/qq_43779703/article/details/100693565 https://blog.csdn.net/xuaner8786/article/details/81217075 https://blog.csdn.net/qq_3132
阅读全文
摘要:我的情况:登录接口是单独做的,其他接口则是用的封装的axios。 登录后将后台返回的token存入localStorage,之后的接口均需传入token,token失效或者没有的时候会提示未授权,返回到登录页。 在封装的js中,我将localStorage中的token单独设置为一个变量,方便之后利
阅读全文