|
|
@@ -3,7 +3,7 @@
|
|
|
<div class="vent-home-header">
|
|
|
<div class="header-text"><slot></slot></div>
|
|
|
</div>
|
|
|
- <div class="container-title" v-if="fieldNames">
|
|
|
+ <div class="container-title" :class="[Type === 'home' ? 'title-home' : Type === 'detail' ? 'title-detail' : '']">
|
|
|
<a-select
|
|
|
class="title-select"
|
|
|
ref="select"
|
|
|
@@ -22,135 +22,143 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
- import { defineComponent, computed } from 'vue';
|
|
|
- import { Decoration5 } from '@kjgl77/datav-vue3';
|
|
|
- export default defineComponent({
|
|
|
- name: 'CustomHeader',
|
|
|
- components: { Decoration5 },
|
|
|
- props: {
|
|
|
- optionValue: {
|
|
|
- type: String,
|
|
|
- },
|
|
|
- fieldNames: {
|
|
|
- type: Object,
|
|
|
- default: () => {},
|
|
|
- },
|
|
|
- options: {
|
|
|
- type: Array,
|
|
|
- default: () => [],
|
|
|
- },
|
|
|
+import { defineComponent, computed } from 'vue';
|
|
|
+import { Decoration5 } from '@kjgl77/datav-vue3';
|
|
|
+export default defineComponent({
|
|
|
+ name: 'CustomHeader',
|
|
|
+ components: { Decoration5 },
|
|
|
+ props: {
|
|
|
+ optionValue: {
|
|
|
+ type: String,
|
|
|
},
|
|
|
- emits: ['change'],
|
|
|
- setup(props, { emit }) {
|
|
|
- const currentTitleValue = computed(() => props.optionValue);
|
|
|
- // 标题选择
|
|
|
- function handleTitleChange(value) {
|
|
|
- emit('change', value);
|
|
|
- }
|
|
|
- return {
|
|
|
- currentTitleValue,
|
|
|
- handleTitleChange,
|
|
|
- };
|
|
|
+ fieldNames: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
},
|
|
|
- });
|
|
|
+ options: {
|
|
|
+ type: Array,
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
+ Type: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ emits: ['change'],
|
|
|
+ setup(props, { emit }) {
|
|
|
+ const currentTitleValue = computed(() => props.optionValue);
|
|
|
+ // 标题选择
|
|
|
+ function handleTitleChange(value) {
|
|
|
+ emit('change', value);
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ currentTitleValue,
|
|
|
+ handleTitleChange,
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
</script>
|
|
|
<style lang="less">
|
|
|
- @import '/@/design/vent/modal.less';
|
|
|
+@import '/@/design/vent/modal.less';
|
|
|
|
|
|
- .@{ventSpace}-select-dropdown.drop {
|
|
|
- background-color: transparent !important;
|
|
|
+.@{ventSpace}-select-dropdown.drop {
|
|
|
+ background-color: transparent !important;
|
|
|
|
|
|
- .@{ventSpace}-select-item-option-selected,
|
|
|
- .@{ventSpace}-select-item-option-active {
|
|
|
+ .@{ventSpace}-select-item-option-selected,
|
|
|
+ .@{ventSpace}-select-item-option-active {
|
|
|
+ background-color: #ffffff33 !important;
|
|
|
+ }
|
|
|
+ .@{ventSpace}-select-item {
|
|
|
+ color: inherit;
|
|
|
+ &:hover {
|
|
|
background-color: #ffffff33 !important;
|
|
|
}
|
|
|
- .@{ventSpace}-select-item {
|
|
|
+ }
|
|
|
+ .@{ventSpace}-select-tree {
|
|
|
+ .@{ventSpace}-select-tree-treenode {
|
|
|
color: inherit;
|
|
|
- &:hover {
|
|
|
- background-color: #ffffff33 !important;
|
|
|
- }
|
|
|
}
|
|
|
- .@{ventSpace}-select-tree {
|
|
|
- .@{ventSpace}-select-tree-treenode {
|
|
|
- color: inherit;
|
|
|
- }
|
|
|
- .@{ventSpace}-select-tree-switcher-icon {
|
|
|
- color: inherit;
|
|
|
- }
|
|
|
+ .@{ventSpace}-select-tree-switcher-icon {
|
|
|
+ color: inherit;
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="less" scoped>
|
|
|
- @import '/@/design/theme.less';
|
|
|
- @ventSpace: zxm;
|
|
|
+@import '/@/design/theme.less';
|
|
|
+@ventSpace: zxm;
|
|
|
|
|
|
- .vent-custom-header {
|
|
|
- --image-vent-header1: url('/@/assets/images/vent/vent-header1.png');
|
|
|
- --image-select-bg: url('/@/assets/images/vent/home/select-bg.png');
|
|
|
+.vent-custom-header {
|
|
|
+ --image-vent-header1: url('/@/assets/images/vent/vent-header1.png');
|
|
|
+ --image-select-bg: url('/@/assets/images/vent/home/select-bg.png');
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ z-index: 9999;
|
|
|
+ pointer-events: none;
|
|
|
+ height: 60px;
|
|
|
+ .vent-home-header {
|
|
|
width: 100%;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ background: var(--image-vent-header1) no-repeat;
|
|
|
+ height: 89px;
|
|
|
+ background-size: contain;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .header-icon {
|
|
|
+ margin-top: 45px;
|
|
|
+ }
|
|
|
+ .header-text {
|
|
|
+ position: fixed;
|
|
|
+ top: 5px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 32px;
|
|
|
+ font-family: 'ysbtFont';
|
|
|
+ background-image: linear-gradient(#ffffff 50%, @vent-base-light-bg);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .container-title {
|
|
|
+ width: 380px;
|
|
|
+ height: 34px;
|
|
|
+ left: 20px;
|
|
|
+ // background: url('/@/assets/images/vent/new-home/container-title-bg.png') no-repeat;
|
|
|
+ background: var(--image-select-bg) no-repeat;
|
|
|
+ background-size: contain;
|
|
|
+ padding: 0 0 0 20px;
|
|
|
+ // padding: 0 0 0 180px;
|
|
|
+ font-size: 20px;
|
|
|
+ pointer-events: auto;
|
|
|
position: relative;
|
|
|
z-index: 9999;
|
|
|
- pointer-events: none;
|
|
|
- height: 60px;
|
|
|
- .vent-home-header {
|
|
|
- width: 100%;
|
|
|
- position: fixed;
|
|
|
- top: 0;
|
|
|
- background: var(--image-vent-header1) no-repeat;
|
|
|
- height: 89px;
|
|
|
- background-size: contain;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- .header-icon {
|
|
|
- margin-top: 45px;
|
|
|
- }
|
|
|
- .header-text {
|
|
|
- position: fixed;
|
|
|
- top: 5px;
|
|
|
- color: #fff;
|
|
|
- font-size: 32px;
|
|
|
- font-family: 'ysbtFont';
|
|
|
- background-image: linear-gradient(#ffffff 50%, @vent-base-light-bg);
|
|
|
- -webkit-background-clip: text;
|
|
|
- color: transparent;
|
|
|
- }
|
|
|
+ .title-home {
|
|
|
+ top: -40px !important;
|
|
|
}
|
|
|
- .container-title {
|
|
|
- width: 380px;
|
|
|
- height: 34px;
|
|
|
- top: 0px;
|
|
|
- left: 20px;
|
|
|
- // background: url('/@/assets/images/vent/new-home/container-title-bg.png') no-repeat;
|
|
|
- background: var(--image-select-bg) no-repeat;
|
|
|
- background-size: contain;
|
|
|
- padding: 0 0 0 20px;
|
|
|
- // padding: 0 0 0 180px;
|
|
|
- font-size: 20px;
|
|
|
- pointer-events: auto;
|
|
|
- position: relative;
|
|
|
- z-index: 9999;
|
|
|
- .title-select {
|
|
|
- width: 340px;
|
|
|
- position: absolute;
|
|
|
+ .title-detail {
|
|
|
+ top: 20px !important;
|
|
|
+ }
|
|
|
+ .title-select {
|
|
|
+ width: 340px;
|
|
|
+ position: absolute;
|
|
|
|
|
|
- top: 0;
|
|
|
- // left: 160px;
|
|
|
- }
|
|
|
+ top: 0;
|
|
|
+ // left: 160px;
|
|
|
}
|
|
|
}
|
|
|
- :deep(.zxm-select) {
|
|
|
- width: 300px;
|
|
|
- .@{ventSpace}-select-selector {
|
|
|
- background: transparent !important;
|
|
|
- border: none !important;
|
|
|
- box-shadow: none !important;
|
|
|
- .zxm-select-selection-item {
|
|
|
- color: #fff !important;
|
|
|
- font-size: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
- .@{ventSpace}-select-arrow {
|
|
|
+}
|
|
|
+:deep(.zxm-select) {
|
|
|
+ width: 300px;
|
|
|
+ .@{ventSpace}-select-selector {
|
|
|
+ background: transparent !important;
|
|
|
+ border: none !important;
|
|
|
+ box-shadow: none !important;
|
|
|
+ .zxm-select-selection-item {
|
|
|
color: #fff !important;
|
|
|
+ font-size: 20px;
|
|
|
}
|
|
|
}
|
|
|
+ .@{ventSpace}-select-arrow {
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|