feat(cf-table): 新增表格组件
新增 cf-table 组件,包含以下功能: - 支持数据展示和列配置 - 提供表头和表体插槽功能 - 支持最大高度设置 - 实现粘性表头效果 - 提供空数据展示 - 包含完整的组件结构和样式
This commit is contained in:
39
miniprogram/pages/components/cf-table/cf-table.ts
Normal file
39
miniprogram/pages/components/cf-table/cf-table.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
Component({
|
||||
options: { addGlobalClass: true, multipleSlots: true },
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
data: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
columns: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
maxHeight: {
|
||||
type: String,
|
||||
value: "auto",
|
||||
},
|
||||
useTheadSlot: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
useTbodySlot: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user