$ui/components/my-crud

增删查改 组件

Source:

Members

(inner) props

Source:
Properties:
Name Type Attributes Description
title string <optional>

标题,也可以用插槽定义

fit boolean <optional>

适配父容器

filter Object <optional>

筛选组件 MyFilter 配置参数

query Object <optional>

初始查询参数对象

tableOptions Object <optional>

表格组件 MyTable 配置参数

columns Array <optional>

列配置数组,字段支持el-table-column组件参数

adapter function | Object <optional>

数据请求适配方法 函数必须返回对象 {fetch, add, update, remove, get, batch}

viewDialog Object <optional>

详情对话框配置参数, 设置null,表示自定义显示详情,不采用自带dialog

formDialog Object <optional>

新增、编辑弹窗配置参数,设置null 表示自定义,需要自己实现

formOptions Object <optional>

新增、编辑表单配置

属性参数

(inner) slots

Source:
Properties:
Name Type Description
filter string

定义筛选条件,定义表单项

title string

定义表格标题区域内容

toolbar string

定义工具区内容

handle-header string

作用域插槽,定义操作列的列头,参数:column 列配置参数

detail string

作用域插槽,定义详情显示内容,参数:row 行数据对象,loading 加载中

form string

作用域插槽,定义新增、编辑表单项,参数:row 行数据(新增为null),loading 加载中

插槽

Methods

(inner) openAddDialog()

Source:

打开新增弹窗

(inner) refresh()

Source:

重新加载表格数据,分页重置为第一页

(inner) reload()

Source:

重新加载表格数据,分页保持不变

Events

command

Source:

点击操作列按钮触发

Parameters:
Name Type Description
handle Object

按钮配置

row Object

行数据

index number

行索引

error

Source:

请求报错时触发

Parameters:
Name Type Description
type string

请求方法名,如 fetch/get/update/remove/batch

message *

错误信息

success

Source:

请求成功时触发

Parameters:
Name Type Description
type string

请求方法名,如 fetch/get/update/remove/batch

message *

响应数据