dev-tmp1
tangjie 2026-08-26 15:49:45 +08:00
parent 5f9674de7b
commit c116b4aed8
1 changed files with 15 additions and 9 deletions

View File

@ -74,6 +74,10 @@ const App = (props) => {
throw new Error(res?.errMessage || res?.message || "上传失败");
}
setFileId(newFileId);
props.queryMyOrCreateDoc({
docxUrl: "",
projectId:router.query.id,
});
message.success("Word 文件上传成功,已在编辑器中打开");
})
.catch((e) => {
@ -157,12 +161,12 @@ const App = (props) => {
},
...(readOnly
? {
commonOptions: {
isBrowserViewMode: true,
// 只读模式下隐藏 WPS 顶部区域(头部和工具栏),页面已有自己的标题栏
isShowTopArea: false,
},
}
commonOptions: {
isBrowserViewMode: true,
// 只读模式下隐藏 WPS 顶部区域(头部和工具栏),页面已有自己的标题栏
isShowTopArea: false,
},
}
: {}),
});
await instance.ready();
@ -349,9 +353,11 @@ const App = (props) => {
size="small"
onClick={() => {
props
.createWpsDoc({ data:{
docxUrl: url, projectId: router.query.id
}})
.createWpsDoc({
data: {
docxUrl: url, projectId: router.query.id
}
})
.then((res) => {
const fileId = res?.data?.fileId;
if (!fileId) {