有没有VUE3 做好的demo工程啊

阅读次数 98

前端接入一头雾水,有没有做好的demo提供一份下载。

1 Answers

您好,接入和使用什么前端框架,都什么关系呢。选择umd,或者esm 引入sdk的方式都行。 快速接入:https://solution.wps.cn/docs/web/quick-start.html

比如在vue中使用,esm方式引入sdk

import { ref } from 'vue'
import WebOfficeSDK from './web-office-sdk-solution.es.js'

export default {
  // `setup` 是一个特殊的钩子,专门用于组合式 API。
  setup() {
    
    WebOfficeSDK.init({
      officeType: WebOfficeSDK.OfficeType.Writer,
          appId: 'xxxxx',
          fileId: 'xxxxx',
          mount: 'xxx' 
   })

    return {}
  }
}

如果后端部署好了服务呢 前端也去加载sdk对吧?