index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div class="zap-text-item">
  3. <span class="zap-text-item__label">{{label}}</span>
  4. <div class="zap-text-item__file">
  5. <span v-if="value" class="zap-text-item__value">{{value}}</span>
  6. <span v-if="suffix" class="zap-text-item__suffix">{{suffix}}</span>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "TextItem",
  13. props: {
  14. label: String,
  15. value: String,
  16. suffix: String
  17. }
  18. }
  19. </script>
  20. <style lang="scss">
  21. .zap-text-item{
  22. display: flex;
  23. align-items: center;
  24. margin-bottom: 22px;
  25. margin-right: 10px;
  26. }
  27. .zap-text-item__label{
  28. flex: 0 0 176px;
  29. width: 176px;
  30. padding-right: 12px;
  31. text-align: right;
  32. font-size: 14px;
  33. color: #333333;
  34. }
  35. .zap-text-item__file{
  36. flex: 0 0 264px;
  37. display: flex;
  38. align-items: center;
  39. justify-content: space-between;
  40. width: 264px;
  41. height: 36px;
  42. padding-left: 8px;
  43. background-color: #F4F5F6;
  44. border: 1px solid #EBEBEB;
  45. border-radius: 4px;
  46. }
  47. .zap-text-item__value{
  48. flex: 1;
  49. font-size: 14px;
  50. color: #333333;
  51. }
  52. .zap-text-item__suffix{
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. width: 40px;
  57. height: 100%;
  58. flex: 0 0 40px;
  59. font-size: 14px;
  60. color: #999999;
  61. border-left: 1px solid #EBEBEB;
  62. }
  63. </style>