PageConfig.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <div class="page-config-content">
  3. <main class="main__config">
  4. <div class="card--default" @click="toSceneLayout(ViewType.companyHomepage_PC)">
  5. <section class="card__left">
  6. <img :src="PCIcon" />
  7. </section>
  8. <section class="card__right">
  9. <span class="span__card--title"> PC端{{ titleDefault }} </span>
  10. <span class="span__card--describe"> {{ describeDefault }} PC端生效 </span>
  11. </section>
  12. </div>
  13. <div class="card--default" @click="toSceneLayout(ViewType.companyHomepage_phone)">
  14. <section class="card__left">
  15. <img :src="PhoneIcon" />
  16. </section>
  17. <section class="card__right">
  18. <span class="span__card--title"> 手机端{{ titleDefault }} </span>
  19. <span class="span__card--describe"> {{ describeDefault }} 手机端生效 </span>
  20. </section>
  21. </div>
  22. </main>
  23. </div>
  24. </template>
  25. <script lang="ts" setup>
  26. import PCIcon from '@/assets/images/page-config/config-pc.png';
  27. import PhoneIcon from '@/assets/images/page-config/config-phone.png';
  28. import router from '@/router';
  29. import { ViewType } from '@/types/page-config/type';
  30. const titleDefault = '主页布局';
  31. const describeDefault = '编辑的主页布局、 \n位置标签等在\n';
  32. const toSceneLayout = (type: ViewType.companyHomepage_PC | ViewType.companyHomepage_phone) => {
  33. router.push(`/layout/scene-list?viewType=${type}`);
  34. };
  35. </script>
  36. <style lang="scss" scoped>
  37. .page-config-content {
  38. width: 100%;
  39. height: calc(100vh - 64px - 12px);
  40. padding: 47px 84px 0 84px;
  41. background: #ffffff;
  42. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.12);
  43. border-radius: 6px;
  44. }
  45. .main__config {
  46. display: flex;
  47. justify-content: space-between;
  48. width: 100%;
  49. height: auto;
  50. .card--default {
  51. display: flex;
  52. width: 490px;
  53. height: 300px;
  54. background-repeat: no-repeat;
  55. background-size: cover;
  56. background-image: url('@/assets/images/page-config/card-bg-default.png');
  57. transition: background-image 0.3s ease-in-out;
  58. cursor: pointer;
  59. &:hover {
  60. background-image: url('@/assets/images/page-config/card-bg-hover.png');
  61. }
  62. }
  63. .card__left {
  64. display: flex;
  65. justify-content: center;
  66. align-items: center;
  67. flex: 1;
  68. height: inherit;
  69. }
  70. .card__right {
  71. display: flex;
  72. justify-content: center;
  73. flex-direction: column;
  74. gap: 20px;
  75. flex: 1;
  76. .span__card--title {
  77. font-weight: 600;
  78. font-size: 28px;
  79. color: #1777ff;
  80. }
  81. .span__card--describe {
  82. font-weight: 400;
  83. font-size: 24px;
  84. line-height: 33px;
  85. color: #909399;
  86. white-space: pre-line;
  87. }
  88. }
  89. }
  90. </style>