import { OioComponentData, OioSpinProps } from '@oinone/kunlun-vue-ui-common'; import type { PropType } from 'vue'; import type { VxeTablePropTypes } from 'vxe-table'; import { TableBorder, TableOverflow, TableSize } from './typing'; export const OioTableAppearanceProps = { size: { type: String as PropType }, resizable: { type: Boolean, default: undefined }, autoResize: { type: Boolean, default: false }, height: { type: [String, Number] }, border: { type: [Boolean, String] as PropType, default: undefined }, stripe: { type: Boolean, default: undefined }, rowClassName: { type: [String, Function] as PropType }, cellClassName: { type: [String, Function] as PropType }, headerRowClassName: { type: [String, Function] as PropType }, headerCellClassName: { type: [String, Function] as PropType }, footerRowClassName: { type: [String, Function] as PropType }, footerCellClassName: { type: [String, Function] as PropType }, /** * 给行附加样式,也可以是函数 */ rowStyle: { type: [Object, Function] as PropType }, /** * 给表头行附加样式 */ headerRowStyle: { type: [Object, Function] as PropType }, /** * 给单元格附加样式 */ cellStyle: { type: [Object, Function] as PropType }, /** * 给表头单元格附加样式 */ headerCellStyle: { type: [Object, Function] as PropType }, customConfig: { type: Object as PropType> } }; export const OioTableControlProps = { ...OioSpinProps, data: { type: Array as PropType[]> }, showOverflow: { type: [Boolean, String] as PropType, default: undefined }, showHeaderOverflow: { type: [Boolean, String] as PropType, default: undefined }, showFooterOverflow: { type: [Boolean, String] as PropType, default: undefined }, emptyText: { type: String, default: '' }, emptyImage: { type: String, default: undefined }, /** * 行配置 */ rowConfig: { type: Object as PropType }, /** * 列配置 */ columnConfig: { type: Object as PropType }, /** * 排序配置 */ sortConfig: { type: Object as PropType }, /** * 单选框配置 */ radioConfig: { type: Object as PropType }, /** * 复选框配置 */ checkboxConfig: { type: Object as PropType }, /** * tooltip 配置 */ tooltipConfig: { type: Object as PropType }, /** * 展开行配置 */ expandConfig: { type: Object as PropType }, /** * 可编辑配置 */ editConfig: { type: Object as PropType }, /** * 树形表格配置 */ treeConfig: { type: Object as PropType }, /** * 横向虚拟滚动配置 */ scrollX: { type: Object as PropType }, /** * 纵向虚拟滚动配置 */ scrollY: { type: Object as PropType }, showFooter: { type: Boolean, default: undefined }, footerMethod: { type: Function as PropType }, spanMethod: { type: Function as PropType }, mergeCells: { type: Array as PropType } }; export const OioTableProps = { ...OioTableAppearanceProps, ...OioTableControlProps, ...OioComponentData };