123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <div class="midPopUp" v-if="modelValue">
- <div class="container">
- <div class="headerTittle">{{ title }}</div>
- <el-scrollbar style="padding: 0 20px">
- <div class="infoBox" v-for="item in selectedItem">{{ item.name }}</div>
- </el-scrollbar>
- <div class="bottomBtn">
- <el-button class="leftBtn" @click="handleClose">取消</el-button>
- <el-button class="rightBtn" @click="emits('submit')" type="primary">绑定</el-button>
- </div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- const props = defineProps({
- modelValue: {
- type: Number,
- default: 0,
- },
- title: {
- type: String,
- default: "",
- },
- });
- const emits = defineEmits(["update:modelValue"]);
- const materialData = inject("materialData");
- const selectedItem = computed(() =>
- materialData.value.filter((item) => item.selected == true)
- );
- const handleClose = () => emits("update:modelValue", false);
- </script>
- <style lang="scss" scoped>
- .midPopUp {
- z-index: 4;
- }
- .container {
- background-color: #f1f3f5;
- }
- .infoBox {
- width: 100%;
- height: 80px;
- background-color: white;
- border-radius: 16px;
- margin-bottom: $p10;
- }
- .bottomBtn {
- width: 100%;
- height: 70px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: $p10 10% 0 10%;
- .leftBtn {
- height: 55px;
- width: 45%;
- border-radius: 16px;
- font-size: $f20;
- color: black;
- background-color: #00000015;
- border: 0px;
- }
- .rightBtn {
- height: 55px;
- width: 45%;
- border-radius: 16px;
- font-size: $f20;
- color: white;
- }
- }
- </style>
|