refactor(editor): N8nOption type (#12399)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
Raúl Gómez Morales 2024-12-30 13:46:37 +01:00 committed by GitHub
parent f8731963f6
commit 78ef2ce7f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,17 @@
<script setup lang="ts">
import { ElOption } from 'element-plus';
const props = defineProps({
...ElOption.props,
value: { type: [String, Number], required: true },
});
/**
* @see https://element-plus.org/en-US/component/select.html#option-attributes
*/
type OptionProps = {
value: string | number | boolean | object;
label?: string | number;
disabled?: boolean;
};
const props = defineProps<OptionProps>();
</script>
<template>
<ElOption v-bind="{ ...$props, ...$attrs }" :value="props.value"><slot /></ElOption>
<ElOption v-bind="props"><slot /></ElOption>
</template>