mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-06 08:32:51 +08:00
🐛 完善帖子ID判断逻辑
This commit is contained in:
@@ -338,7 +338,7 @@ function searchPost(): void {
|
||||
return;
|
||||
}
|
||||
const numCheck = Number(search.value);
|
||||
if (isNaN(numCheck)) {
|
||||
if (isNaN(numCheck) || numCheck % 1 !== 0) {
|
||||
if (showUser.value) showUser.value = false;
|
||||
showSearch.value = true;
|
||||
} else createPost(search.value);
|
||||
|
||||
@@ -182,7 +182,7 @@ async function searchPost(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
const numCheck = Number(search.value);
|
||||
if (isNaN(numCheck)) {
|
||||
if (isNaN(numCheck) || numCheck % 1 !== 0) {
|
||||
if (showList.value === true) showList.value = false;
|
||||
showSearch.value = true;
|
||||
return;
|
||||
|
||||
@@ -256,7 +256,7 @@ function searchPost(): void {
|
||||
return;
|
||||
}
|
||||
const numCheck = Number(search.value);
|
||||
if (isNaN(numCheck)) {
|
||||
if (isNaN(numCheck) || numCheck % 1 !== 0) {
|
||||
if (showUser.value) showUser.value = false;
|
||||
showSearch.value = true;
|
||||
} else createPost(search.value);
|
||||
|
||||
Reference in New Issue
Block a user