Skip to content

RIframe 内联框架元素

嵌入一点网页在当前的页面中。

基础使用

code
tsx
import { RIframe } from '@/components'

const Demo = () => {
  return <RIframe src="https://www.baidu.com" />
}

props

名称类型默认值说明
srcstring-网页地址,必填
iframeWrapperClassstringundefinediframe 外层容器的 class
framebordernumber0iframe 边框
widthstring | number100%iframe 宽度
heightstring | number100%iframe 高度
allowstringundefinediframe 特征策略
namestringundefinediframe 名称
titlestringundefinediframe 标题
onSuccess(el: HTMLIFrameElement, e: Event) => voidundefinediframe 加载成功回调
onError(e: Event) => voidundefinediframe 加载失败回调
customSpinPropsSpinProps{}自定义 NSpin props
lazybooleanfalse是否懒加载
iframeClassstringundefinediframe 的 class

Released under the MIT License.