表格 展示/交互

组件 ID: table

这是一个标准的 SunForm 展示/交互组件,支持可视化配置与低代码生成。

JSON 配置示例

直接复制以下 JSON 到配置文件中即可使用。

{
  "type": "table",
  "props": {
    "list": [],
    "apiSet": "{",
    "columns": [],
    "remark": "",
    "hide": false,
    "designQueryShow": false,
    "customHead": false,
    "customActionCol": false,
    "method": "post",
    "apiurl": "",
    "params": [],
    "headers": [],
    "isQuery": false,
    "contentType": "JSON",
    "paramsFormat": "",
    "headersFormat": ""
  }
}

属性配置 (Props)

属性名 类型 默认值 说明
remark string - 组件备注/说明
hide boolean false 是否隐藏该组件
designQueryShow boolean false 暂无描述
customHead boolean false 暂无描述
customActionCol boolean false 暂无描述
apiSet object { API 接口配置对象 (url, method, params)
method string post 暂无描述
apiurl string - 暂无描述
params object [] 暂无描述
headers object [] 请求头配置
isQuery boolean false 暂无描述
contentType string JSON 暂无描述
paramsFormat string - 暂无描述
headersFormat string - 暂无描述
successFormat string - 暂无描述
errorFormat string - 暂无描述
labelField string - 暂无描述
valueField string - 暂无描述
beforeSend string - 暂无描述
list object [] 暂无描述
listKey string list 暂无描述
total number 0 数据总条数
totalKey string total 暂无描述
showPagination boolean true 暂无描述
pageSize number 10 暂无描述
pageSizes object [10, 20, 50, 100] 暂无描述
columns object [] 表格列配置
rowKey string id 暂无描述
tableRef string table 暂无描述
border boolean true 暂无描述
emptyText string 暂无数据 暂无描述
style string return {height:\"100%\"} 自定义内联样式 CSS
showStatus boolean false 暂无描述
showTotal boolean true 暂无描述
showPageSizes boolean true 暂无描述
onCreated any null 组件创建时触发的事件
onMounted any null 组件挂载后触发的事件
onHandle any null 事件回调
onClick any null 点击组件触发的事件
onSelect any null 事件回调
onSort any null 事件回调
onSearch any null 事件回调
rows string ListOrders 暂无描述
count string OrderCount 暂无描述
page string pageIndex 暂无描述
limit string pageSize 暂无描述
pageDefault number 1 暂无描述
searchFields string - 暂无描述
titleFields string - 暂无描述
statusFields string - 暂无描述
switchFields string - 暂无描述
searchFieldsValue string - 暂无描述
switchFieldsValue string - 暂无描述
showSearch boolean true 暂无描述
showSwitch boolean true 暂无描述