feat(character-banner): 배너 등록 언어 선택 추가
- 배너 등록/수정 다이얼로그에 언어 선택(ko/ja/en) UI를 추가
This commit is contained in:
@@ -184,6 +184,19 @@
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12">
|
||||
<v-select
|
||||
v-model="bannerForm.lang"
|
||||
:items="languageOptions"
|
||||
label="언어 선택"
|
||||
item-text="text"
|
||||
item-value="value"
|
||||
:disabled="isEdit"
|
||||
outlined
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="selectedCharacter">
|
||||
<v-col cols="12">
|
||||
<v-alert
|
||||
@@ -302,8 +315,14 @@ export default {
|
||||
image: null,
|
||||
imageUrl: '',
|
||||
characterId: null,
|
||||
bannerId: null
|
||||
bannerId: null,
|
||||
lang: null
|
||||
},
|
||||
languageOptions: [
|
||||
{ text: '한국어', value: 'ko' },
|
||||
{ text: '일본어', value: 'ja' },
|
||||
{ text: '영어', value: 'en' }
|
||||
],
|
||||
imageRules: [
|
||||
v => !!v || this.isEdit || '이미지를 선택하세요'
|
||||
]
|
||||
@@ -312,7 +331,7 @@ export default {
|
||||
|
||||
computed: {
|
||||
isFormValid() {
|
||||
return (this.bannerForm.image || (this.isEdit && this.bannerForm.imageUrl)) && this.selectedCharacter;
|
||||
return (this.bannerForm.image || (this.isEdit && this.bannerForm.imageUrl)) && this.selectedCharacter && this.bannerForm.lang;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -393,7 +412,8 @@ export default {
|
||||
image: null,
|
||||
imageUrl: '',
|
||||
characterId: null,
|
||||
bannerId: null
|
||||
bannerId: null,
|
||||
lang: null
|
||||
};
|
||||
this.previewImage = null;
|
||||
this.searchKeyword = '';
|
||||
@@ -414,7 +434,8 @@ export default {
|
||||
image: null,
|
||||
imageUrl: banner.imageUrl,
|
||||
characterId: banner.characterId,
|
||||
bannerId: banner.id
|
||||
bannerId: banner.id,
|
||||
lang: banner.lang || banner.language || null
|
||||
};
|
||||
this.previewImage = null;
|
||||
this.searchKeyword = '';
|
||||
@@ -430,7 +451,8 @@ export default {
|
||||
image: null,
|
||||
imageUrl: '',
|
||||
characterId: null,
|
||||
bannerId: null
|
||||
bannerId: null,
|
||||
lang: null
|
||||
};
|
||||
this.previewImage = null;
|
||||
this.searchKeyword = '';
|
||||
@@ -501,7 +523,8 @@ export default {
|
||||
// 배너 추가
|
||||
const response = await createCharacterBanner({
|
||||
image: this.bannerForm.image,
|
||||
characterId: this.selectedCharacter.id
|
||||
characterId: this.selectedCharacter.id,
|
||||
lang: this.bannerForm.lang
|
||||
});
|
||||
if (response && response.status === 200 && response.data && response.data.success === true) {
|
||||
this.notifySuccess('배너가 추가되었습니다.');
|
||||
|
||||
Reference in New Issue
Block a user