inviteEntryPopup.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <Popup
  3. v-model:show="show"
  4. round
  5. class="invite-entry-popup"
  6. teleport="body"
  7. :z-index="9999"
  8. :close-on-click-overlay="false"
  9. >
  10. <div class="invite-entry-popup__inner">
  11. <img class="invite-entry-popup__cover" src="@/assets/img/home/plant.png" alt="" />
  12. <div class="invite-entry-popup__text">
  13. <div class="invite-entry-popup__line">管理员邀请您</div>
  14. <div class="invite-entry-popup__line">
  15. 录入 <span class="highlight">地块种植信息</span>
  16. </div>
  17. </div>
  18. <div class="invite-entry-popup__btn" @click="handleConfirm">去录入</div>
  19. </div>
  20. </Popup>
  21. </template>
  22. <script setup>
  23. import { ref } from "vue";
  24. import { useRoute } from "vue-router";
  25. import { Popup } from "vant";
  26. const show = ref(false);
  27. const open = () => {
  28. show.value = true;
  29. };
  30. const close = () => {
  31. show.value = false;
  32. };
  33. const handleConfirm = () => {
  34. close();
  35. };
  36. defineExpose({ open, close });
  37. </script>
  38. <style lang="scss">
  39. .invite-entry-popup {
  40. width: 78%;
  41. max-width: 320px;
  42. overflow: hidden;
  43. background: #fff;
  44. .invite-entry-popup__inner {
  45. padding: 10px;
  46. text-align: center;
  47. }
  48. .invite-entry-popup__cover {
  49. width: 100%;
  50. height: 158px;
  51. object-fit: cover;
  52. border-radius: 12px;
  53. display: block;
  54. }
  55. .invite-entry-popup__text {
  56. margin-top: 12px;
  57. font-size: 24px;
  58. color: #111;
  59. line-height: 28px;
  60. }
  61. .invite-entry-popup__line {
  62. font-family: "PangMenZhengDao";
  63. .highlight {
  64. color: #2199f8;
  65. }
  66. }
  67. .invite-entry-popup__btn {
  68. margin-top: 12px;
  69. height: 40px;
  70. line-height: 40px;
  71. width: 160px;
  72. margin: 12px auto 0;
  73. text-align: center;
  74. border-radius: 22px;
  75. background: #2199f8;
  76. color: #fff;
  77. font-size: 16px;
  78. }
  79. }
  80. </style>