feat: add MIN_ADDRESS_LEN && MAX_ADDRESS_LEN (#304)

This commit is contained in:
Dream Hunter
2024-06-06 21:44:22 +08:00
committed by GitHub
parent 6225f6521a
commit 0db611bb3e
11 changed files with 50 additions and 11 deletions

View File

@@ -56,6 +56,8 @@ const getOpenSettings = async (message) => {
Object.assign(openSettings.value, {
title: res["title"] || "",
prefix: res["prefix"] || "",
minAddressLen: res["minAddressLen"] || 1,
maxAddressLen: res["maxAddressLen"] || 30,
needAuth: res["needAuth"] || false,
domains: res["domains"].map((domain) => {
return {

View File

@@ -189,7 +189,8 @@ onMounted(async () => {
<n-input-group-label v-if="openSettings.prefix">
{{ openSettings.prefix }}
</n-input-group-label>
<n-input v-model:value="emailName" />
<n-input v-model:value="emailName" show-count :minlength="openSettings.minAddressLen"
:maxlength="openSettings.maxAddressLen" />
<n-input-group-label>@</n-input-group-label>
<n-select v-model:value="emailDomain" :consistent-menu-width="false"
:options="openSettings.domains" />