InfoItem.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view @click="clickItem" class="info_item">
  3. <view class="left_label">
  4. <text>{{ title }}</text>
  5. </view>
  6. <view class="right_value">
  7. <slot name="value">
  8. <text class="content">{{ content }}</text>
  9. </slot>
  10. <u-icon v-if="showArrow" name="arrow-right" size="16" color="#999"></u-icon>
  11. </view>
  12. <u-loading-icon v-show="loading" class="loading_icon"></u-loading-icon>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. name: '',
  18. props: {
  19. title: String,
  20. content: String,
  21. showArrow: {
  22. type: Boolean,
  23. default: true
  24. },
  25. loading: {
  26. type: Boolean,
  27. default: false
  28. }
  29. },
  30. data() {
  31. return {};
  32. },
  33. methods: {
  34. clickItem() {
  35. this.$emit('click');
  36. }
  37. }
  38. };
  39. </script>
  40. <style lang="scss" scoped>
  41. .info_item {
  42. @include btwBox();
  43. height: 82rpx;
  44. padding: 0 44rpx;
  45. color: $uni-text-color;
  46. // border-bottom: 1px solid rgba(153,153,153,0.3);
  47. position: relative;
  48. .right_value {
  49. @include vCenterBox();
  50. .content {
  51. font-size: 28rpx;
  52. color: #999;
  53. }
  54. .u-icon {
  55. margin-left: 12rpx;
  56. }
  57. }
  58. .loading_icon {
  59. position: absolute;
  60. left: 50%;
  61. top: 50%;
  62. transform: translate(-50%, -50%);
  63. }
  64. }
  65. </style>