<template> <div class="content1" :style="{marginTop:`${statusBarHeight}px`}"> <slot name="left"></slot> <div class="wrap2">{{title}}</div> <div class="wrap3"></div> </div> </template> <script> export default { name: "title-block", data(){ return{ statusBarHeight:uni.getSystemInfoSync().statusBarHeight+10 } }, props:{ title:String } } </script> <style scoped lang="scss"> .content1{ display: flex; justify-content: space-between; .wrap3{ width: 120rpx; } .wrap2{ color:#4E964D ; font-size: 32rpx; } } </style>