yuan
2 天以前 eca77cbce809165ea09fed36b12152c3acaa3db0
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
<template>
  <div
    class="panel-header"
    :class="{ clickable: !!to }"
    @click="handleClick"
  >
    <span class="panel-title">{{ title }}</span>
  </div>
</template>
 
<script setup>
import { useRouter } from 'vue-router'
 
const props = defineProps({
  title: {
    type: String,
    required: true,
    default: ''
  },
  to: {
    type: String,
    default: ''
  }
})
 
const router = useRouter()
 
const handleClick = () => {
  if (props.to) {
    router.push(props.to)
  }
}
</script>
 
<style scoped>
.panel-header {
  background-image: url("@/assets/BI/kehuhetongback@2x.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
 
.panel-title {
  width: 100%;
  font-weight: 500;
  font-size: 16px;
  color: #D9ECFF;
  padding-left: 46px;
  line-height: 36px;
}
 
.panel-header.clickable {
  cursor: pointer;
}
 
.panel-header.clickable:hover .panel-title {
  color: #43e8fc;
}
</style>