在index.html引入了bimface的js
页面中mounted()方法中开始使用, 但是提示'BimfaceSDKLoaderConfig' is not defined
<script>
//?import?BimFace?from?'@/utils/BimfaceSDKLoader.js'
export default {
data ()?{
return {
viewer3D: '',
app: '',
viewToken: '275817bfced440d88081c52c6ae32c67'
}
},
created ()?{
},
mounted ()?{
var loaderConfig = new BimfaceSDKLoaderConfig()
loaderConfig.viewToken = this.viewToken
BimfaceSDKLoader.load(loaderConfig, this.successCallback, this.failureCallback)
},
methods: {
successCallback (viewMetaData)?{
var domShow = document.getElementById('domId')
var webAppConfig = new Glodon.Bimface.Application.WebApplication3DConfig()
webAppConfig.domElement = domShow
this.app = new Glodon.Bimface.Application.WebApplication3D(webAppConfig)
this.app.addView(this.viewToken)
this.viewer3D = this.app.getViewer()
},
failureCallback (error)?{
console.log(error)
}
}
}
</script>
求问如何解决?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…