在webpack的模塊化構(gòu)建當(dāng)中,使用vue開(kāi)發(fā)在組件內(nèi)import了ueditor,第一次打開(kāi)或刷新頁(yè)面,ueditor是正常渲染的ueditor渲染在一個(gè)彈窗當(dāng)中,彈窗關(guān)閉后,ueditor被銷毀,再次打開(kāi)彈窗,則ueditor沒(méi)有被渲染由于是spa應(yīng)用,許多時(shí)候沒(méi)有被刷新,那么,怎么讓ueditor多次渲染?而避免刷新呢?import '../../static/ueditor/ueditor.config.js'import '../../static/ueditor/ueditor.all.js'import '../../
static/ueditor/lang/zh-cn/zh-cn.js'
// 在mounted中執(zhí)行
UE.getEditor('content', {
UEDITOR_HOME_URL: __dirname + 'static/ueditor/',
serverUrl: config.ajaxUrl + '/ueditor/jsp/controller.jsp',
autoHeight: false,
initialFrameHeight: '250',
emotionLocalization: true,
scaleEnabled: true,
toolbars: [[
'fullscreen','undo', 'redo','emotion','bold', 'italic', 'underline','forecolor',
'backcolor','insertimage','blockquote','justifyleft', 'justifycenter', 'justifyright','inserttable'
]]
});模板:<script id="content" name="content" type="text/plain"></script>very much Thanks in advance.
在vue中,如何多次調(diào)用ueditor?
郎朗坤
2018-10-08 11:29:43