Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

异步设定内容setContent的值异常 #43

Closed
IEfucker opened this issue Nov 6, 2018 · 3 comments
Closed

异步设定内容setContent的值异常 #43

IEfucker opened this issue Nov 6, 2018 · 3 comments

Comments

@IEfucker
Copy link

IEfucker commented Nov 6, 2018

https://github.com/IEfucker/vue-ueditor-wrap-demo/blob/master/src/store.js#L31

昨天在gitter上交流过,我fork了一份demo,发现异步事件很短,执行顺序watch(value)->_beforeInitEditor(value)->_initEditor(value)

最后一步_initEditor的value先是有值的,下一次执行为空。

异步延迟600ms测试没问题,this.editor已经初始化了

请帮忙看下我的写法是否有问题,谢谢

@haochuan9421
Copy link
Owner

好的,我今天抽时间看一下

@haochuan9421
Copy link
Owner

谢谢你的反馈和重现错误的 Demo,我之前对 watch 里的 handler 方法触发和 this.editor 赋值之间的状态没考虑到,我重新发布了最新版本1.5.0,你执行npm i vue-ueditor-wrap@1.5.0安装最新版应该就好了。因为优化了逻辑,所以代码整体易读性也好一些,如果你有好的意见,欢迎随时反馈,也欢迎PR

@IEfucker
Copy link
Author

IEfucker commented Nov 6, 2018

好我试试,效率真高,之后学习下

@haochuan9421 haochuan9421 transferred this issue from haochuan9421/vue-ueditor-wrap-demo Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants