<template> <div id="ZHSD"> <div :class="['LeftBox', 'animate__animated', showPanel ? 'animate__fadeOutLeft' : 'animate__fadeInLeft']"> <LeftBox></LeftBox> </div> <div :class="['RightBox', 'animate__animated', showPanel ? 'animate__fadeOutRight' : 'animate__fadeInRight']"> <RightBox></RightBox> </div> </div> </template> <script setup name="ZHSD"> import { ref, reactive, toRefs, onMounted } from 'vue'; import LeftBox from '@/views/oneMap/smartTunnel/LeftBox.vue'; import RightBox from '@/views/oneMap/smartTunnel/RightBox.vue'; const AllData = reactive({}); const showPanel = ref(true); //面板展开收起 // 面板内容展开收起控制 const props = defineProps({ showPanel: { type: Boolean, }, }); watch( () => props.showPanel, () => { showPanel.value = props.showPanel; }, { immediate: true } ); onMounted(() => {}); </script> <style lang="scss" scoped> #ZHSD { .LeftBox { width: 450px; height: calc(100% - 98px); position: absolute; left: 10px; top: 70px; background: linear-gradient(0deg, rgba(4, 34, 84, 0.8) 0%, rgba(4, 34, 84, 0.8) 100%); border-radius: 6px; border: 1px solid #4aa4ff; box-shadow: inset 0 0 5px 5px #4aa4ff8a; } .RightBox { width: 450px; height: calc(100% - 98px); position: absolute; right: 10px; top: 70px; background: linear-gradient(0deg, rgba(4, 34, 84, 0.8) 0%, rgba(4, 34, 84, 0.8) 100%); border-radius: 6px; border: 1px solid #4aa4ff; box-shadow: inset 0 0 5px 5px #4aa4ff8a; } } </style>