customHeader.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. .zxm-select-item{
  67. color: #fff;
  68. }
  69. .@{ventSpace}-select-item:hover {
  70. background-color: #ffffff33 !important;
  71. }
  72. }
  73. </style>
  74. <style lang="less" scoped>
  75. @ventSpace: zxm;
  76. .vent-custom-header{
  77. width: 100%;
  78. height: fit-content;
  79. .vent-home-header {
  80. width: 100%;
  81. position: fixed;
  82. top: 0;
  83. // background: url('/@/assets/images/vent/new-home/header-bg.png') no-repeat;
  84. // height: 100px;
  85. background: url('/@/assets/images/vent/vent-header1.png') no-repeat;
  86. height: 89px;
  87. background-size: contain;
  88. display: flex;
  89. justify-content: center;
  90. .header-icon{
  91. margin-top: 45px;
  92. }
  93. .header-text{
  94. position: fixed;
  95. top: 5px;
  96. color: #fff;
  97. font-size: 32px;
  98. font-family: 'ysbtFont';
  99. background-image: linear-gradient(#ffffff 50%, #60f4ff);
  100. -webkit-background-clip: text;
  101. color: transparent;
  102. }
  103. }
  104. .container-title {
  105. width: 398px;
  106. height: 34px;
  107. top: 60px;
  108. background: url('/@/assets/images/vent/new-home/container-title-bg.png') no-repeat;
  109. background-size: contain;
  110. padding: 0 0 0 180px;
  111. font-size: 20px;
  112. pointer-events: auto;
  113. position: relative;
  114. z-index: 9999;
  115. .title-select {
  116. width: 228px;
  117. position: absolute;
  118. top: 0;
  119. left: 160px;
  120. }
  121. }
  122. }
  123. .custom-drop{
  124. border-bottom: 1px solid #ececec66 !important;
  125. background: transparent !important;
  126. backdrop-filter: blur(50px) !important;
  127. }
  128. :deep(.zxm-select){
  129. width: 300px;
  130. .@{ventSpace}-select-selector{
  131. background: transparent !important;
  132. border: none !important;
  133. box-shadow: none !important;
  134. .zxm-select-selection-item{
  135. color: #fff !important;
  136. font-size: 20px;
  137. }
  138. }
  139. .@{ventSpace}-select-arrow{
  140. color: #fff !important;
  141. }
  142. }
  143. </style>