NewbieTable

Newbie 表格组件

Version: 1.0.0

Props

Prop nameDescriptionTypeValuesDefault
title表格标题string-""
filterable是否使用表单搜索boolean-true
tableProps原生表格属性object-{}
tableEvents原生表格事件object-{}
pagination是否使用分页,为 Object 时时使用自定义分页boolean|object-true
pageEvents原生翻页事件object-{}
autoQuery是否在搜索条件变化时自动搜索boolean-false
url表格数据请求 URLstring-""
extraData请求数据时额外提交的参数object-{}
afterFetched请求后 Res 的处理方法, 如有 url, 则该方法必须传func-null
columns表格列定义, TableColumnConfig array|func-() => []
rowSelection选择功能的配置boolean|object-false
rowKey数据值需要指定 key 值,当启用 rowSelection 时一定要指定这个 keystring|func-"id"
formData表格数据array-[]
expandRender额外的展开行string|func-null
expandedRowKeys展开的行array-[]
showRefresh是否显示刷新按钮boolean-true

Events

Event namePropertiesDescription
fetch未传入 url 时的手动请求方法

详细参数

TableColumnConfig 配置

Prop nameDescriptionTypeValuesDefault
title列标题string-""
dataIndex列数据在数据项中对应的 key,支持 a.b.c 的嵌套写法string-""
keyVue 需要的 key,如果已经设置了唯一的 dataIndex,可以忽略这个属性string-""
width列宽度string-""
align对齐方式string-""
ellipsis是否自动缩略boolean-""
fixed列是否固定,可选 true(等效于 left) 'left' 'right'boolean-""
filterable是否可过滤,如果是对象,则为过滤配置,为 true 时 filterable.type = 'input'
详细配置见 Searchopen in new window, key 与 title 如果不传,会直接使用 Column 的这两个属性
boolean |Object-""
isOnlyForQuery是否只用于搜索boolean-""
Last Updated:
Contributors: sinceow