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();
        },
  • 相关阅读:
    php关联Apache和nginx
    /etc/profile
    snmp配置
    snmpwalk
    redis主从
    redis安装
    计算真实可用内存
    分类样本不均
    pandas apply 添加进度条
    linux 单次定时任务
  • 原文地址:https://www.cnblogs.com/FACESCORE/p/13673588.html
Copyright © 2011-2022 走看看