<template>
    <el-card>
    <el-table :data="getPartLists" style="width: 100%" border>
        <el-table-column prop="partCode" label="零部件编码" />
        <el-table-column prop="partName" label="零部件名称" />
    </el-table>
</el-card>
</template>

<script lang="ts">
import { defineComponent, PropType, watch } from 'vue';
export default defineComponent({
    props: {
        getPartLists: {
            type: Array as PropType<Array<{ partCode: string, partName: string }>>,
            default: () => []
        }
    },
    setup(props) {
        watch(
            () => props.getPartLists,
            (newVal, oldVal) => {
                console.log('getPartLists changed:', newVal);
                // Perform any additional actions when getPartLists changes
            },
            { deep: true, immediate: true }
        );

        return {};
    }
});
</script>