dev_1.2
tangjie 2026-07-28 09:06:00 +08:00
parent 1d9735f020
commit d6997f351b
1 changed files with 6 additions and 1 deletions

View File

@ -95,6 +95,9 @@ const App = (props) => {
await instance.ready(); await instance.ready();
sdkRef.current = instance; sdkRef.current = instance;
})(); })();
return () => {
sdkRef.current?.destroy();
};
}, [fileId]); }, [fileId]);
return ( return (
@ -250,7 +253,9 @@ const App = (props) => {
size="small" size="small"
onClick={() => { onClick={() => {
props props
.createWpsDoc({ docxUrl: url, projectId: router.query.id}) .createWpsDoc({ data:{
docxUrl: url, projectId: router.query.id
}})
.then((res) => { .then((res) => {
const fileId = res?.data?.fileId; const fileId = res?.data?.fileId;
if (!fileId) { if (!fileId) {