diff --git a/src/views/Main/index.vue b/src/views/Main/index.vue index 7b6454d..96c389e 100644 --- a/src/views/Main/index.vue +++ b/src/views/Main/index.vue @@ -1,6 +1,6 @@ @@ -32,9 +32,37 @@ import SafetyOverviewCard from "./SafetyOverviewCard/index.vue"; import Map from "./Map/index.vue"; import RegionSelect from "../RegionSelect/index.vue"; +import { onBeforeUnmount, onMounted, ref } from "vue"; defineOptions({ name: "main", }); +const showLeftDrawer = ref(true); +const showRightDrawer = ref(true); +const showBottomPanel = ref(true); + +onMounted(() => { + window.$bus.$on("open-left-panel", () => { + showLeftDrawer.value = true; + }); + window.$bus.$on("close-left-panel", () => { + showLeftDrawer.value = false; + }); + window.$bus.$on("open-right-panel", () => { + showRightDrawer.value = true; + }); + window.$bus.$on("close-right-panel", () => { + showRightDrawer.value = false; + }); + window.$bus.$on("open-bottom-panel", () => { + showBottomPanel.value = true; + }); + window.$bus.$on("close-bottom-panel", () => { + showBottomPanel.value = false; + }); +}); +onBeforeUnmount(() => { + window.$bus.$all_off(); +}); diff --git a/src/views/RegionSelect/index.vue b/src/views/RegionSelect/index.vue index af8bba2..5ae329a 100644 --- a/src/views/RegionSelect/index.vue +++ b/src/views/RegionSelect/index.vue @@ -38,6 +38,19 @@ defineOptions({ /* 文字&图标/Font Wh1 */ color: rgba(255, 255, 255, 0.9); } - background: rgba(255, 255, 255, 0.8); + + :deep(.sy-region-select) { + width: 194px; + background: rgba(255, 255, 255, 0.8); + color: rgba(0, 0, 0, 0.9); + .sy-input--small .sy-input__wrapper { + .sy-select__caret { + color: rgba(0, 0, 0, 0.9); + } + } + ::-webkit-input-placeholder { + color: rgba(0, 0, 0, 0.9); + } + } }