init
This commit is contained in:
38
uni_modules/nutui-uni/components/table/table.ts
Normal file
38
uni_modules/nutui-uni/components/table/table.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
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
|
||||
Reference in New Issue
Block a user