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

上传图片后的图片路径未更新 #1

Closed
604587986 opened this issue Apr 17, 2018 · 3 comments
Closed

上传图片后的图片路径未更新 #1

604587986 opened this issue Apr 17, 2018 · 3 comments

Comments

@604587986
Copy link

绑定的数据任然是loading图片的路径,只有继续添加内容,或者触发contentchange事件,才能绑定为上传后的图片路径

@ghost
Copy link

ghost commented Apr 19, 2018

不好意思,最近公司比较忙,没看GitHub。不知道你的问题解决没?这个问题的原因在于UEditor的contentchange事件在单图片上传之后不会触发。这是UEditor本身的缺陷。我刚才看了UEditor的源码,你需要修改一下源码。在ueditor.all.js的第24526行里面加上下图红框里的那一句,作用就是监听图片加载,加载之后,手动触发一下contentChange事件,如果你为了控制js体积,使用的是ueditor.all.min.js。我已经把重新编译后的UEditor资源文件,放在github上了,你也可以下载。
wx20180419-221609 2x
wx20180419-232504 2x

@ghost ghost closed this as completed May 9, 2018
@ah597568204
Copy link

拖拽的图片也是一样,我找到UE.plugin.register('autoupload' 也加了下contentchange

@haochuan9421
Copy link
Owner

@ah597568204 现在 v-model 的实现方式主要依赖 MutationObserver API,我自己也试了一下,并存在这种问题,但如果你使用mode="listener"模式,v-model 的实现会依赖 contentChange 事件,可能会存在这个问题,如果确实有的话,你可以给我的这个仓库提交一个PR,我验证通过后,会更新当前项目的资源文件 assets/downloads

This issue was closed.
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

3 participants