Skip to content

npm install @jiaminghi/data-view =》<template v-for> key should be placed on the <template> tag #326

@nancy-lanlan

Description

@nancy-lanlan

Bug report

出现Bug的组件?

1.node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue

2.node_modules@jiaminghi\data-view\lib\components\decoration6\src\main.vue

组件配置数据?

1.node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue

2.node_modules@jiaminghi\data-view\lib\components\decoration6\src\main.vue

控制台错误输出?

[plugin:vite:vue] key should be placed on the tag.
/node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue:8:11
<rect: key=" i"
:fill="mergedcolor[Math.random()>0.5 ?0:1]':x=""point[0]- halfRectWidth'"

node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue同上

期望情况?

1.node_modules@jiaminghi\data-view\lib\components\decoration3\src\main.vue

2.node_modules@jiaminghi\data-view\lib\components\decoration6\src\main.vue

以上路径打开两份文件的:key="i"提到template标签内保存,否则自动化打包会导致线上报错
npm install @jiaminghi/data-view 都会导致以上路径的两份文件都报错

实际情况?

其他相关信息

  • DataV版本
  • "@jiaminghi/data-view": "^2.10.0",
  • 浏览器版本
  • 126.0.6478.116 (正式版本) (64 位) (cohort: Stable)
  • 其他

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