positionAd.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!-- 职位广告 -->
  2. <template>
  3. <v-app>
  4. <v-dialog
  5. v-model="dialog"
  6. max-width="900"
  7. :persistent="false"
  8. @update:modelValue="handleChange"
  9. >
  10. <div style="cursor: pointer; margin: 0 auto; position: relative;">
  11. <v-img src="https://minio.menduner.com/dev/ddaafc5a27a735332daabbddc2c6bfe8913a2de02692f7b94f92b9f2b9e56460.jpg" :width="adImgWidth" style="height: auto;border-radius: 4px;" @click="adClick"></v-img>
  12. <span style="color: #ddddddcc; font-size: 32px; position: absolute; right: 0px; top: 0px;" class="mdi mdi-close-circle-outline cursor-pointer px-3" @click="dialog = false"></span>
  13. </div>
  14. </v-dialog>
  15. </v-app>
  16. </template>
  17. <script setup>
  18. defineOptions({name: 'dialogExtend-positionAd'})
  19. import { onMounted, ref } from 'vue'
  20. const props = defineProps({
  21. cancel: Function
  22. })
  23. const adImgWidth = ref(document?.documentElement?.clientWidth ?
  24. Math.floor(document.documentElement.clientWidth/2.2) > 500 ?
  25. Math.floor(document.documentElement.clientWidth/2.2) : 500
  26. : 900
  27. )
  28. const dialog = ref(false)
  29. onMounted(() => {
  30. dialog.value = true
  31. })
  32. const adClick = () => {
  33. dialog.value = false
  34. window.location.href = '/recruit/enterprise/position/add'
  35. props.cancel()
  36. }
  37. const handleChange = (val) => {
  38. props.cancel()
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. </style>