Files
pet/uni_modules/uview-next/components/u-table-column/props.js
T
2025-08-12 15:04:01 +08:00

69 lines
2.0 KiB
JavaScript

export default {
props: {
// 字段名称,对应列内容的字段名,支持嵌套属性如 'user.name'
prop: {
type: String,
default: () => uni.$u.props.tableColumn.prop
},
// 列类型:selection/index
type: {
type: String,
default: () => uni.$u.props.tableColumn.type
},
// 显示的标题
label: {
type: String,
default: () => uni.$u.props.tableColumn.label
},
// 表头对齐方式:left/center/right
headerAlign: {
type: String,
default: () => uni.$u.props.tableColumn.headerAlign
},
// 表头超出1行隐藏
headerEllipsis: {
type: Boolean,
default: () => uni.$u.props.tableColumn.headerEllipsis
},
// 对应列的宽度,单位为px
width: {
type: [Number, String],
default: () => uni.$u.props.tableColumn.width
},
// 对应列的最小宽度,单位为px
minWidth: {
type: [Number, String],
default: () => uni.$u.props.tableColumn.minWidth
},
// 是否开启列排序
sortable: {
type: Boolean,
default: () => uni.$u.props.tableColumn.sortable
},
// 列的对齐方式:left/center/right
align: {
type: String,
default: () => uni.$u.props.tableColumn.align
},
// 格式化函数
formatter: {
type: [Function, null],
default: null
},
// 是否显示该列
show: {
type: Boolean,
default: () => uni.$u.props.tableColumn.show
},
// 自定义类名
className: {
type: String,
default: () => uni.$u.props.tableColumn.className
},
// 自定义样式
customStyle: {
type: Object,
default: () => uni.$u.props.tableColumn.customStyle
}
}
}