iView-admin Editor 组件 绑定默认值问题

发现 editor 组件,设置v-model 后, 修改 v-model 数据, editor组件没有自动渲染,需要手动设置渲染

 this.$refs.editor.setHtml(this.model.description)

<template>
<div>
<editor v-model="model.description" ref="editor" :cache="false"/>
</div>
</template>
<script>
import Editor from '_c/editor' export default {
components: { Editor },
data () {
return {
model: { description: '' }
}
},
methods: {
Bind () {
// 模拟ajax读取数据绑定
this.model.description = 'hello word'
this.$refs.editor.setHtml(this.model.description) // 加上这句才可以
}
},
mounted () {
this.Bind()
}
}
</script>

  

【已解决】iView-admin Editor 组件 绑定默认值问题的更多相关文章

  1. sql语句创建主键、外键、索引、绑定默认值

    use Mengyou88_Wuliu --创建公司表 create table dbo.Company2 ( CompanyID ,) not null, CompanyName ) null, A ...

  2. vue select下拉框绑定默认值

    vue select下拉框绑定默认值: 首先option要加value值,以便v-model可以获取到对应选择的值 一.当没有绑定v-model,直接给对应的option加selected属性 二.当 ...

  3. SQLServer2008 绑定默认值

    默认值或绑定:(newid())值:2E014A19-7AF5-471E-866C-DC5D6DFE59A5 (dateadd(day,(1),getdate()))值: 2014-07-31 20: ...

  4. easyui-combobox默认值绑定

    $('#combox_role').combobox({ panelHeight: , url: '../../Handler/GetComboxItems.ashx?type=0', valueFi ...

  5. ES6笔记之参数默认值(译)

    原文链接:http://dmitrysoshnikov.com/ 原文作者:Dmitry Soshnikov 译者做了少量补充.这样的的文字是译者加的,可以选择忽略. 作者微博:@Bosn 在这个简短 ...

  6. mysql多个时间戳字段默认值问题

    项目使用mysql数据库,在设计表时某张表有多个字段设计的类型是timestamp 但没有给默认值,在执行sql时报 timestamp Invalid default value for 'xxx' ...

  7. Jmeter -- HTTP Request Defaults HTTP请求默认值

    一.HTTP Request Defaults的作用: 该组件可以为我们的http请求设置默认的值.假如,我们创建一个测试计划有很多个请求且都是发送到相同的server,这时我们只需添加一个Http ...

  8. [C#][MVC]DropDownListFor 默认值无法选中的 BUG

    本文来自:https://www.cnblogs.com/craze/p/6124575.html 关于mvc中@Html.DropDownListFor和@Html.DropDownList默认值无 ...

  9. MVC Dropdownlist数据绑定 默认值

    @Html.DropDownList("Data", (SelectList)ViewBag.Data, new { @class = "form-control cho ...

随机推荐

  1. android 使用 LocalStorage

    PS:本身是.net 出身 因为项目需要 研究了好几天安卓 这个方法网上也有 自己也写出来 有时间自己看看 和 给还没有解决问题的朋友借鉴下,下面有标个重点 是允许使用localstorage 的关键 ...

  2. jQuery Lazy Load图片懒加载

    传送门:官网地址,jQuery Lazy Load v1.7.2下载,Github 使用方法: 1.引用js文件 <script src="jquery.js">< ...

  3. Educational Codeforces Round 31 A. Book Reading【暴力】

    A. Book Reading time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  4. js部分的总结

    一.词法结构 1.区分大小写 2.注意//单行/*多行注释* 3.字面量(直接量 literal) 12 //数字 5.8 //小数 “hello” ‘hello’ true /js/gi  //正则 ...

  5. ARC 098 C - Attention

    Problem Statement There are N people standing in a row from west to east. Each person is facing east ...

  6. nginx配置及常见问题

    问题 1.openresty请求时,不能解析域名? openresty依赖配置里面的resolver 192.168.1.1; 2.文件上传是报错413 Request Entity Too Larg ...

  7. 解魔方的机器人攻略17 – 魔方CFOP算法

    由 动力老男孩 发表于 2010/01/03 17:38:09 本来我想把这个攻略做成一个NXT开发的教程,把传感器,电机,发声等部分都介绍一遍.不过现在看来有些同学很心急,希望早点看到“核心代码”, ...

  8. linux之ssh命令

    ssh命令用于远程登录上Linux主机. 常用格式:ssh [-l login_name] [-p port] [user@]hostname更详细的可以用ssh -h查看. 不指定用户: ssh 1 ...

  9. Java高级特性—锁

    1).synchronized 加同步格式: synchronized( 需要一个任意的对象(锁) ){ 代码块中放操作共享数据的代码. } synchronized的缺陷 synchronized是 ...

  10. CentOS6.4 安装 codeblocks-12.11

    FROM: http://blog.csdn.net/theegao/article/details/8750239 一.下载 1.   codeblocks-12.11-1.el6.x86_64.t ...