|
@@ -1,4 +1,4 @@
|
|
|
-import { Transition, defineComponent, onMounted, ref, reactive } from 'vue';
|
|
|
+import { Transition, defineComponent, onMounted, ref, reactive,onUnmounted } from 'vue';
|
|
|
import LayoutSilder from './layoutSilder';
|
|
|
import LayoutTop from './layoutTop';
|
|
|
import styles from './index.module.less';
|
|
@@ -327,7 +327,42 @@ export default defineComponent({
|
|
|
// initBoxRectInfo(classEl, classBoundaryInfo);
|
|
|
initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
// initBoundaryWrap(classEl, classBoundaryInfo);
|
|
|
+ window.addEventListener("resize", resetSize);
|
|
|
});
|
|
|
+
|
|
|
+ const resetSize = ()=>{
|
|
|
+ const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
|
|
|
+ subdEl.style.display = 'none'
|
|
|
+ // const boxBoundaryInfo = reactive({
|
|
|
+ // isBoundary: true,
|
|
|
+ // isBoundaryType: 'right' as any,
|
|
|
+ // mainWidth: '' as any,
|
|
|
+ // mainHeight: '' as any,
|
|
|
+ // subWidth: '' as any,
|
|
|
+ // subHeight: '' as any
|
|
|
+ // });
|
|
|
+
|
|
|
+
|
|
|
+ // boxBoundaryInfo.isBoundary = true;
|
|
|
+ // boxBoundaryInfo.isBoundaryType= 'right'
|
|
|
+
|
|
|
+ setTimeout(()=>{
|
|
|
+
|
|
|
+ subdEl.style.transition = ''
|
|
|
+ initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
+ initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
+ console.log('resize')
|
|
|
+ subdEl.style.display = 'block'
|
|
|
+ },100)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ onUnmounted(()=>{
|
|
|
+ window.removeEventListener("resize", resetSize);
|
|
|
+ })
|
|
|
const initBoundaryWrap = (target: any, wrapInfo: any) => {
|
|
|
target.addEventListener('mouseenter', () => {
|
|
|
if (wrapInfo.isBoundary) {
|