용어집 수정사항 없을떄 저장 x

This commit is contained in:
khj0414 2025-04-04 16:18:35 +09:00
parent d792253292
commit c4b40dea79

View File

@ -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"); //
};