chore: email-selector 优化

pull/409/head
xiaojunnuo 2025-05-31 00:53:05 +08:00
parent f7b0b44ef6
commit 0d455d8c2f
2 changed files with 10 additions and 3 deletions

View File

@ -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,
});

View File

@ -9,10 +9,10 @@ export class EmailNotification extends BaseNotification {
@NotificationInput({
title: '收件人邮箱',
component: {
name: 'a-select',
name: 'email-selector',
vModel: 'value',
mode: 'tags',
open: false,
// open: false,
},
required: true,
helper: '可以填写多个,填写一个按回车键再填写下一个\n需要先[配置邮件服务器](#/sys/settings/email)',