![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
文章平均质量分 70
空白0812
这个作者很懒,什么都没留下…
展开
-
报错: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the pare
在更改props属性中的值时,会报错:[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop...原创 2019-09-10 21:02:03 · 1173 阅读 · 0 评论 -
this.$set的正确使用
this.#set(obj, key, value)我们在项目开发的过程中,经常会遇到这种情况:为data中的某一个对象添加一个属性<template> <div class="hello"> <button @click="setMessage">添加属性</button> {{ student.name }} &l...原创 2019-09-19 15:00:38 · 238343 阅读 · 40 评论 -
如何为element-ui组件定义的事件添加自己的参数
我们在使用element-ui组件的时候,该如何为element-ui中定义好的事件添加一些自己的参数呢?废话不多说,直接看代码:这是一个简单的应用,在我们选中按钮的时候,需用将他的名字也传递过去<template> <div class="hello"> <div v-for="(item, index) in items" :key="index"&g...原创 2019-09-20 16:53:00 · 2177 阅读 · 0 评论