index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="grid-shadow-wrap">
  3. <!-- <div class="resolutionguide tips-3840x2160" />
  4. <div class="resolutionguide tips-1920x1080" />
  5. <div class="resolutionguide tips-1440x900" />
  6. <div class="resolutionguide tips-1024x768" /> -->
  7. <div
  8. ref="container"
  9. class="grid-edit-container">
  10. <slot />
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'GridShadow',
  17. methods: {
  18. getContainerRef () {
  19. return this.$refs.container
  20. },
  21. },
  22. }
  23. </script>
  24. <style lang="less" scoped>
  25. .grid-shadow-wrap {
  26. position: relative;
  27. overflow: auto;
  28. }
  29. .grid-edit-container {
  30. position: relative;
  31. min-height: 2245px;
  32. min-width: 1366px;
  33. // background: url('../../assets/grid-shadow.png') repeat 0 0;
  34. }
  35. .resolutionguide {
  36. position: absolute;
  37. top: 0;
  38. left: 0;
  39. box-sizing: border-box;
  40. color: #000;
  41. border-color: #000;
  42. opacity: 0;
  43. border-width: 1px;
  44. border-right-style: dashed;
  45. border-bottom-style: dashed;
  46. pointer-events: none;
  47. font-size: 13px;
  48. line-height: normal;
  49. &::after {
  50. position: absolute;
  51. right: 8px;
  52. bottom: 5px;
  53. }
  54. &.tips-3840x2160 {
  55. width: 3840px;
  56. height: 2160px;
  57. &::after {
  58. content: "3840 x 2160";
  59. }
  60. }
  61. &.tips-1920x1080 {
  62. width: 1920px;
  63. height: 1080px;
  64. &::after {
  65. content: "1920 x 1080";
  66. }
  67. }
  68. &.tips-1440x900 {
  69. width: 1440px;
  70. height: 900px;
  71. &::after {
  72. content: "1440 x 900";
  73. }
  74. }
  75. &.tips-1024x768 {
  76. width: 1024px;
  77. height: 768px;
  78. &::after {
  79. content: "1024 x 768";
  80. }
  81. }
  82. }
  83. </style>