mirror of https://github.com/msgbyte/tailchat
feat: 增加webview组件封装,统一webview渲染方式
parent
11b68ea2f7
commit
fcc2684a34
@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
|
||||
interface WebviewProps {
|
||||
url: string;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网页渲染容器
|
||||
*/
|
||||
export const Webview: React.FC<WebviewProps> = React.memo((props) => {
|
||||
return (
|
||||
<iframe className={props.className} style={props.style} src={props.url} />
|
||||
);
|
||||
});
|
||||
Webview.displayName = 'Webview';
|
Loading…
Reference in New Issue