Thanks to visit codestin.com
Credit goes to github.com

Skip to content

装饰边框3和6编译错误 #337

@Guest-615695028

Description

@Guest-615695028

Bug report

出现Bug的组件?

decoration3, decoration6

组件配置数据?

无配置

控制台错误输出?

ERROR Failed to compile with 2 errors 17:06:27

error in ./node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue?vue&type=template&id=5b231048

Module Error (from ./node_modules/vue-loader/dist/templateLoader.js):

VueCompilerError: key should be placed on the tag.
at D:\Dissertations\Project1\node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue:9:11
7 | >
8 | <rect
9 | :key="i"
| ^^^^^^^^
10 | :fill="mergedColor[0]"
11 | :x="point[0] - halfPointSideLength"

error in ./node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue?vue&type=template&id=00bc6d25

Module Error (from ./node_modules/vue-loader/dist/templateLoader.js):

VueCompilerError: key should be placed on the tag.
at D:\Dissertations\Project1\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"

ERROR in ./node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue?vue&type=template&id=5b231048 (./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue?vue&type=template&id=5b231048)
Module Error (from ./node_modules/vue-loader/dist/templateLoader.js):

VueCompilerError: key should be placed on the tag.
at D:\Dissertations\Project1\node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue:9:11
7 | >
8 | <rect
9 | :key="i"
| ^^^^^^^^
10 | :fill="mergedColor[0]"
11 | :x="point[0] - halfPointSideLength"
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue?vue&type=template&id=5b231048 1:0-262 1:0-262
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue 1:0-65 6:68-74 16:2-18:4 16:64-18:3 17:29-35
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration3/index.js 3:0-41 5:16-32 5:34-45
@ ./node_modules/@jiaminghi/data-view/lib/index.js 26:0-72 26:0-72 65:0-57 111:10-21
@ ./src/main.ts 9:0-41 30:8-13

ERROR in ./node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue?vue&type=template&id=00bc6d25 (./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue?vue&type=template&id=00bc6d25)
Module Error (from ./node_modules/vue-loader/dist/templateLoader.js):

VueCompilerError: key should be placed on the tag.
at D:\Dissertations\Project1\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:2-18:4 16:64-18:3 17:29-35
@ ./node_modules/@jiaminghi/data-view/lib/components/decoration6/index.js 3:0-41 5:16-32 5:34-45
@ ./node_modules/@jiaminghi/data-view/lib/index.js 29:0-72 29:0-72 68:0-57 114:10-21
@ ./src/main.ts 9:0-41 30:8-13

webpack compiled with 2 errors

期望情况?

No issues found.

实际情况?

其他相关信息

v-for="..." 移到<rect>下面,删除<template>一级,即解决此错误

  • DataV版本
  • 浏览器版本
  • 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions