캐릭터 챗봇 #74

Merged
klaus merged 33 commits from test into main 2025-09-10 06:26:03 +00:00
1 changed files with 7 additions and 4 deletions
Showing only changes of commit e09f654aba - Show all commits

View File

@ -1014,10 +1014,12 @@ export default {
computed: { computed: {
isSaveDisabled() { isSaveDisabled() {
if (this.isLoading) return true; if (this.isLoading) return true;
if (!this.isFormValid) return true; // (create)
if (!this.isEdit) return false; // if (!this.isEdit) {
return !this.isFormValid;
}
// // (edit) ( )
const changed = this.getChangedFields(); const changed = this.getChangedFields();
const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id'); const hasNonIdField = Object.keys(changed || {}).some(k => k !== 'id');
const imageChanged = !!this.character.image; // const imageChanged = !!this.character.image; //
@ -1443,7 +1445,8 @@ export default {
}, },
async saveCharacter() { async saveCharacter() {
if (!this.isFormValid) { // (create)
if (!this.isEdit && !this.isFormValid) {
this.notifyError("필수 항목을 모두 입력하세요"); this.notifyError("필수 항목을 모두 입력하세요");
return; return;
} }