大空间消毒机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="log_picker_dialog_container">
  3. <div class="modal_content">
  4. <p class="title">设置消毒等级</p>
  5. <div class="log_select">
  6. <van-picker
  7. :columns="columns"
  8. :show-toolbar="false"
  9. visible-option-num="3"
  10. option-height="42"
  11. v-model="selectedValues"
  12. />
  13. </div>
  14. <div class="ok_btn" @click="chooseLog">确定</div>
  15. </div>
  16. </div>
  17. </template>
  18. <script setup>
  19. import { ref, watch } from 'vue'
  20. const props = defineProps({
  21. changeLogVal: {
  22. type: Function,
  23. },
  24. logVal: {
  25. type: String,
  26. },
  27. })
  28. const columns = ref([
  29. { text: '1 Log', value: '1' },
  30. { text: '2 Log', value: '2' },
  31. { text: '3 Log', value: '3' },
  32. { text: '4 Log', value: '4' },
  33. { text: '5 Log', value: '5' },
  34. { text: '6 Log', value: '6' },
  35. { text: '7 Log', value: '7' },
  36. { text: '8 Log', value: '8' },
  37. { text: '9 Log', value: '9' },
  38. { text: '10 Log', value: '10' },
  39. { text: '11 Log', value: '11' },
  40. { text: '12 Log', value: '12' },
  41. ])
  42. const chooseLog = () => {
  43. props.changeLogVal(selectedValues.value[0])
  44. }
  45. const selectedValues = ref(['3'])
  46. watch(() => {
  47. selectedValues.value = [props.logVal]
  48. })
  49. </script>
  50. <style lang="scss" scoped>
  51. .log_picker_dialog_container {
  52. position: fixed;
  53. top: 0;
  54. left: 0;
  55. right: 0;
  56. bottom: 0;
  57. background: rgba(0, 0, 0, 0.5);
  58. z-index: 2;
  59. display: flex;
  60. align-items: center;
  61. justify-content: center;
  62. .modal_content {
  63. width: 476px;
  64. height: 407px;
  65. border-radius: 16px;
  66. background: #ffffff;
  67. box-sizing: border-box;
  68. padding: 45px 68px 62px 68px;
  69. display: flex;
  70. flex-direction: column;
  71. align-items: center;
  72. .title {
  73. font-family: Source Han Sans CN;
  74. font-size: 22px;
  75. font-weight: normal;
  76. letter-spacing: 0.04em;
  77. color: #000000;
  78. margin-bottom: 39px;
  79. }
  80. .log_select {
  81. width: 340px;
  82. height: 113px;
  83. overflow: hidden;
  84. margin-bottom: 48px;
  85. }
  86. .ok_btn {
  87. width: 340px;
  88. height: 68px;
  89. border-radius: 8px;
  90. background: #06518b;
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. font-family: Source Han Sans CN;
  95. font-size: 23px;
  96. font-weight: 350;
  97. letter-spacing: 0em;
  98. color: #ffffff;
  99. }
  100. }
  101. }
  102. </style>