fix(character-image): 캐릭터 이미지 등록/수정

- 트리거 단어 최소 개수 3개로 수정
This commit is contained in:
Yu Sung 2025-09-02 15:31:24 +09:00
parent b94aa54365
commit bc8833483a
1 changed files with 6 additions and 6 deletions

View File

@ -126,7 +126,7 @@
</template>
</v-combobox>
<div class="caption grey--text text--darken-1">
트리거를 입력하고 엔터를 누르면 추가됩니다. (20 이내, 최소 5, 최대 10)
트리거를 입력하고 엔터를 누르면 추가됩니다. (20 이내, 최소 3, 최대 10)
</div>
</v-col>
</v-row>
@ -179,7 +179,7 @@ export default {
previewImage: null,
triggers: [],
triggerRules: [
v => (v && v.length >= 5 && v.length <= 10) || '트리거는 최소 5개, 최대 10개까지 등록 가능합니다'
v => (v && v.length >= 3 && v.length <= 10) || '트리거는 최소 3개, 최대 10개까지 등록 가능합니다'
],
imageRules: [
v => !!v || '이미지를 선택하세요'
@ -188,7 +188,7 @@ export default {
},
computed: {
canSubmit() {
const triggersValid = this.triggers && this.triggers.length >= 5 && this.triggers.length <= 10
const triggersValid = this.triggers && this.triggers.length >= 3 && this.triggers.length <= 10
if (this.isEdit) return triggersValid
return !!this.form.image && triggersValid
}
@ -260,9 +260,9 @@ export default {
},
async save() {
if (this.isSubmitting) return
// : 5, 10
if (!this.triggers || this.triggers.length < 5 || this.triggers.length > 10) {
this.notifyError('트리거는 최소 5개, 최대 10개여야 합니다.')
// : 3, 10
if (!this.triggers || this.triggers.length < 3 || this.triggers.length > 10) {
this.notifyError('트리거는 최소 3개, 최대 10개여야 합니다.')
return
}
this.isSubmitting = true