
vue.js
文章平均质量分 58
普通网友
这个作者很懒,什么都没留下…
展开
-
vue 使用eventbus 报错:Cannot read property ‘apply‘ of undefined
vue 使用eventbus 报错:Cannot read property 'apply' of undefined 什么是apply 引用官方的解释和js apply通过apply()方法,您能够编写用于不同对象的方法。 var person = { fullName: function() { return this.firstName + " " + this.lastName; }}var person1 = { firstName...原创 2020-10-29 15:18:37 · 4822 阅读 · 1 评论 -
vue.js + es6 + webpack 搭建前端工程(学习推荐)
最近学习vue.js。除了学习vue外也还需学习其他的一些知识。这里是我觉的很好的一些博客推荐给大家,最好按顺序看。node.js与npm就不提了。1.入门Webpack,看这篇就够了2.理解最基本的Vue项目3.一个基于ES6+webpack的vue小demo...原创 2018-07-04 17:42:18 · 940 阅读 · 0 评论 -
Avoid mutating a prop directly since the value will be overwritten whenever the paren
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the paren 在vue2.0中子组件触发改变值的时候vue组件会报出例如:Avoid mutating a prop directly since the value will be overwritte...原创 2018-08-10 14:43:12 · 6206 阅读 · 0 评论 -
The computed property "fields" is already defined in data.
[Vue warn]: The computed property "fields" is already defined in data.背景在使用Vue开发时,遇到了这样一个问题。如下所示: [Vue warn]: The computed property "fields" is already defined in data.image.png问题分析锁定问...转载 2018-08-08 17:36:43 · 10727 阅读 · 0 评论 -
【VUE 报错】Mixed spaces and tabs
初步接触VUE,在开发过程中,会经常发现一启动项目就会报一堆空格使用错误,虽然不影响运行,但给人编码体验贼差。怎么解决呢,很简单。这是因为你使用 ESLint,用来规范代码风格的。你的 Webpack 配置中大概是使用了eslint-loader。主要是想代码更加规范化。eslint是语法检查工具,但限制太过于严格,大部分开发人员无法适应,所以产生这个需求。解决办法:找到buil...原创 2018-08-08 18:04:41 · 54532 阅读 · 17 评论 -
Vue2.0表单校验组件vee-validate的使用
Vue2.0表单校验组件vee-validate的使用vee-validate使用教程*本文适合有一定Vue2.0基础的同学参考,根据项目的实际情况来使用,关于Vue的使用不做多余解释。本人也是一边学习一边使用,如果错误之处敬请批评指出*一、安装npm install vee-validate@next --save注意:@next,不然是Vue1.0版本bower insta...转载 2018-08-21 19:36:34 · 1227 阅读 · 1 评论 -
Error in render: "TypeError: Cannot read property 'XXXXX' of undefined"
最近,小弟在使用vue开发界面时,出现一个有趣问题:功能正常使用,但F12却报出一个XXX Undefined的错误。这个错误已经见了无数次,于是果断去Ctrl+F搜索XXX,仔细浏览一圈后发现xxx明明是定义了的。整体流程:界面渲染前先通过mounted加载数据,然后绑定数据进行界面渲染。没毛病啊!难道是mounted偷懒了,果断换成created。但是还是有这个问题,为什么呢,...原创 2018-09-12 18:24:34 · 47930 阅读 · 8 评论