<template>
  <div style="margin-top: 10px;">
    <el-table :data="list" border style="width: 100%">
      <el-table-column prop="name" align="center" label="商品信息">
        <template v-slot="scope">
          <div style="display: flex;align-items: center;justify-content: center;">
            <el-image style="width: 40px; height: 40px" :src="scope.row.imgUrl" fit="contain" />
            {{ scope.row.name }}
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="savNum" align="center" label="有效存酒" />
      <el-table-column prop="expNum" align="center" label="已过期存酒" />
    </el-table>
  </div>
</template>

<script setup>
import API from './api'
onMounted(() => {
  getList()
})
let list = ref([])
async function getList() {
  let res = await API.getcount()
  list.value = res

}

</script>
