preview.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view class="list-box">
  3. <view class="item" v-for="item in list" :key="item.param">
  4. <view class="label">
  5. {{ item.paramname || '-- ' }}
  6. </view>
  7. <view class="value">
  8. {{ item.lastvalue || '-- ' }}
  9. <text class="">
  10. {{ item.unit }}
  11. </text>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "preview",
  19. data() {
  20. return {
  21. list: []
  22. }
  23. },
  24. methods: {
  25. }
  26. }
  27. </script>
  28. <style lang="scss" scoped>
  29. .list-box {
  30. width: 100%;
  31. display: flex;
  32. flex-wrap: wrap;
  33. background: #fff;
  34. border-radius: 4px;
  35. padding: 6px;
  36. box-sizing: border-box;
  37. padding-bottom: 0;
  38. .item {
  39. width: 50%;
  40. .label {
  41. margin-bottom: 6px;
  42. }
  43. .value {
  44. margin-bottom: 6px;
  45. font-weight: bold;
  46. padding-left: 2px;
  47. }
  48. }
  49. }
  50. </style>