chore: email-selector 优化

This commit is contained in:
xiaojunnuo
2025-05-31 00:53:05 +08:00
parent f7b0b44ef6
commit 0d455d8c2f
2 changed files with 10 additions and 3 deletions
@@ -61,8 +61,15 @@ async function addItem() {
return;
}
debugger;
if (emails.value.find(item => item.value === email)) {
notification.warning({
message: "此邮箱已存在",
});
return;
}
await api.EmailAdd(email);
emails.value.push({
emails.value.unshift({
value: email,
label: email,
});