<template> <view class="nomore " :style="'font-size:'+fontSize+'px;background:'+bgColor"> ———— {{msg}} ———— </view> </template> <script> export default { props:{ fontSize:{ type:Number, default:13 }, msg:{ type:String, default:"我是有底线的" }, bgColor:{ type:String, default:"#f6f6f6" } }, } </script> <style scoped> .nomore{ height: 40rpx; line-height: 40rpx; color:#ccc !important; padding: 40rpx; text-align: center; /* background-color: #f6f6f6; */ } </style>