refactor: Migrate Option to composition API (no-changelog) (#9754)

This commit is contained in:
Tomi Turtiainen 2024-06-17 10:07:47 +03:00 committed by GitHub
parent ac7a561379
commit ed2ad6c7ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,17 +1,12 @@
<script lang="ts"> <script setup lang="ts">
import { ElOption } from 'element-plus'; import { ElOption } from 'element-plus';
import { defineComponent } from 'vue';
export default defineComponent({ defineProps({
components: {
ElOption,
},
props: {
...ElOption.props, ...ElOption.props,
}, value: { type: [String, Number], required: true },
}); });
</script> </script>
<template> <template>
<ElOption v-bind="{ ...$props, ...$attrs }"><slot /></ElOption> <ElOption v-bind="{ ...$props, ...$attrs }" :value="value"><slot /></ElOption>
</template> </template>