<template>
  <img v-if="showState.show_hdsj||showState.show_sxdx" src="../../../assets/imgs/common/legend-cg.png" alt="" class="legend">
</template>

<script setup>
import { onMounted, reactive } from 'vue'
import bus from '@/utils/bus'

let showState = reactive({
  show_sxdx: false,
  show_hdsj: false,
})

onMounted(() => {
  bus.on('toggleUnderWaterLegend', (params) => {
    console.log('toggleUnderWaterLegend',params)
    showState[params.from] = params.state
  })
})

</script>

<style lang="scss" scoped>
.legend {
  width: 199px;
  height: 177px;
  position: absolute;
  left: 370px;
  bottom: 130px;
}
</style>