-
Hello !
I want to add lib “vue-echarts-v3” to Quasar CLI project.What i have done :
- Installed “vue-echarts-v3” as “npm install --save echarts vue-echarts-v3”
- Edited “quasar.conf.js” as added "build: {
scopeHoisting: true,
extendWebpack (cfg) {
})
cfg.module.rules.push({
test: /.js$/,
loader: ‘babel-loader’,
include: [resolve(‘src’), resolve(‘test’), resolve(‘node_modules/vue-echarts-v3/src’)]
})
}
},
" - In vue module i added :
“<script>
import { QCard, QCardSection } from ‘quasar’
import IEcharts from ‘vue-echarts-v3’
…”
"
<template>
<q-page class=“flex flex-center”>
<img alt=“Quasar logo” src="~assets/quasar-logo-full.svg">
<div name=“divchart” class=“echarts”>
<i-echarts
:option=“bar”
:loading=“loading”
@ready=“onReady”
@click=“onClick”
/>
…
"When load the app in browser i look in Console and there have message
"
vue.runtime.esm.js?2b0e:619 [Vue warn]: Unknown custom element: <i-echarts> - did you register the component correctly? For recursive components, make sure to provide the “name” option.found in
—> <PageIndex> at src/pages/Index.vue
<QPageContainer>
<QLayout>
<MyLayout> at src/layouts/MyLayout.vue
<App> at src/App.vue
<Root>
"I’m new in Vue, and i cant understood why IECharts are not visible/reachable.
Can somebody help me, please !
-
Resolved - а spelling error for “componets” instead of “components”
- ABOUT A YEAR LATER
@minko Can you post your quasar.config.js ?
I am getting error
ReferenceError: resolve is not defined
After adding
cfg.module.rules.push({ test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test'), resolve('node_modules/vue-echarts-v3/src')] })
-
Ok, I looked at https://github.com/pratik227/echarts-quasar and didn’t have to add anything in quasar.conf.js
It just works.
-
How to add "vue-echarts-v3" in Quasar CLI
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Java中Quasar基本使用
springboot项目中使用【Quasar】
java quuassar 协程 quasar-core sppringboot -
[ECharts] - ECharts使用中国地图
ECharts使用中国地图
ECharts使用中国地图 -
quasar-v2搭建quasar app - cordova开发环境
在vue3出来后,quasar也从升级quasarv2,那么quasarv2后quasar app怎么搭建呢
Android chrome 环境变量 quasar vue3 -
grafana echarts使用 echarts graph symbol
昨天突然想起上学时玩的文曲星(电子词典),里面有个猜数字的小游戏,于是拿 ECharts 试着做了一下,大体思路如下:用基于直角坐标系上的 heatmap 做虚拟按键用 graphic.elements[i]-text 和 graphic.elements[i]-rect 做文本框、提示框监听 heatmap 的点击事件,输入数字、猜数heatmap 虚拟按键实现heatmap 数据
grafana echarts使用 echarts symbol 回调函数 echarts symbol回调函数 echarts title位置