前端SDK,react的Ant design pro框架引入SDK依赖问题

阅读次数 2

情况1:无法调用 <img src="https://solution-community.wps.cn/uploads/post/5rtDtyfhPvS.png" alt="image.png"/> 情况2:可以调用,但网页报错类型officeType未定义 <img src="https://solution-community.wps.cn/uploads/post/5rtSESsZJEU.png" alt="image.png"/>
<img src="https://solution-community.wps.cn/uploads/post/5rtSDiNpE6N.png" alt="image.png"/>

为啥我init方法报错了,index.d.js文件里确实有这个方法,OfficeType同理。

但是当我 import WebOfficeSDK from '../../utils/web-office-sdk-solution-v2.0.7/web-office-sdk-solution-v2.0.7.es.js'; 这样导入以后, WebOfficeSDK.init可以调用,但officeType依然是undefind

0 Answers