[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's value. Prop being mutated: "openFlag"

此错误出现的原因是:vue设计是单向数据流,数据的流动方向只能是自上往下的方向,所以在子组件中不能修改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's value. Prop being的更多相关文章

  1. vue报错 [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's

    [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent c ...

  2. Vue报错之"[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead......"

    一.报错截图 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the p ...

  3. 报错:[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's value. Prop bei

    项目中遇到父组件传值 activeIndex <Tabs :tabs="tabs" :activeIndex="activeIndex" >< ...

  4. Avoid mutating a prop directly since the value will be overwritten whenever the parent component re

    子组件修改父组件的值踩坑 Vue1.0升级至2.0之后,直接在子组件修改父组件的值是会报错的 目的是为了阻止子组件影响父组件的数据. 我们都知道在vue中,父组件传入子组件的变量是存放在props属性 ...

  5. Vue 报错[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders

    场景:父组件向子组件传递数据,子组件去试图改变父组件数据的时候. 解决:子组件通过事件向父组件传递信息,让父组件来完成数据的更改. 比如:我的父组件是普通页面,子组件是弹窗的登录界面,父组件传递的数据 ...

  6. 报错:[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the paren

    今天在做Vue的时候,子组件关闭的时候,报如下错误 报错:vue.esm.js?65d7:610 [Vue warn]: Avoid mutating a prop directly since th ...

  7. Vue avoid mutating a prop directly since the value will be overwritten

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. Vue 循环 [Vue warn]: Avoid using non-primitive value as key

    页面中不添加  :key 索引的时候,会不停的提示虚线,但不影响使用 后来加了一个索引,加成了:key= "content" 从后台取出来的contents是一个list,里面有多 ...

  9. [Vue warn]: Avoid using non-primitive value as key

    <el-select v-model="addform.province" placeholder="请选择省份" multiple>        ...

随机推荐

  1. Codeforces 433A (背包)

    题面 传送门 真是令人胃疼的题面 我不管,我要把苹果都给雪菜!(滑稽)(冬马党不要打我) 分析 突然感觉这题跟今年NOIP Day1T2有点像,都是根据数加减来构造背包,只不过这题是01背包而不是完全 ...

  2. web调试代理工具Whistle

    由于最近在学习微信小程序开发,项目中用到了https代理请求,所以用到了基于Node实现的跨平台web调试代理工具Whistle,在此做一记录. 完成https代理请求总共需要5个步骤. 一.安装No ...

  3. python面试题之Python 的特点和优点是什么

    Python 可以作为编程的入门语言,因为他具备以下特质: 1. 解释性 2. 动态特性 3. 面向对象 4. 语法简洁 5. 开源 6. 丰富的社区资源 7 库丰富 文章转载自Python黑洞网

  4. 2019 Multi-University Training Contest 1 - 1009 - String - 贪心

    不知道错在哪里. 是要把atop改成stop!两个弄混了.感谢自造样例. #include<bits/stdc++.h> using namespace std; typedef long ...

  5. D Dandan's lunch

    链接:https://ac.nowcoder.com/acm/contest/338/D来源:牛客网 题目描述 As everyone knows, there are now n people pa ...

  6. P3452 [POI2007]BIU-Offices(链表+bfs)

    P3452 [POI2007]BIU-Offices 新姿势:链表存图快速删除 显然两个没有直接相连的点要放到同一个集合里 但是直接搞一个图的补图会挂掉 考虑用链表维护点序列 每次bfs删除一个点和与 ...

  7. 连接tomcat时,输入telnet localhost 8080后无法再次输入

    初次接触服务器时,一般会在本地建立一个微型服务器,今天在使用Apache的tomcat时,为了在命令行下访问服务器中webapps下的自定义资源:首先打开命令行窗口,然后输入telnet localh ...

  8. WEEX-EROS开发小笔记

    本文是作者之前刚接触移动端跨平台开发,使用weex-eros开发项目平日里记下来的一些笔记,分享出来方便为新手解惑,weex-eros是weex的一套解决方法,使用vue语法糖,对于前端开发者来说可以 ...

  9. javaScript的预加载

    在有大量图片的页面中,为了避免页面加载完图片还未加载完成,我们通常会使用js的图片预加载. 这是一个预加载的demo: 首先把图片放入到一个类名为imgSrcArr的变量当中: var imgSrcA ...

  10. Kvm --01 虚拟化基础概念

    目录 1. 虚拟化基础概念 01. 什么是虚拟化? 02. 为什么要用虚拟化? 03. 虚拟化在企业中的应用场景? 04. 虚拟化软件介绍 05. Kvm介绍 2. 安装部署Kvm 3. Kvm虚拟机 ...