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