mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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">
|
<script setup lang="ts">
|
||||||
import { ElOption } from 'element-plus';
|
import { ElOption } from 'element-plus';
|
||||||
|
|
||||||
const props = defineProps({
|
/**
|
||||||
...ElOption.props,
|
* @see https://element-plus.org/en-US/component/select.html#option-attributes
|
||||||
value: { type: [String, Number], required: true },
|
*/
|
||||||
});
|
type OptionProps = {
|
||||||
|
value: string | number | boolean | object;
|
||||||
|
label?: string | number;
|
||||||
|
disabled?: boolean;
|
||||||
|
};
|
||||||
|
const props = defineProps<OptionProps>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ElOption v-bind="{ ...$props, ...$attrs }" :value="props.value"><slot /></ElOption>
|
<ElOption v-bind="props"><slot /></ElOption>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue