ZhangXianQiang
2024-02-28 b8a72fe64c7dce111517e18f1b9c3b73ab49fb36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<script setup lang="ts">
import BorderBox13 from "@/components/datav/border-box-13";
 
const props = withDefaults(
  defineProps<{
    // 标题
    title: number | string,
  }>(),
  {
    title: "",
  }
);
</script>
 
<template>
 
     <div class="item_title" v-if="title !== ''">
       <span class="title-inner"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
     </div>
    <div
      :class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
    >
 
    <!-- 内容插槽 -->
      <slot></slot></div>
 
</template>
 
<style scoped lang="scss">
$item-title-height: 38px;
//$item_title_content-height: calc(100% - 38px);
 
.item_title {
  background-image: url("@/assets/img/candantop.png") ;
  background-repeat: no-repeat;
  height: $item-title-height;
  line-height: $item-title-height;
  width: 100%;
  color: #31abe3;
  text-align: center;
  // background: linear-gradient(to right, transparent, #0f0756, transparent);
  position: relative;
  display: flex;
  align-items: center;
  //justify-content: center;
 
  .zuo,
  .you {
    width: 58px;
    height: 14px;
    background-image: url("@/assets/img/titles/zuo.png");
  }
 
  .you {
    transform: rotate(180deg);
  }
  .title-inner {
    margin-left: 15px;
    color: #fff;
    font-weight: 900;
    letter-spacing: 2px;
    font-style: italic;
    //background: linear-gradient(
    //  92deg,
    //  #0072ff 0%,
    //  #00eaff 48.8525390625%,
    //  #01aaff 100%
    //);
    //-webkit-background-clip: text;
    //-webkit-text-fill-color: transparent;
  }
}
 
:deep(.dv-border-box-content)  {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }
 
.item_title_content {
  //height: $item_title_content-height;
  margin: 20px 0;
 
}
 
.item_title_content_def {
  width: 100%;
  height: 100%;
}
</style>