mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
feat: Replace Vue.extend with defineComponent in design system (no-changelog) (#5918)
* refactor: replace new Vue() with custom event bus (no-changelog) * fix: export types from design system main * fix: update component types * fix: update form inputs event bus * refactor: replace global Vue references in design-system * refactor: update prop types * feat: improve types * fix: further type improvements * fix: further types improvements * fix: further type improvements * test: fix test snapshots * test: fix snapshot * chore: fix linting issues * test: fix personalization modal snapshot
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@visible-change="onVisibleChange"
|
||||
>
|
||||
<span :class="{ [$style.button]: true, [$style[theme]]: !!theme }">
|
||||
<component :is="$options.components.N8nIcon" icon="ellipsis-v" :size="iconSize" />
|
||||
<n8n-icon icon="ellipsis-v" :size="iconSize" />
|
||||
</span>
|
||||
|
||||
<template #dropdown>
|
||||
@@ -22,9 +22,8 @@
|
||||
>
|
||||
{{ action.label }}
|
||||
<div :class="$style.iconContainer">
|
||||
<component
|
||||
<n8n-icon
|
||||
v-if="action.type === 'external-link'"
|
||||
:is="$options.components.N8nIcon"
|
||||
icon="external-link-alt"
|
||||
size="xsmall"
|
||||
color="text-base"
|
||||
@@ -38,22 +37,16 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import {
|
||||
Dropdown as ElDropdown,
|
||||
DropdownMenu as ElDropdownMenu,
|
||||
DropdownItem as ElDropdownItem,
|
||||
} from 'element-ui';
|
||||
import N8nIcon from '../N8nIcon';
|
||||
import type { UserAction } from '@/types';
|
||||
|
||||
interface Action {
|
||||
label: string;
|
||||
value: string;
|
||||
disabled: boolean;
|
||||
type?: 'external-link';
|
||||
}
|
||||
|
||||
export default Vue.extend({
|
||||
export default defineComponent({
|
||||
name: 'n8n-action-toggle',
|
||||
components: {
|
||||
ElDropdown,
|
||||
@@ -63,7 +56,7 @@ export default Vue.extend({
|
||||
},
|
||||
props: {
|
||||
actions: {
|
||||
type: Array<Action>,
|
||||
type: Array as PropType<UserAction[]>,
|
||||
default: () => [],
|
||||
},
|
||||
placement: {
|
||||
|
||||
Reference in New Issue
Block a user