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

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

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