From c590087578e5c31c881115af22f5182d5a12bba4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 6 Mar 2023 15:51:11 -0600 Subject: [PATCH] Fix description line clamp show more --- pages/item/_id/index.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pages/item/_id/index.vue b/pages/item/_id/index.vue index 489c6244..5892022f 100644 --- a/pages/item/_id/index.vue +++ b/pages/item/_id/index.vue @@ -117,10 +117,10 @@
{{ publishedYear }}
-
+

{{ description }}

-
+
{{ showFullDescription ? 'Read less' : 'Read more' }} {{ showFullDescription ? 'expand_less' : 'expand_more' }}
@@ -722,8 +722,12 @@ export default { } }, checkDescriptionClamped() { - if (!this.$refs.description || this.showFullDescription) return - this.descriptionClamped = this.$refs.description.scrollHeight > this.$refs.description.clientHeight + if (this.showFullDescription) return + if (!this.$refs.description) { + this.descriptionClamped = false + } else { + this.descriptionClamped = this.$refs.description.scrollHeight > this.$refs.description.clientHeight + } }, windowResized() { this.windowWidth = window.innerWidth