mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Continue porting components over to composition API (no-changelog) (#8893)
This commit is contained in:
committed by
GitHub
parent
80c4bc443a
commit
6c693e1afd
@@ -30,16 +30,11 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { ElSelect } from 'element-plus';
|
||||
import { defineComponent } from 'vue';
|
||||
import { type PropType, defineComponent } from 'vue';
|
||||
import type { SelectSize } from '@/types';
|
||||
|
||||
type InnerSelectRef = InstanceType<typeof ElSelect>;
|
||||
|
||||
export interface IProps {
|
||||
size?: string;
|
||||
limitPopperWidth?: string;
|
||||
popperClass?: string;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'N8nSelect',
|
||||
components: {
|
||||
@@ -49,10 +44,8 @@ export default defineComponent({
|
||||
...ElSelect.props,
|
||||
modelValue: {},
|
||||
size: {
|
||||
type: String,
|
||||
type: String as PropType<SelectSize>,
|
||||
default: 'large',
|
||||
validator: (value: string): boolean =>
|
||||
['mini', 'small', 'medium', 'large', 'xlarge'].includes(value),
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
@@ -101,7 +94,7 @@ export default defineComponent({
|
||||
return acc;
|
||||
}, {});
|
||||
},
|
||||
computedSize(): string | undefined {
|
||||
computedSize(): InnerSelectRef['$props']['size'] {
|
||||
if (this.size === 'medium') {
|
||||
return 'default';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user