起源:解析器
Methods
(static) parseAction(jsx) → {*}
「引擎」Ux.parseAction
Parameters:
Name | Type | Description |
---|---|---|
jsx |
Returns:
- Type
- *
(static) parseAjax(reference, parameters) → {Object}
「引擎」Ux.parseAjax
标准的ajax配置解析函数,针对Ajax的专用参数解析器,这种Ajax参数解析一般用于异步验证、交互过程中的异步请求处理
Parameters:
Name | Type | Description |
---|---|---|
reference |
Object | ReactComponent | React对应组件引用。 |
parameters |
Object | 传入的参数值相关信息。 |
Returns:
返回最终解析好的 Ajax 参数。
- Type
- Object
(static) parseColumn(columns, reference) → {*}
「引擎」Ux.parseColumn
Parameters:
Name | Type | Description |
---|---|---|
columns |
||
reference |
Returns:
- Type
- *
(static) parseDatum(reference, config, filter) → {*}
「引擎」Ux.parseDatum
Parameters:
Name | Type | Description |
---|---|---|
reference |
||
config |
||
filter |
Returns:
- Type
- *
(static) parseField(input) → {Object}
「引擎」Ux.parseField
解析查询条件表达式,最终生成合法的查询函数:
{
field: "字段名",
op: "操作符"
}
Parameters:
Name | Type | Description |
---|---|---|
input |
String | 输入查询字段表达式。 |
Returns:
- Type
- Object
(static) parseInput(input, props, state, option) → {Object}
「引擎」Ux.parseInput
针对Object中的字段和值对应的合并解析流程,解析完整对象,每个对象的值执行一次parseValue
解析。
Parameters:
Name | Type | Description |
---|---|---|
input |
Object | 传入的数据相关值信息。 |
props |
Props | 当前组件的属性信息。 |
state |
State | 当前组件的状态信息。 |
option |
Object | 解析过程动态选项(一般开发传入)。 |
Returns:
解析的最终结果值。
- Type
- Object
(static) parseItem(kvs, key)
「引擎」Ux.parseItem
Parameters:
Name | Type | Description |
---|---|---|
kvs |
||
key |
(static) parseOption(reference, config, fnFilter) → {*}
「引擎」Ux.parseOption
Parameters:
Name | Type | Description |
---|---|---|
reference |
||
config |
||
fnFilter |
Returns:
- Type
- *
(static) parseParameter(parameter, reference)
「引擎」Ux.parseParameter
Parameters:
Name | Type | Description |
---|---|---|
parameter |
||
reference |
(static) parsePosition(positionExpr, reference) → {*|string}
「引擎」Ux.parsePosition
Parameters:
Name | Type | Description |
---|---|---|
positionExpr |
||
reference |
Returns:
- Type
- * | string
(static) parseQuery(reference, $query) → {Object}
「引擎」Ux.parseQuery
针对Query的专用参数解析器。
Parameters:
Name | Type | Description |
---|---|---|
reference |
Object | ReactComponent | React对应组件引用。 |
$query |
Object | 查询参数数据结构。 |
Returns:
返回解析好的查询参数。
- Type
- Object
(static) parseSource(expr) → {*}
「引擎」Ux.parseSource
Parameters:
Name | Type | Description |
---|---|---|
expr |
Returns:
- Type
- *
(static) parseValue(valueOrExpr, reference) → {any}
「引擎」Ux.parseValue
用于执行不同类型的值解析专用数据,基础语法如下:
<TYPE>:<EXPR>
其中:
- TYPE:是当前支持的解析器类型。
- EXPR:解析表达式。
1. 解析器
OPERATOR
类型时使用特殊的操作字段名,必须使用""
。
类型 | 说明 | 例子 |
---|---|---|
BOOL | 布尔表达式 | BOOL:true, BOOL:false |
OPERATOR | 连接符 | "OPERATOR:AND",字段名为"" |
FIX | 固定值 | FIX:test |
DELAY | 延迟渲染 | (无) |
ENUM | 枚举值 | ENUM:ab c |
FORM | 表单值 | FORM:username |
DATUM | 辅助数据 | DATUM:source= |
UNIQUE | 唯一数据 | DATUM的变种 |
PROP | 属性值 | PROP:app |
ROUTE | 路由值 | ROUTE:item |
STATE | 状态值 | STATE:query |
USER | 登录用户值 | USER:email |
值解析器在很多场景中都会使用,主要基于当前方法来解析值相关信息。
Parameters:
Name | Type | Description |
---|---|---|
valueOrExpr |
String | 值处理专用表达式。 |
reference |
Object | ReactComponent | React对应组件引用。 |
Returns:
解析过后的值信息。
- Type
- any