切换导航
网站首页
网页制作
网络编程
脚本专栏
数据库
服务器
操作系统
网站运营
平面设计
硬件教程
网络安全
电脑基础
Vue.js
js
文档
Node.js
Vue.js
React
jQuery
ES2015(es6)
angularjs
css3动画
vbs
最新电影
flutter
微信小程序
C教程
java教程
C++教程
C#教程
php教程
sql教程
mysql教程
android教程
ios教程
python教程
正则表达式
首页
宝典数据
Vue.js
vue.js ueditor demo
上一篇: vue 里主动销毁 keep-alive 缓存...
下一篇:Vue+axios+Node+express实现文件...
vue.js ueditor demo
发布时间:2019-06-12 发布网站:脚本宝典
脚本宝典
收集整理的这篇文章主要介绍了
vue.js ueditor demo
,
脚本宝典
觉得挺不错的,现在分享给大家,也给大家做个参考。
vuejs.org.cn/guide/custom-directive.html
Vue
.directive('ueditor', { params: ['config'], twoWay: true, bind: function () { var self =
this
;
this
.el.id = 'ueditor' + new Date().getTime().toString() this.editor = UE.getEditor(this.el.id, this.params.config) this.editor.ready(function () { self.editorReady = true self.editor.addListener("contentChange", function () { self.set(self.editor.getContent()) }) self.update(self.vm.$get(self.expression)) }) }, update: function (newValue, oldValue) { if (this.editorReady) { this.editor.setContent(newValue) } }, unbind: function () { this.editor.destroy() } }) var vm = new
Vue
({ el: '#demo', data: function () { return { content: 'Hello Vue.js!', config: { toolbars: [ ['fullscreen', 'source', 'undo', 'redo', 'bold'] ] } } } })