<template>
  <div>
    <div class="ltemBox" v-for="(item, index) in list" :key="index + 'list'">
      <slot :item="item"></slot>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, watch, defineProps } from "vue";
const props = defineProps({
  labelData: {
    type: Array,
    default: [],
  },
});
const list = ref([]);
watch(
  () => props.labelData,
  () => {
    list.value = props.labelData;
  },
  { deep: true }
);
onMounted(() => {
  list.value = props.labelData;
});
</script>

<style lang="scss" scoped>
.ltemBox{
  margin-bottom: 1vw;
}
</style>