mpattern.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="control">
  3. <view class="update-line">
  4. <view class="label" :style="{ color: fColor }">
  5. {{ ctrlModel.funcname }}
  6. </view>
  7. <view class="content" :style="{ color: fColor }">
  8. {{ ctrlModel.showValue || '暂未设置' }}
  9. <view class="control-updata-but" hover-class="navigator-hover" @click="onClick(ctrlModel)">{{
  10. ctrlModel.isfeedback ? '待更新' : '更新' }}</view>
  11. </view>
  12. </view>
  13. <My_input ref="MyInput" />
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: "mpattern",
  19. props: {
  20. fColor: {
  21. type: String,
  22. value: "#FFF"
  23. }
  24. },
  25. data() {
  26. return {
  27. ctrlModel: {}
  28. }
  29. },
  30. methods: {
  31. onClick(item) {
  32. this.$refs.MyInput.openInput(item)
  33. }
  34. }
  35. }
  36. </script>
  37. <style lang="scss" scoped>
  38. .row {
  39. position: relative;
  40. display: flex;
  41. padding: 4px 6px 0;
  42. height: 60px;
  43. box-sizing: border-box;
  44. background: #fff;
  45. border-radius: 4px;
  46. margin-bottom: 5px;
  47. .box {
  48. width: 49%;
  49. .content {
  50. display: flex;
  51. margin-top: 10px;
  52. align-items: flex-end;
  53. .value {
  54. width: 0;
  55. flex: 1;
  56. color: #333;
  57. font-size: 16px;
  58. flex-shrink: 0;
  59. font-weight: bold;
  60. }
  61. .unit {
  62. font-size: 10px;
  63. color: #666;
  64. flex-shrink: 0;
  65. max-width: 50px;
  66. }
  67. }
  68. }
  69. .dot {
  70. position: absolute;
  71. right: 2px;
  72. top: 2px;
  73. width: 10px;
  74. height: 10px;
  75. background: #D9001B;
  76. border-radius: 50%;
  77. }
  78. }
  79. </style>