快速开发专用模块
目前快速开发有两个核心方法,其操作不同于Ux
和Ex
,如果使用Ux和Ex,调用代码如下:
// 标准工具
import Ux from 'ux';
// 扩展工具(带业务)
import Ex from 'ex';
// 快速开发
import Ui from 'ui';
核心入口文档专用文件,用于定义新模块
Methods
(static) smartForm(configurationForm, mode) → {Component}
##「组件」Ui.smartList
构造List页专用快速开发接口,配置的数据结构详细说明
{
"ns": "调用 require 方法读取 Cab.json设置名空间关联",
"name": "当前页面或组件的名称,如果名称设置了才打印日志,否则直接关闭日志",
"Cab": {
"__COMMENT__": "Cab指定了表单关联的配置值",
"FormAdd": "默认值UI.Add,读取UI.Add.json配置文件,读取资源文件",
"FormEdit": "默认值UI.Edit, 读取UI.Edit.json配置文件,读取资源文件",
"FormFilter": "默认值UI.Filter,读取UI.Filter.json配置文件,读取资源文件",
},
"componentInit": "componentDidMount注入函数,(reference)",
"componentUp": "componentDidUpdate注入函数,(reference, previous)",
"componentYo": "render注入函数,(reference, inherit)",
"componentValue": "render注入函数,执行初始值重新计算"
"yoOp": "注入 $op 变量",
"yoPlugins": "注入 $plugins 变量",
"yoExecutor": "注入 $executor 变量",
"yoAcl": "用来构造 $edition 变量",
"yoRx": "捕捉所有 rx 前缀下的函数注入",
"renderAddOn": "额外的渲染"
}
Parameters:
Name | Type | Description |
---|---|---|
configurationForm |
Object | 完整配置程序 |
mode |
String | 表单模式,主要:ADD | EDIT |
Returns:
- Type
- Component
(static) smartList(configuration) → {Component}
##「组件」Ui.smartList
构造List页专用快速开发接口,配置的数据结构详细说明
{
"ns": "调用 require 方法读取 Cab.json设置名空间关联",
"name": "当前页面或组件的名称,如果名称设置了才打印日志,否则直接关闭日志",
"logger": "日志类型",
"Cab": {
"__COMMENT__": "Cab指定了表单关联的配置值",
"page": "默认值UI,读取UI.json配置数据,主要用来指定当前页面读取的默认资源文件配置"
},
"Options": {
"__COMMENT__": "关闭 options 专用配置,下边枚举了常用配置,直接关闭选项更改列表",
"rm":[
"form.add - 关闭添加表单(表单级关闭)",
"form.edit - 关闭编辑表单(表单级关闭)",
"form.filter - 关闭查询表单(高级搜索)",
"op.open.add - 关闭列表`添加`按钮",
"op.extra.export - 关闭列表`导出`按钮",
"op.extra.import - 关闭列表`导入`按钮",
"op.extra.column - 关闭列表`列更改`按钮",
"op.batch.delete - 关闭列表`批量删除`按钮",
"op.batch.edit - 关闭列表`批量更新`按钮",
"op.submit.add - 表单页`添加`按钮",
"op.submit.save - 表单页`保存`按钮",
"op.submit.delete - 表单页`删除`按钮",
"op.submit.reset - 表单页`重置`按钮"
]
},
"Form": {
"FormAdd": "form.add启用时生效,添加表单,内置调用 smartForm,如果 FormAdd 是组件优先",
"FormEdit": "form.edit启用时生效,编辑表单,内置调用 smartForm,如果 FormEdit 是组件优先",
"FormFilter": "form.filter启用时生效,查询表单,内置调用 smartForm,如果 FormFilter 是组件优先"
},
"componentInit": "componentDidMount注入函数,(reference)",
"componentUp": "componentDidUpdate注入函数,(reference, previous)",
"componentYo": "render注入函数,(reference, inherit)",
"yoOp": "注入 $op 变量",
"yoPlugins": "注入 $plugins 变量",
"yoExecutor": "注入 $executor 变量",
"yoRx": "捕捉所有 rx 前缀下的函数注入",
"renderAddOn": "额外的渲染"
}
Parameters:
Name | Type | Description |
---|---|---|
configuration |
Object | 完整配置程序 |
Returns:
- Type
- Component