diff --git a/src/components/main/BoardMain.vue b/src/components/main/BoardMain.vue index c02b99a..a596c62 100644 --- a/src/components/main/BoardMain.vue +++ b/src/components/main/BoardMain.vue @@ -1,9 +1,18 @@ diff --git a/src/components/wordDict/DictWrite.vue b/src/components/wordDict/DictWrite.vue index 4913467..e37b52d 100644 --- a/src/components/wordDict/DictWrite.vue +++ b/src/components/wordDict/DictWrite.vue @@ -51,7 +51,7 @@
-
@@ -150,6 +150,16 @@ const ValidHandler = (field) => { } const handleContentUpdate = (newContent) => { content.value = newContent; + + const oldContent = typeof props.contentValue === 'string'? JSON.parse(props.contentValue) : props.contentValue; + const newContentOps = newContent?.ops || []; + + const oldContentJson = JSON.stringify(oldContent); + const newContentJson = JSON.stringify(newContentOps); + + // 기존 데이터와 새 데이터가 다를 경우 changed = true; + changed.value = oldContentJson !== newContentJson; + ValidHandler("content"); // 유효성 검사 실행 }; diff --git a/src/layouts/TheTop.vue b/src/layouts/TheTop.vue index c40e4ab..8cb7c8b 100644 --- a/src/layouts/TheTop.vue +++ b/src/layouts/TheTop.vue @@ -33,10 +33,7 @@ - - - - + -
- - -