提交 | 用户 | 时间
|
820397
|
1 |
<script lang="ts" setup> |
H |
2 |
defineComponent({ |
|
3 |
name: 'CardTitle' |
|
4 |
}) |
|
5 |
|
|
6 |
defineProps({ |
|
7 |
title: { |
|
8 |
type: String, |
|
9 |
required: true |
|
10 |
} |
|
11 |
}) |
|
12 |
</script> |
|
13 |
|
|
14 |
<template> |
|
15 |
<span class="card-title">{{ title }}</span> |
|
16 |
</template> |
|
17 |
|
|
18 |
<style scoped lang="scss"> |
|
19 |
.card-title { |
|
20 |
font-size: 14px; |
|
21 |
font-weight: 600; |
|
22 |
|
|
23 |
&::before { |
|
24 |
position: relative; |
|
25 |
top: 8px; |
|
26 |
left: -5px; |
|
27 |
display: inline-block; |
|
28 |
width: 3px; |
|
29 |
height: 14px; |
|
30 |
//background-color: #105cfb; |
|
31 |
background: var(--el-color-primary); |
|
32 |
border-radius: 5px; |
|
33 |
content: ''; |
|
34 |
transform: translateY(-50%); |
|
35 |
} |
|
36 |
} |
|
37 |
</style> |