Skip to content

Commit

Permalink
fix: when loading dc-sdk, the referenced cdn address cannot be loaded…
Browse files Browse the repository at this point in the history
… normally
  • Loading branch information
zouyaoji committed Sep 22, 2022
1 parent 60e47d3 commit 53e132a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/components/viewer/src/useViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,10 @@ export default function (props: VcViewerProps, ctx, vcInstance: VcComponentInter
keys[key] = true
loadLibs.push(...libsConfig[key])
}
} else if (cesiumPath.includes('dc.base')) {
} else if (cesiumPath.includes('dc.base.min.js')) {
loadLibs.push(cesiumPath)
loadLibs.push(cesiumPath.replace('dc.base', 'dc.core'))
loadLibs.push(cesiumPath.replace('dc.base', 'dc.core').replace('.js', '.css'))
loadLibs.push(cesiumPath.replace('/dc.base.min.js', '/dc.core.min.js'))
loadLibs.push(cesiumPath.replace('/dc.base.min.js', '/dc.core.min.js').replace('/dc.core.min.js', '/dc.core.min.css'))
} else if (cesiumPath.includes('/XbsjEarth.js')) {
loadLibs.push(cesiumPath)
} else {
Expand Down

0 comments on commit 53e132a

Please sign in to comment.