hookehuyr

fix(打卡): 调整打卡提交条件和输入框提示

修改文字打卡的提交条件为必须不少于10个字符,图片/视频/音频打卡不再强制要求填写内容
更新输入框提示文字,明确可选内容
......@@ -28,9 +28,11 @@ export function useCheckin() {
*/
const canSubmit = computed(() => {
if (activeType.value === 'text') {
// 文字打卡:必须填写内容且长度不少于10个字符
return message.value.trim() !== '' && message.value.trim().length >= 10
} else {
return fileList.value.length > 0 && message.value.trim() !== ''
// 图片、视频、音频打卡:必须有文件,内容可选
return fileList.value.length > 0
}
})
......
......@@ -26,7 +26,7 @@
rows="6"
autosize
type="textarea"
:placeholder="activeType === 'text' ? '请输入打卡内容,至少需要10个字符' : '请输入打卡留言'"
:placeholder="activeType === 'text' ? '请输入打卡内容,至少需要10个字符' : '请输入打卡留言(可选)'"
:maxlength="activeType === 'text' ? 500 : 200"
show-word-limit
/>
......@@ -418,7 +418,7 @@ onMounted(async () => {
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// white-space: nowrap;
}
.file-status {
......