index.vue 633 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <div class="bullet_box" :style="{width:windowWidth,height:windowHeight}">
  3. </div>
  4. </template>
  5. <script>
  6. export default {
  7. // 接收传过来的宽高
  8. props: {
  9. windowWidth: {
  10. type: String,
  11. default: "",
  12. },
  13. windowHeight: {
  14. type: String,
  15. default: "",
  16. },
  17. },
  18. data() {
  19. return {};
  20. },
  21. mounted() {},
  22. methods: {},
  23. };
  24. </script>
  25. <style lang="scss" scoped>
  26. .bullet_box {
  27. position: absolute;
  28. top: 10px;
  29. left: 10px;
  30. box-shadow: 1px 1px 3px 2px #299bff !important;
  31. background-color: #fff;
  32. border-radius: 5px;
  33. padding: 2rem;
  34. padding-top: 0;
  35. }
  36. </style>