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

Avoid using non-primitive value as key, use string/number value instead found in <AtTable> #33

Closed
icepole-jon opened this issue Sep 18, 2017 · 10 comments

Comments

@icepole-jon
Copy link


use the code of official table example

@StevenYuysy
Copy link
Contributor

Maybe you can add more info about how to reproduce

@StevenYuysy
Copy link
Contributor

Seems you are using object as key while rendering table columns

@icepole-jon
Copy link
Author

@StevenYuysy
that is the code, just the same as official example

<template>
  <div>
    <at-table :columns="columns1" :data="data1"></at-table>
  </div>
</template>
<script>
  export default {
    name: 'index',
    mounted () {
      // this.$Loading.start()
    },
    data () {
      return {
        columns1: [
          {
            title: '姓名',
            key: 'name'
          },
          {
            title: '年龄',
            key: 'age'
          },
          {
            title: '地址',
            key: 'address'
          }
        ],
        data1: [
          {
            name: '库里',
            age: 18,
            address: '深圳市宝安区创业一路'
          },
          {
            name: '詹姆斯',
            age: 25,
            address: '广州市天河区岗顶'
          },
          {
            name: '科比',
            age: 24,
            address: '上海市浦东新区'
          },
          {
            name: '杜兰特',
            age: 22,
            address: '深圳市南山区深南大道'
          },
          {
            name: '威斯布鲁克',
            age: 21,
            address: '北京市朝阳区'
          },
          {
            name: '邓肯',
            age: 26,
            address: '深圳市罗湖区万象城'
          },
          {
            name: '帕克',
            age: 25,
            address: '深圳市福田区中心书城'
          },
          {
            name: '欧文',
            age: 20,
            address: '广州市番禺区大学城'
          },
          {
            name: '托马斯',
            age: 19,
            address: '北京市朝阳区'
          }
        ]
      }
    }
  }
</script>

@lancer07
Copy link

@icepole-jon 用官网的例子也这么报错

@icepole-jon
Copy link
Author

icepole-jon commented Sep 20, 2017

@lancer07 对啊,我也不知道是什么原因,从字面意思理解就是用object作为key去循环了 。。虽说不影响使用,但是一直提示好蛋疼

@icepole-jon
Copy link
Author

放弃了。。

@SpiritusDeos
Copy link

SpiritusDeos commented Oct 16, 2017

I don't understand why this issue is closed. It doesn't work with the last version of the library. I try to push some data to data1 after fetch my api.

And this is the result :

capture d ecran 2017-10-16 a 11 38 29

@icepole-jon
Copy link
Author

@kennyy0123 I am sorry about that, maybe someone can help you. I am using the other frame now.

@icepole-jon icepole-jon reopened this Oct 17, 2017
@lancer07
Copy link

@kennyy0123 u can move to iview

@koppthe
Copy link
Member

koppthe commented Nov 2, 2017

#47

@koppthe koppthe closed this as completed Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants