nutui-uniapp
Version:
京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)
39 lines (37 loc) • 1.01 kB
text/typescript
import type { VNode, VNodeChild } from 'vue'
export interface TableColumnProps {
/**
* @description 列的唯一标识
*/
key?: string
/**
* @description 表头标题
*/
title?: string
/**
* @description 列的对齐方式,可选值`left`,`center`
*/
align?: 'left' | 'center' | 'right'
/**
* @description 表头样式
*/
stylehead?: string
/**
* @description 表格列样式
*/
stylecolumn?: string
/**
* @description 排序,可选值有 `true`,`function`, `default`, 其中 `true`表示点击之后可能会依赖接口, `function`可以返回具体的排序函数, `default`表示采用默认的排序算法
* @param row1
* @param row2
* @returns
*/
sorter?: boolean | 'default' | ((row1: any, row2: any) => number)
/**
* @description 自定义渲染列数据,优先级高,仅支持`H5`
* @param rowData
* @param rowIndex
* @returns
*/
render?: (rowData?: object, rowIndex?: number) => VNodeChild | string | VNode
}