自定义组件文档

191 阅读1分钟

ProTable

Table 属性

属性名说明类型可选值默认值必填
columns列 column 的配置数组ColumnProps< any >--true
api请求接口要在表中渲染的数据数组--true

columns 属性

属性名说明类型可选值默认值必填
type是否开启下拉,多选stringexpand / selection--
prop字段名称string--*
label显示名称string--*
width宽度string---

ProFrom

Table 属性

属性名说明类型可选值默认值必填
schemas列 schemas 的配置数组IForm[]--true
model请求数据要在表单中渲染的数据Object-true

schemas 属性

属性名说明类型可选值默认值必填
type标签类型stringinput / radio / checkbox / select / textarea-*
prop字段名称string--*
label显示名称string--*
required是否必选boolean---
col宽度number-24-
component当type = checkbox,radio ,select 的时候使用FromComponent---
rules表单验证规则FormItemRule--

component 属性

属性名说明类型可选值默认值必填
optionoption数据配置数组FromOtions[]--*
type数据类型stringnumber / year / month / date / datetime/ week/datetimerange/daterange--
format返回格式string-YYYY-MM-DD-

option

属性名说明类型可选值默认值必填
label显示名称string--*
value上传参数string--*

rules 属性

属性名说明类型可选值默认值必填
type验证类型string见rules type--
message提示信息string---

rules type

属性名说明
string必须是字符串类型
number必须是数字类型
boolean必须是布尔类型
method必须是function类型
regexp必须是RegExpRegExp类型
integer必须是整数
float必须是浮点数
array必须是数组
object必须是对象
enum必须是枚举
date必须是Date
url必须是url
hex必须是hex
email必须是email
any可以是任何类型。