qt-public-ui
Version:
新设计规范下业务组件库
31 lines (20 loc) • 933 B
Markdown
## Frame
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| src | iframe的地址 | string | - |
| style | iframe 的样式 | CSSProperties | - |
| reportCenterURL | 导出的地址 | string | - |
| offset | height 不存在时生效,通过计算获得的frame的高度将减去offset(计算方式:`document.body.offsetHeight - 60 - offset`) | number | - |
| height | 直接确定iframe的高度,不经过计算(0即不生效) | number | 0 |
## Frame.useFrame
获取一些框架参数的hook
`() => returnObj`
#### returnObj
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| inFrame | 是否在iframe中 | boolean | - |
| frameType | url参数中的xframe字段,由useSearchParams获取 | string | - |
| context | 上下文 | object | - |
## Frame.Container
作用:
如果存在url参数中的xframe,则为body添加一个classname: `umui-frame-${frameType}`