feat: hide login domain

This commit is contained in:
eoao
2026-05-09 00:18:54 +08:00
parent a1c47d73e8
commit 984b734d4c
10 changed files with 58 additions and 25 deletions

View File

@@ -127,7 +127,7 @@
</template>
<script setup>
import {Icon} from "@iconify/vue";
import {nextTick, reactive, ref, watch} from "vue";
import {computed, nextTick, reactive, ref, watch} from "vue";
import {
accountList,
accountAdd,
@@ -153,7 +153,7 @@ const settingStore = useSettingStore();
const emailStore = useEmailStore();
const showAdd = ref(false)
const addLoading = ref(false);
const domainList = settingStore.domainList
const domainList = computed(() => settingStore.domainList)
const accounts = reactive([])
const noLoading = ref(false)
const loading = ref(false)
@@ -189,6 +189,12 @@ watch(() => accountStore.changeUserAccountName, () => {
accounts[0].name = accountStore.changeUserAccountName
})
watch(() => settingStore.domainList, (list) => {
if (!addForm.suffix && list.length > 0) {
addForm.suffix = list[0]
}
}, {immediate: true})
const openSelect = () => {
mySelect.value.toggleMenu()
@@ -338,6 +344,7 @@ function changeAccount(account) {
}
function add() {
addForm.suffix = addForm.suffix || settingStore.domainList[0]
showAdd.value = true
setTimeout(() => {
addRef.value.focus()