fix(打卡): 调整打卡提交条件和输入框提示
修改文字打卡的提交条件为必须不少于10个字符,图片/视频/音频打卡不再强制要求填写内容 更新输入框提示文字,明确可选内容
Showing
2 changed files
with
5 additions
and
3 deletions
| ... | @@ -28,9 +28,11 @@ export function useCheckin() { | ... | @@ -28,9 +28,11 @@ export function useCheckin() { |
| 28 | */ | 28 | */ |
| 29 | const canSubmit = computed(() => { | 29 | const canSubmit = computed(() => { |
| 30 | if (activeType.value === 'text') { | 30 | if (activeType.value === 'text') { |
| 31 | + // 文字打卡:必须填写内容且长度不少于10个字符 | ||
| 31 | return message.value.trim() !== '' && message.value.trim().length >= 10 | 32 | return message.value.trim() !== '' && message.value.trim().length >= 10 |
| 32 | } else { | 33 | } else { |
| 33 | - return fileList.value.length > 0 && message.value.trim() !== '' | 34 | + // 图片、视频、音频打卡:必须有文件,内容可选 |
| 35 | + return fileList.value.length > 0 | ||
| 34 | } | 36 | } |
| 35 | }) | 37 | }) |
| 36 | 38 | ... | ... |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | rows="6" | 26 | rows="6" |
| 27 | autosize | 27 | autosize |
| 28 | type="textarea" | 28 | type="textarea" |
| 29 | - :placeholder="activeType === 'text' ? '请输入打卡内容,至少需要10个字符' : '请输入打卡留言'" | 29 | + :placeholder="activeType === 'text' ? '请输入打卡内容,至少需要10个字符' : '请输入打卡留言(可选)'" |
| 30 | :maxlength="activeType === 'text' ? 500 : 200" | 30 | :maxlength="activeType === 'text' ? 500 : 200" |
| 31 | show-word-limit | 31 | show-word-limit |
| 32 | /> | 32 | /> |
| ... | @@ -418,7 +418,7 @@ onMounted(async () => { | ... | @@ -418,7 +418,7 @@ onMounted(async () => { |
| 418 | color: #333; | 418 | color: #333; |
| 419 | overflow: hidden; | 419 | overflow: hidden; |
| 420 | text-overflow: ellipsis; | 420 | text-overflow: ellipsis; |
| 421 | - white-space: nowrap; | 421 | + // white-space: nowrap; |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | .file-status { | 424 | .file-status { | ... | ... |
-
Please register or login to post a comment