item-wrap.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!--
  2. * @Author: daidai
  3. * @Date: 2022-03-01 09:16:22
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2022-05-07 11:06:23
  6. * @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
  7. -->
  8. <template>
  9. <dv-border-box-13 class="lr_titles">
  10. <div class="item_title" v-if="title !== ''">
  11. <div class="zuo"></div>
  12. <span class="title-inner"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
  13. <div class="you"></div>
  14. </div>
  15. <div
  16. :class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
  17. >
  18. <slot></slot>
  19. </div>
  20. </dv-border-box-13>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {};
  26. },
  27. props: {
  28. title: {
  29. type: String,
  30. default: () => '',
  31. },
  32. },
  33. created() {},
  34. mounted() {},
  35. methods: {},
  36. };
  37. </script>
  38. <style lang='scss' scoped>
  39. $item-title-height: 38px;
  40. $item_title_content-height: calc(100% - 38px);
  41. .lr_titles {
  42. box-sizing: border-box;
  43. ::v-deep .border-box-content {
  44. box-sizing: border-box;
  45. padding: 6px 16px 0px;
  46. }
  47. .item_title {
  48. height: $item-title-height;
  49. line-height: $item-title-height;
  50. width: 100%;
  51. color: #31abe3;
  52. text-align: center;
  53. // background: linear-gradient(to right, transparent, #0f0756, transparent);
  54. position: relative;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. .zuo,
  59. .you {
  60. width: 58px;
  61. height: 14px;
  62. background-image: url("../../assets/images/titles/zuo.png");
  63. }
  64. .you {
  65. transform: rotate(180deg);
  66. }
  67. .title-inner {
  68. font-weight: 900;
  69. letter-spacing: 2px;
  70. background: linear-gradient(
  71. 92deg,
  72. #0072ff 0%,
  73. #00eaff 48.8525390625%,
  74. #01aaff 100%
  75. );
  76. -webkit-background-clip: text;
  77. -webkit-text-fill-color: transparent;
  78. }
  79. }
  80. .item_title_content {
  81. height: $item_title_content-height;
  82. }
  83. .item_title_content_def {
  84. width: 100%;
  85. height: 100%;
  86. }
  87. }
  88. </style>