<script setup>
import { ref, watch, nextTick } from "vue";
import { useRoute } from "vue-router";

const route = useRoute();
const imgBg = ref("");

watch(
  () => route.query.imgBg,
  (e) => {
    if (e) {
      nextTick(() => {
        imgBg.value = route.query.imgBg;
      });
    }
  },
  {
    immediate: true,
    deep: true,
  }
);
</script>

<template>
  <div class="container-disseminate">
    <img v-if="imgBg" :src="imgBg" alt="" />
  </div>
</template>

<style lang="scss" scoped>
.container-disseminate {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  img {
    margin-left: -50px;
    width: 820px;
    height: 100%;
  }
}
</style>
