tm-modal.vue 836 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!--
  2. * @Author: xieyunhui awesomedema@gmail.com
  3. * @Date: 2021-04-19 15:46:08
  4. * @LastEditors: xieyunhui awesomedema@gmail.com
  5. * @LastEditTime: 2025-09-09 16:50:09
  6. * @FilePath: /web_TracerMethodology/components/tm-modal/tm-modal.vue
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. -->
  9. <template>
  10. <view class="tm-modal" @click="$emit('click')">
  11. <slot></slot>
  12. </view>
  13. </template>
  14. <script>
  15. /**
  16. * modal弹出层
  17. * @click为点击元素的事件监听
  18. */
  19. export default {
  20. data() {
  21. return {
  22. };
  23. }
  24. }
  25. </script>
  26. <style lang="less">
  27. .tm-modal {
  28. position: fixed;
  29. top: 0;
  30. left: 0;
  31. width: 100%;
  32. height: 100%;
  33. z-index: 1000;
  34. background-color: rgba(18, 20, 26, 0.5);
  35. }
  36. </style>