customHeader.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class="vent-custom-header">
  3. <div class="vent-home-header">
  4. <!-- <Decoration5 class="header-icon" :dur="2" :color="['#21437F', '#2CF7FE']" style="width:500px;height:40px;" /> -->
  5. <div class="header-text"><slot></slot></div>
  6. </div>
  7. <div class = "container-title" v-if="fieldNames">
  8. <a-select
  9. class="title-select"
  10. ref="select"
  11. v-model:value="currentTitleValue"
  12. @change="handleTitleChange"
  13. popupClassName="drop"
  14. :field-names="fieldNames"
  15. :options="options"
  16. :dropdownStyle="{ background : 'transparent', borderBottom: '1px solid #ececec66', backdropFilter: 'blur(50px)', color: '#fff !important'}"
  17. >
  18. <!-- <a-select-option value="2">15212工作面</a-select-option>
  19. <a-select-option value="1598491318007898113">采煤工作面</a-select-option>
  20. <a-select-option value="3">掘进工作面</a-select-option> -->
  21. </a-select>
  22. </div>
  23. </div>
  24. </template>
  25. <script lang="ts">
  26. import { defineComponent, computed } from 'vue'
  27. import { Decoration5 } from '@kjgl77/datav-vue3'
  28. export default defineComponent({
  29. name: 'customHeader',
  30. components: { Decoration5 },
  31. props: {
  32. optionValue: {
  33. type: String
  34. },
  35. fieldNames: {
  36. type: Object,
  37. default: () => {}
  38. },
  39. options: {
  40. type: Array,
  41. default: () => []
  42. }
  43. },
  44. emits: ['change'],
  45. setup(props, { emit }) {
  46. const currentTitleValue = computed(() => props.optionValue)
  47. // 标题选择
  48. function handleTitleChange(value) {
  49. emit('change', value)
  50. }
  51. return {
  52. currentTitleValue,
  53. handleTitleChange,
  54. }
  55. },
  56. })
  57. </script>
  58. <style lang="less">
  59. @import '/@/design/vent/modal.less';
  60. .@{ventSpace}-select-dropdown {
  61. color: #fff !important;
  62. .@{ventSpace}-select-item-option-selected,
  63. .@{ventSpace}-select-item-option-active {
  64. background-color: #ffffff33 !important;
  65. }
  66. .@{ventSpace}-select-item:hover {
  67. background-color: #ffffff33 !important;
  68. }
  69. }
  70. </style>
  71. <style lang="less" scoped>
  72. @ventSpace: zxm;
  73. .vent-custom-header{
  74. width: 100%;
  75. height: fit-content;
  76. .vent-home-header {
  77. width: 100%;
  78. position: fixed;
  79. top: 0;
  80. // background: url('/@/assets/images/vent/new-home/header-bg.png') no-repeat;
  81. // height: 100px;
  82. background: url('/@/assets/images/vent/vent-header1.png') no-repeat;
  83. height: 89px;
  84. background-size: contain;
  85. display: flex;
  86. justify-content: center;
  87. .header-icon{
  88. margin-top: 45px;
  89. }
  90. .header-text{
  91. position: fixed;
  92. top: 5px;
  93. color: #fff;
  94. font-size: 32px;
  95. font-family: 'ysbtFont';
  96. background-image: linear-gradient(#ffffff 50%, #60f4ff);
  97. -webkit-background-clip: text;
  98. color: transparent;
  99. }
  100. }
  101. .container-title {
  102. width: 398px;
  103. height: 34px;
  104. top: 60px;
  105. background: url('/@/assets/images/vent/new-home/container-title-bg.png') no-repeat;
  106. background-size: contain;
  107. padding: 0 0 0 180px;
  108. font-size: 20px;
  109. pointer-events: auto;
  110. position: relative;
  111. z-index: 9999;
  112. .title-select {
  113. width: 228px;
  114. position: absolute;
  115. top: 0;
  116. left: 160px;
  117. }
  118. }
  119. }
  120. .custom-drop{
  121. border-bottom: 1px solid #ececec66 !important;
  122. background: transparent !important;
  123. backdrop-filter: blur(50px) !important;
  124. }
  125. :deep(.zxm-select){
  126. width: 300px;
  127. .@{ventSpace}-select-selector{
  128. background: transparent !important;
  129. border: none !important;
  130. box-shadow: none !important;
  131. .zxm-select-selection-item{
  132. color: #fff !important;
  133. font-size: 20px;
  134. }
  135. }
  136. .@{ventSpace}-select-arrow{
  137. color: #fff !important;
  138. }
  139. }
  140. </style>