AT-UI / at-ui

A fresh and flat UI-Kit specially for desktop application, made with ♥ by Vue.js 2.0 (DEPRECATED)
https://at.aotu.io
MIT License
2.34k stars 230 forks source link

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

Closed icepole-jon closed 6 years ago

icepole-jon commented 7 years ago

use the code of official table example

StevenYuysy commented 7 years ago

Maybe you can add more info about how to reproduce

StevenYuysy commented 7 years ago

Seems you are using object as key while rendering table columns

icepole-jon commented 7 years ago

@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 commented 7 years ago

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

icepole-jon commented 7 years ago

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

icepole-jon commented 7 years ago

放弃了。。

SpiritusDeos commented 6 years ago

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 commented 6 years ago

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

lancer07 commented 6 years ago

@kennyy0123 u can move to iview

koppthe commented 6 years ago

47