mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +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:
@@ -36,11 +36,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import N8nTooltip from '../N8nTooltip';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
|
||||
export default Vue.extend({
|
||||
export default defineComponent({
|
||||
name: 'n8n-node-icon',
|
||||
components: {
|
||||
N8nTooltip,
|
||||
@@ -78,12 +78,13 @@ export default Vue.extend({
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
iconStyleData(): object {
|
||||
iconStyleData(): Record<string, string> {
|
||||
if (!this.size) {
|
||||
return {
|
||||
color: this.color || '',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
color: this.color || '',
|
||||
width: `${this.size}px`,
|
||||
@@ -92,7 +93,11 @@ export default Vue.extend({
|
||||
'line-height': `${this.size}px`,
|
||||
};
|
||||
},
|
||||
fontStyleData(): object {
|
||||
fontStyleData(): Record<string, string> {
|
||||
if (!this.size) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return {
|
||||
'max-width': `${this.size}px`,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user