diff --git a/examples/views/docs/component/schema-filter.md b/examples/views/docs/component/schema-filter.md index 6820450..8f644fd 100644 --- a/examples/views/docs/component/schema-filter.md +++ b/examples/views/docs/component/schema-filter.md @@ -1,4 +1,4 @@ -# Schema Filter 筛选 +# Schema Filter 方案筛选 通过配置JSON Schema的方式快速生成一个筛选表单 diff --git a/examples/views/docs/component/schema-table.md b/examples/views/docs/component/schema-table.md index f436981..8821f76 100644 --- a/examples/views/docs/component/schema-table.md +++ b/examples/views/docs/component/schema-table.md @@ -1,30 +1,32 @@ -# Schema Table 表格 +# Schema Table 方案表格 -根据JSON Schema配置自动生成表格 +通过配置JSON Schema的方式快速生成一个表格 ## 基础用法 -配置`list`属性设置JSON Schema配置列表 +`schema`设置配置项,其中**props**参数与`z-table`组件参数相同,**items**则对应`z-table`组件的`columns`。 -::: snippet `tableProps`设置表格参数 +::: snippet 本质上是通过`schema`的方式实现生成一个`z-table` ```html ``` ::: -::: snippet `slot`插槽式渲染 +## 列渲染 + +除了使用插槽自定义列的内容之外,也支持直接在配置项中写渲染函数 + +::: snippet 配置项中的`render`可以设置对应列单元格的渲染 ```html ``` ::: - +## 追加列 -## 层级分组 +使用配置项时,**新增的列**则默认追加在**配置项列**之后,使用`left`插槽可在表格的最左侧插入列,顺序在**配置项列**之前 -支持`group`分组,兼容form组件,使同一个schema能够同时复用在`table`、`form`上 - -::: snippet `group`设置分组,其中`key`设置分组对象名称 +::: snippet 用法与`z-table`相同 ```html ``` @@ -144,10 +170,7 @@ export default { 参数|说明|类型|可选值|默认值 -|-|-|-|- value | 表格数据 | Array | - | - -list | JSON Schema配置项列表 | Array | - | [] -tableProps | 表格参数 | Object | - | - -tableEvents | 表格参数 | Object | - | - -minWidth | 列宽 | Number | - | - +schema | JSON Schema配置项列表 | Array | - | [] ## Events 事件 diff --git a/examples/views/docs/component/table.md b/examples/views/docs/component/table.md index 6a2a360..c0ae9b7 100644 --- a/examples/views/docs/component/table.md +++ b/examples/views/docs/component/table.md @@ -132,15 +132,19 @@ export default {
编辑模式: + 编辑全部: 双击编辑: - + +