app-account-style.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="app-account-style" :style="{width: 702/showCount + 'rpx'}">
  3. <app-jump-button form arrangement="column" :url="page">
  4. <template v-if="showCount >= 3">
  5. <view class="dir-top-nowrap cross-center" style="width: 100%;overflow: hidden">
  6. <view class="value box-grow-0 t-omit">{{value}}</view>
  7. <view class="box-grow-1 dir-left-nowrap cross-center">
  8. <view class="box-grow-0">
  9. <image class="icon" :src="icon"></image>
  10. </view>
  11. <view class="unit box-grow-1">
  12. <view class="t-omit">{{text}}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </template>
  17. <template v-else>
  18. <view class="dir-left-nowrap cross-center" :class="[showCount > 1?'':'data-col']">
  19. <view :class="[showCount > 1?'':'box-grow-0']">
  20. <image class="icon" :src="icon"></image>
  21. </view>
  22. <view class="unit" :class="[showCount > 1?'':'box-grow-1']">
  23. <view class="t-omit">{{text}}</view>
  24. </view>
  25. <view class="value t-omit" :class="[showCount > 1?'':'box-grow-0']">{{value}}</view>
  26. </view>
  27. </template>
  28. </app-jump-button>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. name: "app-account-style",
  34. props: {
  35. showCount: Number,
  36. icon: String,
  37. text: String,
  38. value: Number,
  39. page: String,
  40. }
  41. }
  42. </script>
  43. <style scoped lang="scss">
  44. .app-account-style {
  45. }
  46. .icon {
  47. width: #{26rpx};
  48. height: #{26rpx};
  49. display: block;
  50. margin-right: #{12rpx};
  51. }
  52. .unit {
  53. color: $uni-general-color-one;
  54. margin-right: #{16rpx};
  55. font-size: $uni-font-size-general-two;
  56. }
  57. .value {
  58. color: #ffbb43;
  59. font-weight: bold;
  60. padding: 0 10upx;
  61. }
  62. </style>