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

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

<template>
  <el-cascader
    clearable
    placeholder="请选择"
    style="width: 100%"
    :options="options"
    :props="{ label: 'name', value: 'id', emitPath: false, checkStrictly: true, expandTrigger: 'hover' }" />
</template>
