首页 / 浏览问题 / 三维GIS / 问题详情
vue3加载cesium地球时遇到问题,实在不知道哪里错了。
yjw
15EXP 2022年11月21日

import {createApp} from 'vue'
import App from './App.vue'

 const app = createApp(App)

//vue-iclient3d-webgl组件库
import ElementPlus from "element-plus";
import 'element-plus/theme-chalk/index.css'
app.use(ElementPlus)

import webgl3d from '@supermap/vue-iclient3d-webgl';
app.use(webgl3d)

app.mount ('#app')
------------------------------------------------------------------------------
<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="shortcut icon" href="#" />
    <title>点云</title>
     <!-- 引入cesium依赖 -->
     <link href="./Cesium/Widgets/widgets.css" rel="stylesheet">		
     <script type="text/javascript" src="./Cesium/Cesium.js"></script>
     <link href="./index.css" rel="stylesheet">
 
  </head>
  <body>
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
--------------------------------------------------------------------------------------
<template>
<sm3d-viewer scene-url="http://43.139.126.68:8090/iserver/services/3D-dc/rest/realspace"></sm3d-viewer>
</template>

<script>

export default {
  name: 'App',
}
</script>

报错信息:runtime-core.esm-bundler.js?d2dd:40 [Vue warn]: Failed to resolve component: sm3d-viewer
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <App>导致地球加载不出来

1个回答

您好,

您确定是只有这个报错或者说是这个报错导致的吗?

这应该只是一个警告,警告的含义应该是您引用了组件compilerOptions.isCustomElement,但是没有使用。
4,151EXP 2022年11月21日
...