uview-next
Version:
基于uView UI 2.0,110+高质量组件库,支持vue2和vue3,支持鸿蒙,支持多语言,搭配便捷工具助力,让开发更得心应手
69 lines (68 loc) • 1.49 kB
JavaScript
import { defineProps } from '../../libs/util/props';
export default defineProps('tableColumn', {
// 字段名称,对应列内容的字段名,支持嵌套属性如 'user.name'
prop: {
type: String,
default: ''
},
// 列类型:selection/index
type: {
type: String,
default: 'default'
},
// 显示的标题
label: {
type: String,
default: ''
},
// 表头对齐方式:left/center/right
headerAlign: {
type: String,
default: 'left'
},
// 表头超出1行隐藏
headerEllipsis: {
type: Boolean,
default: true
},
// 对应列的宽度,单位为px
width: {
type: [Number, String],
default: null
},
// 对应列的最小宽度,单位为px
minWidth: {
type: [Number, String],
default: null
},
// 是否开启列排序
sortable: {
type: Boolean,
default: false
},
// 列的对齐方式:left/center/right
align: {
type: String,
default: 'left'
},
// 格式化函数
formatter: {
type: [Function, null],
default: null
},
// 是否显示该列
show: {
type: Boolean,
default: true
},
// 自定义类名
className: {
type: String,
default: ''
},
// 自定义样式
customStyle: {
type: Object,
default: () => ({})
}
})