zoukankan      html  css  js  c++  java
  • vue Element学习和问题处理

    1. resetForm内容没有完全被重置
    在使用resetForm时,会还原数据到初始化data时的值,有时会出现值已修改,但页面无刷新变化。
    添加:
    this.$nextTick(() => {
      this.resetForm(type);
    });

    将form的赋值写在后面。

    如果还是不行,就将赋值写在

    this.$nextTick(function(){****});
    2. 编辑时,部分组件赋值有问题,例如autoComplate选择值后无法自动带入到内容框,需要点击其它按钮触发。  
    this.form = res.data; //直接从远端获取内容,给this.form有时不行,form中有一些其它的内容,
    Object.assign(this.form, res.data);  //可使用这种形式传递对象内容

     3. 树展开和折叠

    for(var i=0;i<this.$refs.treeX.store._getAllNodes().length;i++){
               this.$refs.treeX.store._getAllNodes()[i].expanded=this.isexpand;
            }

    4. 校验未清除

     this.$refs.menuform.clearValidate();

    5. 有时select元素选择后无法选中,或者其它一些赋值后,页面没有刷新,有可能值太深,导致没有触发upload,可强制使用刷新。

    this.$forceUpdate();

     6. 日期控件clearable不起作用

     要使用   :clearable="false"  才可以

  • 相关阅读:
    D
    NOI 1.7编程基础之字符串(35题)
    HYSBZ 2145 悄悄话
    POJ 2406 Power Strings
    POJ 3461 Oulipo[附KMP算法详细流程讲解]
    POJ 3974 Palindrome
    POJ 1002 487-3279
    POJ 1182 食物链
    POJ 2524 Ubiquitous Religions
    HDU 1251 统计难题
  • 原文地址:https://www.cnblogs.com/DennyZhao/p/10322969.html
Copyright © 2011-2022 走看看