UNPKG

nutui-uniapp

Version:

京东风格的轻量级移动端 Uniapp、Vue3 组件库(支持小程序开发)

39 lines (34 loc) 823 B
import type { ExtractPropTypes } from 'vue' import { commonProps, makeArrayProp, truthProp } from '../_utils' import type { TableColumnProps } from './types' export const tableProps = { ...commonProps, /** * @description 是否显示边框 */ bordered: truthProp, /** * @description 表头数据 */ columns: makeArrayProp<TableColumnProps>([]), /** * @description 表格数据 */ data: makeArrayProp<any>([]), /** * @description 是否显示简介 */ summary: { type: Function, default: null, }, /** * @description 条纹是否明暗交替 */ striped: Boolean, } export type TableProps = ExtractPropTypes<typeof tableProps> export const tableEmits = { sorter: (val: TableColumnProps) => val instanceof Object, } export type TableEmits = typeof tableEmits