<script setup lang="ts">
import { getProductList } from '@/api/base'

const options = ref([])
async function fetchList() {
  const res = await getProductList()
  options.value = res.data.list
}
watchEffect(() => {
  fetchList()
})
</script>

<template>
  <el-select-v2
    :options="options"
    placeholder="请选择"
    style="width: 100%"
    value-key="id"
    :props="{ label: 'title', value: 'id' }" />
</template>
