编译时报错 node:14.19
key should be placed on the tag.
at D:\vue-big-screen-plugin\node_modules@jiaminghi\data-view\lib\components\decoration6\src\main.vue:8:11
6 | >
7 | <rect
8 | :key="i"
| ^^^^^^^^
9 | :fill="mergedColor[Math.random() > 0.5 ? 0 : 1]"
10 | :x="point[0] - halfRectWidth"
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue?vue&type=template&id=00bc6d25 1:0-262 1:0-262
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue 1:0-65 6:68-74 16:64-18:3 17:29-35 16:2-18:4
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration6/index.js 2:0-41 4:16-32 4:34-45
@ ./node_modules/@jiaminghi/data-view/lib/index.js 29:0-72 29:0-72 69:0-57 118:10-21
@ ./src/main.ts 5:0-41 14:8-13
一样, 问一下,解决了么
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
需要提前安装好 nodejs 与 yarn,下载项目后在项目主目录下运行 yarn 拉取依赖包。安装完依赖包之后然后使用 vue-cli 或者直接使用命令npm run serve,就可以启动项目,启动项目后最好是手动全屏查看(按 F11)。如果编译项目的时候提示没有 DataV 框架的依赖,输入 npm install @jiaminghi/data-view 或者 yarn add @jiaminghi/data-view 进行手动安装。
如果安装完依赖 @jiaminghi 报错 key should be placed on the tag 类似的bug,我已经做了修复,大家把此工程目录下的 other_modules/@jiaminghi.rar 解压并替换掉 node_modules 里面的同名文件(或者手动修改,只需要把 v-for 移动到下方标签里,并删除 template 即可),我已经给作者提了 Issues 希望大家拉取的时候没有这个错误
如果大家不想每次都修改依赖,可以使用社区封装的 vue3 版本的 DataV:
https://gitee.com/kjgl77/datav-vue3
https://gitee.com/wangbin3162/bin-datav?_from=gitee_search
作者在项目中有个other_modules 里面的压缩包解压后放到 node_modules 目录中。就能解决了,麻烦的地方就是每次编译都要重新放一次
这个组件和@jiaminghi/data-view存在差异,更换了后不一样
登录 后才可以发表评论