Commit bf354f84 authored by mxm-web-develop's avatar mxm-web-develop

321

parent 7e0799c3
...@@ -8,7 +8,6 @@ export interface HoverBoxType extends IProps { ...@@ -8,7 +8,6 @@ export interface HoverBoxType extends IProps {
export default function HoverBox (props: HoverBoxType) { export default function HoverBox (props: HoverBoxType) {
const item = useRef(null) const item = useRef(null)
const {children, className} = props; const {children, className} = props;
const moveIn = _throttle((e:any)=>{ const moveIn = _throttle((e:any)=>{
e.stopPropagation(); e.stopPropagation();
...@@ -22,7 +21,6 @@ export default function HoverBox (props: HoverBoxType) { ...@@ -22,7 +21,6 @@ export default function HoverBox (props: HoverBoxType) {
} }
},550) },550)
const moveOut = _throttle((e:any)=>{ const moveOut = _throttle((e:any)=>{
e.stopPropagation(); e.stopPropagation();
const target = item.current! as HTMLElement const target = item.current! as HTMLElement
const coverLayer = target.nodeName === 'LI'?target.children[0]:target const coverLayer = target.nodeName === 'LI'?target.children[0]:target
......
...@@ -28,23 +28,7 @@ export const DocViewer = (props:DocViewerType)=>{ ...@@ -28,23 +28,7 @@ export const DocViewer = (props:DocViewerType)=>{
const target = document.querySelector('#iframe') as HTMLIFrameElement const target = document.querySelector('#iframe') as HTMLIFrameElement
if(target){ if(target){
setShow(true) setShow(true)
// window.addEventListener('message',(e)=>{
// console.log(e);
// },false)
if(target.contentWindow&&target.contentWindow.top&&target.contentWindow.top.innerHeight){
const ob = of(target.contentWindow.top.innerHeight)
ob.subscribe((v)=>{
setHeight(v+200)
})
}
} }
} }
return( return(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment