@mujian/js-sdk 0.0.6-beta.60 → 0.0.6-beta.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react.js +6 -1
- package/dist/umd/react.js +6 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -463,9 +463,14 @@ const MdRendererBase = ({ content, unsafe = false })=>{
|
|
|
463
463
|
iframeIdList.forEach((id)=>{
|
|
464
464
|
const iframe = containerRef.current?.querySelector('#MJ-iframe-' + id);
|
|
465
465
|
if (!iframe) return;
|
|
466
|
-
|
|
466
|
+
const removeSpin = ()=>{
|
|
467
467
|
const spinElement = iframe.parentElement?.querySelector('#MJ-spin-' + id);
|
|
468
468
|
if (spinElement) spinElement.remove();
|
|
469
|
+
};
|
|
470
|
+
const timeout = setTimeout(removeSpin, 5000);
|
|
471
|
+
iframe.addEventListener('load', ()=>{
|
|
472
|
+
clearTimeout(timeout);
|
|
473
|
+
removeSpin();
|
|
469
474
|
});
|
|
470
475
|
});
|
|
471
476
|
return ()=>{
|
package/dist/umd/react.js
CHANGED
|
@@ -7212,9 +7212,14 @@ ${content}
|
|
|
7212
7212
|
iframeIdList.forEach((id)=>{
|
|
7213
7213
|
const iframe = containerRef.current?.querySelector('#MJ-iframe-' + id);
|
|
7214
7214
|
if (!iframe) return;
|
|
7215
|
-
|
|
7215
|
+
const removeSpin = ()=>{
|
|
7216
7216
|
const spinElement = iframe.parentElement?.querySelector('#MJ-spin-' + id);
|
|
7217
7217
|
if (spinElement) spinElement.remove();
|
|
7218
|
+
};
|
|
7219
|
+
const timeout = setTimeout(removeSpin, 5000);
|
|
7220
|
+
iframe.addEventListener('load', ()=>{
|
|
7221
|
+
clearTimeout(timeout);
|
|
7222
|
+
removeSpin();
|
|
7218
7223
|
});
|
|
7219
7224
|
});
|
|
7220
7225
|
return ()=>{
|