table中render button没有渲染出来,大神帮帮我啊,急急急!
<i-table border :columns="columns" :data="data"></i-table>
import { Button, Icon, Form, FormItem, Input, Select, Option, Table, Page } from 'iview'
components: {
IForm: Form,
IFormItem: FormItem,
IInput: Input,
IButton: Button,
ISelect: Select,
IOption: Option,
ITable: Table,
IPage: Page
}
columns: [
{ title: 'NO', key: 'id' },
{ title: 'Name', key: 'name' },
{ title: 'Age', key: 'age' },
{ title: 'Created Date', key: 'time' },
{
title: 'Action',
key: 'action',
render: (h, params) => {
return h('i-button')
}
}
],
data: [
{ id: 1, name: 'David Lee', age: 18, time: '2016-06-12' },
{ id: 1, name: 'David Lee', age: 18, time: '2016-06-12' },
{ id: 1, name: 'David Lee', age: 18, time: '2016-06-12' },
{ id: 1, name: 'David Lee', age: 18, time: '2016-06-12' },
{ id: 1, name: 'David Lee', age: 18, time: '2016-06-12' }
]
写错了。
应该是: