mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
refactor(editor): N8nOption type (#12399)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
parent
f8731963f6
commit
78ef2ce7f0
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue