Use watch to change localDescription

このコミットが含まれているのは:
Sean King 2022-06-26 13:25:36 -06:00
コミット 8c7f4ab481
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 510C52BACD6E7257
2個のファイルの変更6行の追加3行の削除

ファイルの表示

@ -129,6 +129,9 @@ const Attachment = {
...mapGetters(['mergedConfig'])
},
watch: {
'attachment.description' (newVal) {
this.localDescription = newVal
},
localDescription (newVal) {
this.onEdit(newVal)
}

ファイルの表示

@ -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>