vue.js - VUE数据绑定失败

查看:167
本文介绍了vue.js - VUE数据绑定失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

先上代码

  <el-card type="border-card">
    <template slot="header">
      <span>节点描述</span>
      <div class="pull-right">
        <el-button v-if="!quill.show" @click="quillEdit()" size="mini" class="yellow" icon="edit" title="编辑"></el-button>
        <el-button v-if="quill.show" @click="saveQuill()" size="mini" class="green" icon="fa-check" title="完成"></el-button>
        <el-button v-if="quill.show" @click="closeQuill()" size="mini" class="red" icon="fa-close" title="取消"></el-button>
      </div>
    </template>
    <el-form ref="nodeform" :model="data">
      <el-form-item prop="nodedesc" :error="error.nodedesc">
        <template>
          <quill-editor v-show="quill.show" v-model="data.nodedesc" ref="myQuillEditor" :options="editorOption" style="height:500px">
          </quill-editor>
          <quill-editor v-show="!quill.show" v-model="data.nodedesc" ref="myQuillEditor1" :options="{show : false,  readOnly: true , modules: { toolbar: null }}" style="height:500px">
          </quill-editor>
        </template>
      </el-form-item>
    </el-form>
  </el-card>
  
  下面的export default :data()里如下:
  nodeform: {
    data: {
      nodedesc: null,
      uuid: null
    },
  },
  

}
错误如下,我已经在data中定义了model 和nodedesc为什么还是说我未定义呢?菜鸟在此谢过

解决方案

:error="error.nodedesc"

应该是这个error没有定义?

这篇关于vue.js - VUE数据绑定失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆