mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
truncate name
This commit is contained in:
parent
4c3231e156
commit
6d49f99d16
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<span :class="$style.title" slot="reference">
|
||||
{{value}}
|
||||
<WorkflowNameShort :name="value" :limit="40" />
|
||||
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" />
|
||||
</span>
|
||||
</el-popover>
|
||||
|
@ -24,8 +24,10 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import WorkflowNameShort from './WorkflowNameShort.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
components: { WorkflowNameShort },
|
||||
name: 'NodeTitle',
|
||||
props: {
|
||||
value: {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<span :title="name">
|
||||
<slot :shortenedName="shortenedName"></slot>
|
||||
<slot v-if="hasDefaultSlot" :shortenedName="shortenedName"></slot>
|
||||
{{ shortenedName }}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
@ -14,6 +15,9 @@ export default Vue.extend({
|
|||
name: "WorkflowNameShort",
|
||||
props: ["name", "limit"],
|
||||
computed: {
|
||||
hasDefaultSlot(): boolean {
|
||||
return !!this.$slots.default;
|
||||
},
|
||||
shortenedName(): string {
|
||||
const name = this.$props.name;
|
||||
|
||||
|
|
Loading…
Reference in a new issue