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. Lightoj 1348 Aladdin and the Return Journey (树链剖分)(线段树单点修改区间求和)

    Finally the Great Magical Lamp was in Aladdin's hand. Now he wanted to return home. But he didn't wa ...

  2. Matlab中find函数陷阱

    a = [ 1 2 3 3  3]; 如果a==3 返回[ 0 0 1  1 1]; find(a==3) 返回[3 4 5],这才是想要的下标.

  3. NAND_FLASH_内存详解与读写寻址方式

    一.内存详解 NAND闪存阵列分为一系列128kB的区块(block),这些区块是 NAND器件中最小的可擦除实体.擦除一个区块就是把所有的位(bit)设置为"1"(而所有字节(b ...

  4. 为什么我不使用Kubernetes的Ingress

    为什么我不使用Kubernetes的Ingress 很不幸,据我所知Kubernetes的文档不是很完美,这就是为什么有很多同学在使用它的时候会遇到很多的坑,Ingress这个组件就是这些坑中的一个. ...

  5. Scala各种符号含义;scala =>符号含义总结

    符号: <- :for循环 -> :map映射 => :匿名函数 Int= :scala函数 _ :通配符 https://blog.csdn.net/bon_mot/article ...

  6. 自动生成logo的网址

    1.https://www.logaster.com/logo/

  7. hdoj 1159最长公共子序列

     /*Common Subsequence A subsequence of a given sequence is the given sequence with some elements ( ...

  8. ES6中的async函数

    一.概述 async 函数是 Generator 函数的语法糖 使用Generator 函数,依次读取两个文件代码如下 var fs = require('fs'); var readFile = f ...

  9. leetcode题解:Construct Binary Tree from Preorder and Inorder Traversal (根据前序和中序遍历构造二叉树)

    题目: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume t ...

  10. How to initialize th rasp berry PI

    WHAT YOU WILL NEED REQUIRED SD Card We recommend an 8GB class 4 SD card – ideally preinstalled with ...