customHeader.vue 3.8 KB

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