mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2025-12-30 09:42:25 +00:00
fix: 监听change事件 解决上传后不操作无法触发回调
This commit is contained in:
@@ -173,8 +173,11 @@ const initOptions = computed((): InitOptions => {
|
||||
});
|
||||
|
||||
// 监听内容变化,处理待附加 data-oss-id 的图片
|
||||
editor.on('NodeChange', () => {
|
||||
if (pendingImageMap.size === 0) return;
|
||||
editor.on('change', () => {
|
||||
if (pendingImageMap.size === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
pendingImageMap.forEach((ossId, url) => {
|
||||
const imgDoms = editor.dom.select(`img[src="${url}"]`);
|
||||
if (imgDoms && imgDoms.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user