zoukankan      html  css  js  c++  java
  • Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead...

    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: "visible"

    通过props传递给子组件的visible,不能在子组件内部修改props中的visible值。

    //子  
    this.$emit('submit');
     
     
    //父
     

        <PlatformDialog
          :visible.sync="dialogVisible"
          v-on:submit="close_dialogVisible"
        ></PlatformDialog>
     
       close_dialogVisible() {
          this.dialogVisible = false;
          this.getList();
        },
  • 相关阅读:
    React简介
    webpack处理项目中的资源文件
    ajax
    DOW
    webpack-css单独打包配置
    SSH配置
    html-webpack
    常用ui
    git命令备忘
    关于git的一些使用
  • 原文地址:https://www.cnblogs.com/FACESCORE/p/13673588.html
Copyright © 2011-2022 走看看