hagerH1.vue
1.15 KB
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
<!--
* @Date: 2024-09-29 10:07:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-01-03 13:53:35
* @FilePath: /hager/src/components/common/hagerH1.vue
* @Description: 文件描述
-->
<template>
<div class="hagerH1">
<p :class="['h1', is_xs ? 'xs' : '']">{{ title }}</p>
<p :class="['sub', , is_xs ? 'xs' : '']">{{ sub }}</p>
</div>
</template>
<script>
import mixin from 'common/mixin';
export default {
mixins: [mixin.init],
props: {
title: {
type: String,
default: ''
},
sub: {
type: String,
default: ''
},
width: {
type: Number,
default: 0
}
},
watch: {
width (val) {
this.screen_width = val;
}
},
data () {
return {
screen_width: 0,
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="less" scoped>
.hagerH1 {
.h1 {
color: @secondary-color;
font-size: 1.9rem;
font-weight: bold;
&.xs {
font-size: 1.5rem;
}
}
.sub {
color: @primary-color;
font-size: 1.7rem;
font-weight: bold;
&.xs {
font-size: 1rem;
}
}
}
</style>