index.vue
547 字节
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
<template>
<view class="Title">
{{ title }}
</view>
</template>
<script>
export default {
name: 'Title',
props: {
title: {
type: [String],
default: '标题'
}
},
data() {
return {
}
}
}
</script>
<style lang="scss" scoped>
.Title{
color: #2D81FF;
font-size: 28rpx;
position: relative;
padding: 15rpx 20rpx;
&::before{
content: '';
position: absolute;
height: 26rpx;
width: 5rpx;
background-color: #2D81FF;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
</style>