I'm using a django template and using Vue only on the current page.
however when importing the lib, an error is displayed.
<!DOCTYPE html>
<html lang="pt-br">
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="app">
<el-container style="height: 100vh;">
<el-header>
<el-row>
<el-col :span="12" style="text-align: left;">
<el-image
style="width: 110px;"
src="img/logo-royal.png"
fit="fit">
</el-image>
</el-col>
<el-col :span="12" style="float: right;">
<menu-header></menu-header>
</el-col>
</el-row>
</el-header>
<el-container>
<el-container>
<el-main>
.....
content
.....
</el-main>
</el-container>
</el-container>
<el-footer style="font-size: 11px;">info</el-footer>
</el-container>
</div>
</body>
<script src="js/lib/vue.js"></script>
<script src="js/lib/apexcharts.js"></script>
<script src="js/lib/vue3-apexcharts.js"></script>
<script>
import VueApexCharts from 'vue-apexcharts'
var app = new Vue({
el: '#app',
components:{
apexchart: VueApexCharts <---- Uncaught SyntaxError: Cannot use import statement outside a module
},
data() {
return {
}
},
methods: {
}
});
</script>
</html>
Uncaught SyntaxError: Cannot use import statement outside a module
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…