dividerIndex.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <el-col :span="24" class="divider">
  3. <div class="heng">
  4. <span></span>
  5. </div>
  6. <div class="info">
  7. <p class="title">{{ info.title }}</p>
  8. <p class="enTitle">{{ info.enTitle }}</p>
  9. </div>
  10. <div class="heng">
  11. <span></span>
  12. </div>
  13. </el-col>
  14. </template>
  15. <script setup lang="ts">
  16. defineOptions({ name: 'dividerIndex' })
  17. const info = defineModel('info', {
  18. type: Object,
  19. default: () => ({ title: '', enTitle: '' })
  20. })
  21. </script>
  22. <style scoped lang="scss">
  23. .divider {
  24. display: flex;
  25. align-items: center;
  26. justify-content: center;
  27. text-align: center;
  28. .heng {
  29. width: 43%;
  30. span {
  31. display: inline-block;
  32. width: 100%;
  33. height: 2px;
  34. background-color: rgb(0, 108, 200);
  35. }
  36. }
  37. .info {
  38. flex-grow: 1;
  39. margin: 0 10px;
  40. p {
  41. white-space: nowrap;
  42. }
  43. .title {
  44. color: rgb(25, 25, 26);
  45. // font-family: '黑体';
  46. font-size: 32px;
  47. font-weight: 500;
  48. line-height: 46px;
  49. letter-spacing: 2px;
  50. }
  51. .enTitle {
  52. color: rgb(73, 108, 138);
  53. font-family: 'OPPO Sans';
  54. font-size: 20px;
  55. font-weight: 400;
  56. line-height: 26px;
  57. letter-spacing: 2px;
  58. text-transform: uppercase;
  59. }
  60. }
  61. }
  62. </style>