使用vue-cli构建项目,在组件当中import ueditor 初始化很慢,有时还会初始化失败
请问有没有遇到过类似的问题?能否提供解决思路或方案?
发现每次初始化成功都会加载一些js、css文件,是否因为加载文件网络慢导致的?文件在本地服务器。
very much Thanks in advance~~~
created () {
this.editor = UE.getEditor('content')
// test code
var d = 1
var dd = setInterval(function() {
d++
console.log(d)
}, 1000)
this.editor.ready((editor) => {
this.editor.execCommand('focus');
console.log('加载时间: ' + d + '秒');
clearInterval(dd)
})
},
destroyed () {
this.editor.destroy()
}
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
人生最曼妙的风景,竟是内心的淡定与从容!