<!--
 * @Author: micky
 * @Date: 2024-09-10 21:16:57
 * @LastEditors: micky
 * @LastEditTime: 2024-10-17 11:07:01
 * @FilePath: \chargingpile-uniapp\src\bundle\pages\repair\spareParts-popup.vue
-->
<template>
    <u-popup :show="show" mode="bottom" @close="close" :closeable="true" :round="10">
        <view class="popup flex flex-col">
            <view class="title">维修使用配件</view>
            <view class="flex-1 overflow-auto min-h-[500rpx] max-h-[500rpx]">
                <w-spareParts-list :datas="sparePartList" :showPrice="false" />
            </view>
        </view>
    </u-popup>
</template>

<script setup lang="ts">
import { ref } from 'vue'

defineProps({
    sparePartList: {
        type: Array,
        default: () => []
    }
})
const show = ref(false)

const close = () => {
    show.value = false
}
const showPopup = () => {
    show.value = true
}
defineExpose({
    showPopup
})
</script>

<style lang="scss" scoped>
.popup {
    @include flex-direction;
    max-height: 700rpx;
    padding: 0 20px 30px;
    .title {
        @include flex-center;
        padding: 15px 0;
        font-weight: 500;
        font-size: 32rpx;
    }
}
</style>
