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>
|
||||||
</div>
|
</div>
|
||||||
<span :class="$style.title" slot="reference">
|
<span :class="$style.title" slot="reference">
|
||||||
{{value}}
|
<WorkflowNameShort :name="value" :limit="40" />
|
||||||
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" />
|
<font-awesome-icon :class="$style.editIcon" icon="pencil-alt" />
|
||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -24,8 +24,10 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import WorkflowNameShort from './WorkflowNameShort.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
components: { WorkflowNameShort },
|
||||||
name: 'NodeTitle',
|
name: 'NodeTitle',
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<span :title="name">
|
<span :title="name">
|
||||||
<slot :shortenedName="shortenedName"></slot>
|
<slot v-if="hasDefaultSlot" :shortenedName="shortenedName"></slot>
|
||||||
|
{{ shortenedName }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -14,6 +15,9 @@ export default Vue.extend({
|
||||||
name: "WorkflowNameShort",
|
name: "WorkflowNameShort",
|
||||||
props: ["name", "limit"],
|
props: ["name", "limit"],
|
||||||
computed: {
|
computed: {
|
||||||
|
hasDefaultSlot(): boolean {
|
||||||
|
return !!this.$slots.default;
|
||||||
|
},
|
||||||
shortenedName(): string {
|
shortenedName(): string {
|
||||||
const name = this.$props.name;
|
const name = this.$props.name;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue