diff options
| -rw-r--r-- | src/components/attachment/attachment.js | 3 | ||||
| -rw-r--r-- | src/components/attachment/attachment.vue | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index d62a4adc..5dc50475 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -129,6 +129,9 @@ const Attachment = { ...mapGetters(['mergedConfig']) }, watch: { + 'attachment.description' (newVal) { + this.localDescription = newVal + }, localDescription (newVal) { this.onEdit(newVal) } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 14f6a0ae..2a89886d 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -166,7 +166,7 @@ :icon="placeholderIconClass" /> <p> - {{ edit ? localDescription : attachment.description }} + {{ localDescription }} </p> </a> @@ -244,7 +244,7 @@ </span> </div> <div - v-if="size !== 'hide' && !hideDescription && (edit || (attachment.description && showDescription))" + v-if="size !== 'hide' && !hideDescription && (edit || (localDescription && showDescription))" class="description-container" :class="{ '-static': !edit }" > @@ -257,7 +257,7 @@ @keydown.enter.prevent="" > <p v-else> - {{ attachment.description }} + {{ localDescription }} </p> </div> </div> |
