bangding.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="midPopUp" v-if="modelValue">
  3. <div class="container">
  4. <div class="headerTittle">{{ title }}</div>
  5. <el-scrollbar style="padding: 0 20px">
  6. <div class="infoBox" v-for="item in selectedItem">{{ item.name }}</div>
  7. </el-scrollbar>
  8. <div class="bottomBtn">
  9. <el-button class="leftBtn" @click="handleClose">取消</el-button>
  10. <el-button class="rightBtn" @click="emits('submit')" type="primary">绑定</el-button>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script lang="ts" setup>
  16. const props = defineProps({
  17. modelValue: {
  18. type: Number,
  19. default: 0,
  20. },
  21. title: {
  22. type: String,
  23. default: "",
  24. },
  25. });
  26. const emits = defineEmits(["update:modelValue"]);
  27. const materialData = inject("materialData");
  28. const selectedItem = computed(() =>
  29. materialData.value.filter((item) => item.selected == true)
  30. );
  31. const handleClose = () => emits("update:modelValue", false);
  32. </script>
  33. <style lang="scss" scoped>
  34. .midPopUp {
  35. z-index: 4;
  36. }
  37. .container {
  38. background-color: #f1f3f5;
  39. }
  40. .infoBox {
  41. width: 100%;
  42. height: 80px;
  43. background-color: white;
  44. border-radius: 16px;
  45. margin-bottom: $p10;
  46. }
  47. .bottomBtn {
  48. width: 100%;
  49. height: 70px;
  50. display: flex;
  51. align-items: center;
  52. justify-content: space-between;
  53. padding: $p10 10% 0 10%;
  54. .leftBtn {
  55. height: 55px;
  56. width: 45%;
  57. border-radius: 16px;
  58. font-size: $f20;
  59. color: black;
  60. background-color: #00000015;
  61. border: 0px;
  62. }
  63. .rightBtn {
  64. height: 55px;
  65. width: 45%;
  66. border-radius: 16px;
  67. font-size: $f20;
  68. color: white;
  69. }
  70. }
  71. </style>