触发场景:添加表单弹框,当我信息保存成功后会报 [Vue warn]: Error in event handler for "click": "TypeError: Cannot read property 'resetFields' of undefined"" 解决方法: if (this.$refs[formName] !== undefined) { this.$refs[formName].resetFields(); } 点击新增就没必要re…
一.vue 使用webpack打包后路径报错(两步解决) 1. config文件夹 ==> index.js ==> 把assetsPublicPath的 '/ '改为 './' 2. build文件夹 ==> utils.js ==> 添加代码 publicPath: '../../' 二.alias的使用(两种方式) 当项目逐渐变大之后,文件与文件直接的引用关系会很复杂,这时候就需要使用alias 了,在脚手架搭的vue项目中,在webpack.base.conf.js里面可以…
一  使用环境 开发系统: windows 后端IDE: PyCharm 前端IDE: VSCode 数据库: msyql,navicat 编程语言: python3.7  (Windows x86-64 executable installer) 虚拟环境: virtualenvwrapper 开发框架: Django 2.2 二  Vue学习笔记-vue-element-admin 按装报错再按装   主页:https://github.com/PanJiaChen/vue-element-…
在vue中绘制地图需要加载一个本地china.json文件,我用的是get请求的方法加载的,而不是直接import,因为我怕import请求到的部署到线上的时候会有问题.如下是get请求方法: this.$http.get(zhongguo).then(res => { console.log(res); this.$echarts.registerMap("china", res); //注册地图 console.log("223442"); var myC…
转载自:https://www.jianshu.com/p/3f8f60e01797 运行npm run build打包时,报错如下:   我的package.json如下: { ... "devDependencies": { "autoprefixer": "^7.1.2", "babel-core": "^6.22.1", "babel-eslint": "^8.2.1&…
报错一: Unknown custom element: <custom-select> - did you register the component correctly? For recursive components, make sure to provide the "name" option 代码: html <custom-select v-bind:list="list2"></custom-select> js…
报错提示: Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In G:\project\vue\nuxt-learn\node_modules\backpack-core\babel.js 问题原因:backpack-core模块版本低. 解决:更新backpack-core npm install --save-dev backpack-core…
前言 这篇博文不会教你怎么安装vue,但会告知安装过程中可能遇到的5个问题 2017年我写过一篇安装vue的博客,详情:https://www.cnblogs.com/tu-0718/p/7521099.html 5个报错 ①:若使用vue -V查询是否安装vue时提示没有找到指令,可能是你没有安装vue-cli脚手架(vue-cli可快速创建vue项目)            ②:vue安装淘宝镜像时报错,提示无效的配置,必须是完整合法的http地址,原因是我在url前面加了1个空格,这里不要…
在项目中的""和;经常会报错,真的很纠结,今天看到一个解决方法,可以不用卸载删除 在项目根目录中,新建一个.prettierrc文件,来移除分号,和替换为单引号. { "semi": false, "singleQuote": true } 这样就可以了,格式化也不会变为""了. 也可以禁用语法规则,修改.eslintrc.js文件:把报错的项禁用 module.exports = { root: true, env: { n…
vue项目完成后,打包放到服务器上,打开index.html页面时发现一片空白并且报错 很明显是js和css引用不到. 解决办法: 修改vue项目config文件夹下面的index.js,将assetsPublicPath:'/'改为assetsPublicPath:'./'…