起源:属性适配器
Methods
(static) applyArray(literal) → {Array}
「标准」Ux.applyArray
直接解析字符串生成数组。
- 如果输入是数组,则不执行解析。
- 如果输入是字符串,则执行解析。
使用代码如:
const str = "item1,item2,item3";
const strArr = Ux.applyArray(str);
// strArr的值如:["item1","item2","item3"];
Parameters:
Name | Type | Description |
---|---|---|
literal |
String | 字面量专用数据。 |
Returns:
返回解析后的数组。
- Type
- Array
(static) applyColumn(item) → {Object}
「引擎」Ux.applyColumn
- 如果
key
存在,则直接删除,防止 dataIndex 位移。 - 如果存在
sorter
属性,则执行布尔转换。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 传入列配置。 |
Returns:
返回处理过的对象。
- Type
- Object
(static) applyConnect(item) → {Object}
「引擎」Ux.applyConnect
执行button 上的按钮函数,主要用于连接点击onClick
事件,一个按钮点击另外一个id
的按钮,触发目标按钮的onClick
。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
Returns:
- Type
- Object
(static) applyInput(item, config, kvs) → {Object}
「引擎」Ux.applyItem
解析表单 item 专用的方法信息,简化版处理:
{
"metadata": "...",
"optionJsx": "...",
"optionConfig": "...",
"optionItem": "..."
}
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
config |
Array | 配置数据信息。 |
kvs |
Array |
|
Returns:
返回处理后的配置属性。
- Type
- Object
(static) applyKey(item) → {Object}
「标准」Ux.applyKey
如果 item 中没有 key 存在,则赋值 uuid 的值。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
Returns:
- Type
- Object
(static) applyKv(item, config, kvs) → {Object}
「标准」Ux.applyKv
解析Kv数组,基础解析完成过后,如果出现$KV$
,那么解析后续表达式:k1=v1,k2=v2
,然后将解析结果压入到item中。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
config |
Array | 配置数据信息。 |
kvs |
Array |
|
Returns:
返回处理后的配置属性。
- Type
- Object
(static) applyLoading(item, props) → {Object}
「标准」Ux.applyLoading
防重复提交专用的状态注入
- 从 props 中读取
$submitting
状态数据,该数据为DataObject
类型。 - 从 DataObject中提取
loading
的布尔值,true表示正在执行 redux加载,false表示没执行。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
props |
Props | React的属性信息。 |
Returns:
返回处理后的属性信息。
- Type
- Object
(static) applyRender(renders, code) → {*|Object}
「标准」Ux.applyRender
Parameters:
Name | Type | Description |
---|---|---|
renders |
||
code |
Returns:
- Type
- * | Object
(static) applyRow(row, addition, config) → {*}
「标准」Ux.applyRow
Parameters:
Name | Type | Description |
---|---|---|
row |
||
addition |
||
config |
Returns:
- Type
- *
(static) applyRules(rules) → {Array}
「标准」Ux.applyRules
解析验证规则:optionConfig.rules
专用方法。
Parameters:
Name | Type | Description |
---|---|---|
rules |
Array | 验证规则数组。 |
Returns:
返回最终的数组信息。
- Type
- Array
(static) applyStyle(item) → {Object}
「标准」Ux.applyStyle
如果存在 style
属性,则执行 style
属性的解析,生成 Object。
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
Returns:
返回处理后的属性信息。
- Type
- Object
(static) applyValue(item) → {Object}
「引擎」Ux.applyValue
如果 item 中没有 value 而只包含了 key,则执行赋值,拷贝 key 给 value 属性:
const item = {
key: "itemKey"
};
// item.value = item.key
const processed = Ux.applyValue(item);
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 需要赋值的 item 对象。 |
Returns:
- Type
- Object
(static) applyView(config, field) → {*}
「标准」Ux.applyView
Parameters:
Name | Type | Description |
---|---|---|
config |
||
field |
Returns:
- Type
- *