From 64cb7e30c1965978e0d292e57b254a93ba0f6321 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Fri, 28 Feb 2025 13:59:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EB=8C=93=EA=B8=80=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=97=86=EC=9D=84=EB=95=8C=20=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/common.js | 8 ++ src/components/board/BoardCommentArea.vue | 104 +++++++++++----------- 2 files changed, 60 insertions(+), 52 deletions(-) diff --git a/src/common/common.js b/src/common/common.js index d1e4b91..9acd369 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -73,6 +73,14 @@ const common = { seconds: zeroFormat(date.getSeconds()), }; }, + + isNotEmpty(obj) { + if (obj === null || obj === undefined) return false; + if (typeof obj === 'string' && obj.trim() === '') return false; + if ((Array.isArray(obj) || obj === Object(obj)) && Object.keys(obj).length === 0) return false; + + return true; + }, }; export default { diff --git a/src/components/board/BoardCommentArea.vue b/src/components/board/BoardCommentArea.vue index ed153ab..6cf3f00 100644 --- a/src/components/board/BoardCommentArea.vue +++ b/src/components/board/BoardCommentArea.vue @@ -11,13 +11,9 @@ -->
- + {{ commentAlert }} + {{ textAlert }}
@@ -26,12 +22,7 @@
- +
@@ -59,49 +50,58 @@