You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
903 B
56 lines
903 B
|
2 years ago
|
<template>
|
||
|
|
<div class="tit-box" :style="width ? `${width}px` : '100%'">
|
||
|
|
<div v-if="title">{{ title }}</div>
|
||
|
|
<div v-else>
|
||
|
|
<slot name="title"></slot>
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<slot></slot>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
};
|
||
|
|
},
|
||
|
|
props: {
|
||
|
|
title: {
|
||
|
|
type: String,
|
||
|
|
default: ""
|
||
|
|
},
|
||
|
|
width: {
|
||
|
|
type: Number,
|
||
|
|
default: 0
|
||
|
|
}
|
||
|
|
},
|
||
|
|
created() {
|
||
|
|
|
||
|
|
},
|
||
|
|
methods: {}
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.tit-box {
|
||
|
|
position: absolute;
|
||
|
|
top: 0.14rem;
|
||
|
|
left: 0.6rem;
|
||
|
|
box-sizing: border-box;
|
||
|
|
// margin: 0.14rem 0 0 0.38rem;
|
||
|
|
width: calc(100% - 0.6rem - 0.22rem);
|
||
|
|
height: 0.34rem;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
|
||
|
|
&>div:nth-child(1) {
|
||
|
|
font-size: 0.18rem;
|
||
|
|
color: rgba($color: #fff, $alpha: 0.8);
|
||
|
|
font-family: Microsoft YaHei;
|
||
|
|
font-weight: 400;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|