DataV-Team / DataV

Vue数据可视化组件库(类似阿里DataV,大屏数据展示),提供SVG的边框及装饰、图表、水位图、飞线图等组件,简单易用,长期更新(React版已发布)
http://datav.jiaminghi.com
MIT License
8.98k stars 1.77k forks source link

vue2 main.js 引入后 编译报错 #313

Open JCDDYY opened 11 months ago

JCDDYY commented 11 months ago

Bug report

vue2 的项目在引入main.js 运行后报错

出现Bug的组件?

组件配置数据?

控制台错误输出?

Failed to compile with 5 errors 17:25:23

error in ./node_modules/@jiaminghi/data-view/lib/components/conicalColumnChart/src/main.vue

Module parse failed: Unexpected token (163:8) You may need an appropriate loader to handle this file type. | const max = data[0] ? data[0].value : 10; | data = data.map(item => ({ | ...item, | percent: item.value / max | }));

@ ./node_modules/@jiaminghi/data-view/lib/components/conicalColumnChart/src/main.vue 4:0-103 5:0-116 @ ./node_modules/@jiaminghi/data-view/lib/components/conicalColumnChart/index.js @ ./node_modules/@jiaminghi/data-view/lib/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./node_modules/@jiaminghi/data-view/lib/components/scrollRankingBoard/src/main.vue

Module parse failed: Unexpected token (174:8) You may need an appropriate loader to handle this file type. | const total = max + minAbs; | data = data.map((row, i) => ({ | ...row, | ranking: i + 1, | percent: (row.value + minAbs) / total * 100

@ ./node_modules/@jiaminghi/data-view/lib/components/scrollRankingBoard/src/main.vue 4:0-103 5:0-116 @ ./node_modules/@jiaminghi/data-view/lib/components/scrollRankingBoard/index.js @ ./node_modules/@jiaminghi/data-view/lib/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./node_modules/@jiaminghi/data-view/lib/components/activeRingChart/src/main.vue

Module parse failed: Unexpected token (222:10) You may need an appropriate loader to handle this file type. | series: [{ | type: 'pie', | ...mergedConfig, | outsideLabel: { | show: false

@ ./node_modules/@jiaminghi/data-view/lib/components/activeRingChart/src/main.vue 4:0-103 5:0-116 @ ./node_modules/@jiaminghi/data-view/lib/components/activeRingChart/index.js @ ./node_modules/@jiaminghi/data-view/lib/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./node_modules/@jiaminghi/data-view/lib/components/scrollBoard/src/main.vue

Module parse failed: Unexpected token (280:8) You may need an appropriate loader to handle this file type. | } | data = data.map((d, i) => ({ | ...d, | scroll: i | }));

@ ./node_modules/@jiaminghi/data-view/lib/components/scrollBoard/src/main.vue 4:0-103 5:0-116 @ ./node_modules/@jiaminghi/data-view/lib/components/scrollBoard/index.js @ ./node_modules/@jiaminghi/data-view/lib/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill ./src/main.js

error in ./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue

Module parse failed: Unexpected token (531:10) You may need an appropriate loader to handle this file type. | const time = randomExtend(...duration) / 10; | return { | ...item, | path, | key,

@ ./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/src/main.vue 4:0-103 5:0-116 @ ./node_modules/@jiaminghi/data-view/lib/components/flylineChartEnhanced/index.js @ ./node_modules/@jiaminghi/data-view/lib/index.js @ ./src/main.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server babel-polyfill ./src/main.js

期望情况?

正常运行

实际情况?

报错 五个错误

其他相关信息