usePage增加许多配置项,另外增加一些回调函数、插槽等等,修改逻辑增强配置灵活性
zk authored at 2023-11-21 17:42:23
548.00 B
NewLife.QuickVue
<template>
  <el-select v-bind="$attrs">
    <el-option v-for="item in myOptions"
      :key="item[valueKey]"
      :label="item[labelKey]"
      :disabled="item.disabled"
      :value="item[valueKey]">
    </el-option>
  </el-select>
</template>

<script setup lang="ts">
import useOptions from '/@/hook/useOptions';
import { OptionEmits, optionProps } from '/@/utils/optionProps';

const props = defineProps(optionProps);
const emits = defineEmits<OptionEmits>()
const { myOptions } = useOptions(props, emits)

</script>

<style scoped>

</style>