1 Star 0 Fork 0

任林 / rl-plus-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
BaseTable.md 4.21 KB
一键复制 编辑 原始数据 按行查看 历史
renlin@300.cn 提交于 2022-09-23 10:39 . update

< 返回主页

表格(BaseTable)

table

  • 支持v-bind="$attrs"
  • eleType='BaseTable' / eleType=GroupComsType.BASETABLE

Table-column

  • type='selection' / type=TableItemType.SELECTION
  • type='index' / type=TableItemType.INDEX
  • type='expand' / type=TableItemType.EXPAND
  • type='text' / type=TableItemType.TEXT
  • type='radio' / type=TableItemType.RADIO
  • type='checkbox' / type=TableItemType.CHECKBOX
  • type='customFn' / type=TableItemType.CUSTOMFN
  • type='operations' / type=TableItemType.OPERATIONS
  • type='slot' / type=TableItemType.SLOT

引入

    import {BaseTable} from 'rl-plus';

使用

<template>
<BaseTable :config="config"/>
</template>
<script setup>
    import {BaseTable} from 'rl-plus';
    import type {BaseTableType,GroupComsType} from 'rl-plus';
    <!-- 配置 -->
    const config:BaseTableType={
        eleType: GroupComsType.BASETABLE,
        data:[],
        config:[]
    }
</script>

属性 参照element-plus表格文档

table

属性 说明 类型 默认值
eleType 组件类型(必填) GroupComsType
data 值(必填) ObjectType[]
config 配置项(必填) BaseTableItemType[]
soleKey 唯一标识 String
selectList 选中数据列表 ObjectType[]
radioData 单选数据 String/Number/Boolean
height String/Number
maxHeight String/Number
stripe Boolean
border Boolean
fit Boolean
showHeader Boolean
highlightCurrentRow Boolean
currentRowKey String/Number
rowClassName Function
rowStyle Function
cellClassName Function
cellStyle Function
headerRowClassName Function
headerRowStyle Function
headerCellClassName Function
headerCellStyle Function
rowKey Function
emptyText String
defaultExpandAll Boolean
expandRowKeys Array
defaultSort Sort
tooltipEffect 'dark'/'light'
showSummary Boolean
sumText String
summaryMethod Function
spanMethod Function
selectOnIndeterminate Boolean
indent Number
lazy Boolean
load Function
treeProps ObjectType
tableLayout 'fixed'/'auto'
scrollbarAlwaysOn Boolean
flexible Boolean
loading Boolean
size Sizes
disabled Boolean
style StyleType
class StyleType

Table-column(config:BaseTableItemType)

属性 说明 类型 默认值
label 表名(必填) String
prop 字段名称(必填) String
headerSlot 自定义表头且是自定义表头的具名插槽 String
slot 具名插槽 String
type TableItemType
index Number/Function
columnKey String
width String/Number
minWidth String/Number
fixed TableItemFixed/Boolean
renderHeader Function
sortable Boolean/'custom'
sortMethod Function
sortBy Function
sortOrders []
resizable Boolean
formatter Function
showOverflowTooltip Boolean
align AlignType
headerAlign AlignType
className String
labelClassName String
selectable Function
reserveSelection Boolean
filters []
filterPlacement String
filterMultiple Boolean
filterMethod Function
filteredValue []
customFn Function
hidden Boolean/Function
style StyleType
class StyleType

事件

事件名 说明 回调参数
update:value 复选/单选值 (e)=>{}
btnClick 按钮点击事件 (e)=>{const {type,data}=e}
1
https://gitee.com/renlin901017/rl-plus-docs.git
git@gitee.com:renlin901017/rl-plus-docs.git
renlin901017
rl-plus-docs
rl-plus-docs
master

搜索帮助