z-cell.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="z-cell plr-30" :style="{background:bgcolor}">
  3. <view class="z-cell_item flex-n fac" :style="{'min-height':height}">
  4. <view v-if="icon" class="z-cell_icon mr-30 iconfont" :class="icon" :style="iconStyle"></view>
  5. <slot name="icon"></slot>
  6. <view class="z-cell_label flex-1 nowarp mr-60" v-if="label" :style="labelStyle">{{label}}</view>
  7. <view class="z-cell_content" v-if="content" :style="contentStyle" v-html="content"></view>
  8. <view style="text-align: right;">
  9. <slot></slot>
  10. </view>
  11. <view class="z-cell_right ml-20 iconfont iconjuxing11kaobei" v-if="arrow"></view>
  12. </view>
  13. <view class="line" v-if="!hideline" :class="icon?'ml-88':''"></view>
  14. </view>
  15. </template>
  16. <script>
  17. export default{
  18. name:"z-cell",
  19. props:{
  20. height:{
  21. type: String,
  22. default: '87rpx'
  23. },
  24. bgcolor: {
  25. type: String,
  26. default: 'white'
  27. },
  28. icon:String,
  29. label:String,
  30. content:String|Number,
  31. iconStyle:Object,
  32. labelStyle:Object,
  33. contentStyle:Object,
  34. arrow:{
  35. type: Boolean,
  36. default: false
  37. },
  38. hideline:{
  39. type: Boolean,
  40. default: false
  41. }
  42. }
  43. }
  44. </script>
  45. <style scoped lang="scss">
  46. .z-cell{
  47. .z-cell_icon{
  48. font-size: 58rpx;
  49. width: 58rpx;
  50. min-width: 58rpx;
  51. height: 58rpx;
  52. line-height: 58rpx;
  53. text-align: center;
  54. color: #8E9399;
  55. }
  56. .z-cell_label{
  57. font-size: 32rpx;
  58. color: #333333;
  59. }
  60. .z-cell_content{
  61. font-size: 28rpx;
  62. color: #555555;
  63. padding: 20rpx 0;
  64. }
  65. .z-cell_right{
  66. font-size: 20rpx;
  67. color: #8E9399;
  68. }
  69. }
  70. </style>