Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

轮播表提示key重复 #8

Closed
XueMeijing opened this issue Jul 1, 2020 · 3 comments
Closed

轮播表提示key重复 #8

XueMeijing opened this issue Jul 1, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@XueMeijing
Copy link

Bug report

轮播表的key是如何确定的? data: [[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]]这样会报错,提示有重复的key,显示异常,并且每次轮播都会新增一列数据。把data中的number 1变成string 1,data: [['1',0],['1',0],['1',0],['1',0],['1',0],['1',0],['1',0],['1',0],['1',0],['1',0],['1',0]],就正常了

出现Bug的组件?

轮播表

组件配置数据?

config = {
header,
data: [[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]],
rowNum: 8,
headerBGC: 'rgba(0,0,0,.3)', // #00BA66
oddRowBGC: 'transparent', // '#609bdf', 'transparent'
evenRowBGC: 'transparent', // '#ffa324', 'transparent'
index: true,
}

控制台错误输出?

warning: Encountered two children with the same key, 4. Keys should be unique so that components maintain their identity across updates.

期望情况?

image

实际情况?

image

其他相关信息

  • DataV版本
    "^1.2.1"
  • 浏览器版本
    chrome83
  • 其他
@yizhiyuyou
Copy link
Member

@XueMeijing 您好,给我一个可复现的例子。

@XueMeijing
Copy link
Author

@XueMeijing 您好,给我一个可复现的例子。

事例仓库地址 : https://github.com/XueMeijing/dataV-test.git 启动项目就能看到了

@yizhiyuyou yizhiyuyou added the bug Something isn't working label Jul 3, 2020
@yizhiyuyou
Copy link
Member

@XueMeijing 已修复,升级至 v1.2.2 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants