zone 底座组件模块
核心组件表
Methods
(static) LoadingAlert()
LoadingAlert
使用
// 外部标准使用
import {LoadingAlert} from 'web';
组件核心点
description
计算
- 如果类型是String,则直接将description作为渲染文本基础元素来处理。
- 如果类型是Array,长度为1,则直接将第一个元素作为渲染文本来处理。
- 如果类型是Array,长度大于1,则使用
<ul/>
的列表方式渲染多行文本。
type
执行流程
- 优先选择props中的
$type
属性。 - 然后使用props中
$alert
中的type
属性。 - 如果都没传入则使用默认值
info
。
icon
计算流程
- 优先选择props中的
$icon
属性。 - 然后使用props中
$alert
中的icon
属性。 - 如果1和2都读取不了任何数据,则为无图标模式,否则为有图标模式。
props
参数名 | 属性 | 类型 | 含义 |
---|---|---|---|
$alert | Object | 对应 AntD 中的 Alert 相关配置。 | |
message | String | Alert 的 message 属性:主标题。 | |
description | Array / String | Alert 的 description 属性,有两种格式,如果是数组格式则会自动转换为列表格式。 | |
type | String | Alert 的 type 属性对应:info, success, warning, error。 | |
hideIcon | Boolean | Alert 的 showIcon 对应:是否显示图标,采用图标模式的警告信息。 | |
icon | String | Alert 的 icon 属性,可自定义图标。 | |
$type | String | 「编程模式」优先级更高的类型说明。 | |
$icon | String | 「编程模式」优先级更高的图标说明。 | |
$size | Integer | 「编程模式」优先级更高的图标大小。 |
state
(无)
示例
return (
<div>
<LoadingAlert $alert={attrAlert}/>
<ExForm {...form} $height={"300px"}
$renders={Op.renders}
$op={Op.actions}/>
</div>
);
(static) LoadingContent()
「组件」LoadingContent
import { LoadingContent } from 'web';
1. 生命周期
Hoc高阶周期 | Mount初始化 | Update更新 |
---|---|---|
Ok | x | x |
2. 属性说明
属性名 | 二级属性 | 源 | 类型 | 说明 |
---|---|---|---|---|
$height | props | Number/String | 当前加载遮罩的高度,默认高度为100%(自动填充满) | |
$tip | props | String | 当前组件呈现的文字信息,默认根据资源文件计算。 | |
$top | props | String | 高度单位,可设置成paddingTop的值,默认:窗口高度 x 1/4 。 |
3. 组件核心点
3.1. 资源文件
文件位置:cab/<LANGUAGE>/economy/web/LoadingContent.json
文件内容:
{
"loading": "数据加载中……"
}
3.2. 属性计算
传入的三个属性主要是为计算最外层<div/>
的style
属性,
(static) V4App() → {ReactNode}
「标准」Ux.V4App
- 组件,设置原生上下文
Returns:
- Type
- ReactNode
(static) V4InputGroup() → {ReactNode}
「标准」Ux.V4InputGroup
- 组件,替换原生的
<InputGroup/>
组件。
Returns:
- Type
- ReactNode