userView.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="tab dis f-c">
  3. <view class="header-title" :style="headerStyle">{{title}}</view>
  4. <view class="items dis f-c ">
  5. <view class="item dis a-c j-s">
  6. <text>姓名</text>
  7. <text>{{info.name}}</text>
  8. </view>
  9. <view class="item dis a-c j-s">
  10. <text>手机号</text>
  11. <text>{{info.mobile}}</text>
  12. </view>
  13. <view class="item dis a-c j-s">
  14. <text>证件号</text>
  15. <text>{{info.identifyNumber}}</text>
  16. </view>
  17. <view class="item dis a-start j-s">
  18. <text>地址</text>
  19. <text>{{info.addr}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. name: 'name', //插件名称
  27. props: {
  28. info: {
  29. type: Object,
  30. default: () => {
  31. return {};
  32. }
  33. },
  34. title: {
  35. type: String,
  36. default: '基本信息'
  37. },
  38. headerStyle: {
  39. type: Object,
  40. default: () => {
  41. return {};
  42. }
  43. },
  44. },
  45. watch: {
  46. info(newval) {
  47. this.info = newval;
  48. }
  49. },
  50. computed: {},
  51. data() {
  52. return {
  53. };
  54. },
  55. methods: {}
  56. };
  57. </script>
  58. <!--使用scss,只在本组件生效-->
  59. <style lang="scss" scoped>
  60. .tab {
  61. background-color: #fff;
  62. padding: 20rpx;
  63. box-sizing: border-box;
  64. border-radius: 0 0 10rpx 10rpx;
  65. .header-title {
  66. background: linear-gradient(180deg, #FFFCEA 0%, #FFFFFF 100%);
  67. border-radius: 20rpx 20rpx 0rpx 0rpx;
  68. font-size: 32rpx;
  69. color: #333;
  70. font-weight: bold;
  71. padding: 20rpx;
  72. box-sizing: border-box;
  73. }
  74. .items {
  75. padding: 0 20rpx;
  76. box-sizing: border-box;
  77. .item {
  78. margin-bottom: 30rpx;
  79. text:first-child {
  80. font-size: 30rpx;
  81. color: #666;
  82. }
  83. text:last-child {
  84. font-size: 30rpx;
  85. color: #333;
  86. font-weight: bold;
  87. width: 75%;
  88. text-align: right;
  89. }
  90. }
  91. }
  92. }
  93. </style>