정다정
10-14
241014 정다정 AI 이미지 생성 수정
@e6263a02095fd5a8898dd4decb6e805e299d6c3e
--- client/views/component/TextToImage.vue
+++ client/views/component/TextToImage.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 |
<div class="flex justify-center align-center"> |
3 | 3 |
<div class="propmt-container"> |
4 | 4 |
<div class="input-conatiner"> |
5 |
- <input v-model="word" @keyup.enter="startProgress(word)" /> |
|
5 |
+ <input v-model="word" @keyup.enter="startProgress(word)" placeholder="궁금한 단어를 검색해보세요!" /> |
|
6 | 6 |
<button @click="startProgress(word)"> |
7 | 7 |
<img src="../../resources/img/new_img/icon/search-icon.png" style="width: 52px" /> |
8 | 8 |
</button> |
... | ... | @@ -53,6 +53,11 @@ |
53 | 53 |
methods: { |
54 | 54 |
// 상태 진행 바(progress bar) |
55 | 55 |
startProgress(word) { |
56 |
+ if (!word.trim()) { |
|
57 |
+ alert('검색할 단어를 입력해주세요.'); |
|
58 |
+ return; // 입력이 없으면 함수 종료 |
|
59 |
+ } |
|
60 |
+ |
|
56 | 61 |
this.modalClose = false; |
57 | 62 |
|
58 | 63 |
if (this.progressWidth == 100) { |
... | ... | @@ -60,8 +65,6 @@ |
60 | 65 |
} |
61 | 66 |
|
62 | 67 |
if (this.progressWidth > 0) return; // 이미 진행 중이면 중복 실행 방지 |
63 |
- |
|
64 |
- this.setWord(word); |
|
65 | 68 |
|
66 | 69 |
const interval = 300; // 30ms |
67 | 70 |
const totalDuration = 3000; // 총 시간 : 10초 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?