优化多个组件的输入框,添加图标以提升用户体验,确保提示信息的一致性和可读性。

This commit is contained in:
jxxghp
2025-05-27 21:23:08 +08:00
parent 5711285a77
commit 1cfee25695
6 changed files with 71 additions and 13 deletions
@@ -454,7 +454,6 @@ function onClose() {
:label="t('notification.name')" :label="t('notification.name')"
:hint="t('notification.nameRequired')" :hint="t('notification.nameRequired')"
persistent-hint persistent-hint
active
prepend-inner-icon="mdi-label" prepend-inner-icon="mdi-label"
/> />
</VCol> </VCol>
+5 -1
View File
@@ -352,10 +352,13 @@ const dropdownItems = ref([
<!-- 重命名对话框 --> <!-- 重命名对话框 -->
<VDialog v-if="renameDialog" v-model="renameDialog" max-width="400"> <VDialog v-if="renameDialog" v-model="renameDialog" max-width="400">
<VCard> <VCard>
<VDialogCloseBtn @click="renameDialog = false" />
<VCardItem> <VCardItem>
<template #prepend>
<VIcon icon="mdi-pencil" class="me-2" />
</template>
<VCardTitle>{{ t('folder.renameFolder') }}</VCardTitle> <VCardTitle>{{ t('folder.renameFolder') }}</VCardTitle>
</VCardItem> </VCardItem>
<VDialogCloseBtn @click="renameDialog = false" />
<VDivider /> <VDivider />
<VCardText> <VCardText>
<VTextField <VTextField
@@ -467,6 +470,7 @@ const dropdownItems = ref([
variant="outlined" variant="outlined"
:hint="t('folder.customBackgroundImageHint')" :hint="t('folder.customBackgroundImageHint')"
persistent-hint persistent-hint
prepend-inner-icon="mdi-image"
/> />
</VCol> </VCol>
</VRow> </VRow>
+26 -6
View File
@@ -291,11 +291,14 @@ onMounted(() => {
<template> <template>
<VDialog scrollable max-width="40rem" :fullscreen="!display.mdAndUp.value"> <VDialog scrollable max-width="40rem" :fullscreen="!display.mdAndUp.value">
<VCard <VCard>
:title="`${props.oper === 'add' ? t('dialog.userAddEdit.add') : t('dialog.userAddEdit.edit')}${ <VCardItem :class="props.oper === 'add' ? 'py-3' : 'py-2'">
props.oper !== 'add' ? ` - ${userName}` : '' <template #prepend>
}`" <VIcon icon="mdi-account" class="me-2" />
> </template>
<VCardTitle>{{ props.oper === 'add' ? t('dialog.userAddEdit.add') : t('dialog.userAddEdit.edit') }}</VCardTitle>
<VCardSubtitle>{{ userName }}</VCardSubtitle>
</VCardItem>
<VDialogCloseBtn @click="emit('close')" /> <VDialogCloseBtn @click="emit('close')" />
<VDivider /> <VDivider />
<VCardItem> <VCardItem>
@@ -350,6 +353,7 @@ onMounted(() => {
density="comfortable" density="comfortable"
:readonly="props.oper !== 'add'" :readonly="props.oper !== 'add'"
:label="t('dialog.userAddEdit.username')" :label="t('dialog.userAddEdit.username')"
prepend-inner-icon="mdi-account"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -359,6 +363,7 @@ onMounted(() => {
clearable clearable
:label="t('dialog.userAddEdit.email')" :label="t('dialog.userAddEdit.email')"
type="email" type="email"
prepend-inner-icon="mdi-email"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -370,6 +375,7 @@ onMounted(() => {
clearable clearable
:label="t('dialog.userAddEdit.password')" :label="t('dialog.userAddEdit.password')"
autocomplete="" autocomplete=""
prepend-inner-icon="mdi-lock"
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible" @click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
/> />
</VCol> </VCol>
@@ -382,6 +388,7 @@ onMounted(() => {
:append-inner-icon="isConfirmPasswordVisible ? 'mdi-eye-off-outline' : 'mdi-eye-outline'" :append-inner-icon="isConfirmPasswordVisible ? 'mdi-eye-off-outline' : 'mdi-eye-outline'"
clearable clearable
:label="t('dialog.userAddEdit.confirmPassword')" :label="t('dialog.userAddEdit.confirmPassword')"
prepend-inner-icon="mdi-lock-check"
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible" @click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
/> />
</VCol> </VCol>
@@ -392,6 +399,7 @@ onMounted(() => {
clearable clearable
:label="t('dialog.userAddEdit.nickname')" :label="t('dialog.userAddEdit.nickname')"
placeholder="显示昵称,优先于用户名显示" placeholder="显示昵称,优先于用户名显示"
prepend-inner-icon="mdi-card-account-details"
/> />
</VCol> </VCol>
<VCol cols="12" md="6" v-if="canControl"> <VCol cols="12" md="6" v-if="canControl">
@@ -402,6 +410,7 @@ onMounted(() => {
item-value="value" item-value="value"
:label="t('dialog.userAddEdit.status')" :label="t('dialog.userAddEdit.status')"
dense dense
prepend-inner-icon="mdi-toggle-switch"
/> />
</VCol> </VCol>
</VRow> </VRow>
@@ -415,6 +424,7 @@ onMounted(() => {
density="comfortable" density="comfortable"
clearable clearable
:label="t('dialog.userAddEdit.wechat')" :label="t('dialog.userAddEdit.wechat')"
prepend-inner-icon="mdi-wechat"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -423,6 +433,7 @@ onMounted(() => {
density="comfortable" density="comfortable"
clearable clearable
:label="t('dialog.userAddEdit.telegram')" :label="t('dialog.userAddEdit.telegram')"
prepend-inner-icon="mdi-send"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -431,6 +442,7 @@ onMounted(() => {
density="comfortable" density="comfortable"
clearable clearable
:label="t('dialog.userAddEdit.slack')" :label="t('dialog.userAddEdit.slack')"
prepend-inner-icon="mdi-slack"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -439,6 +451,7 @@ onMounted(() => {
density="comfortable" density="comfortable"
clearable clearable
:label="t('dialog.userAddEdit.vocechat')" :label="t('dialog.userAddEdit.vocechat')"
prepend-inner-icon="mdi-chat"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -447,10 +460,17 @@ onMounted(() => {
density="comfortable" density="comfortable"
clearable clearable
:label="t('dialog.userAddEdit.synologyChat')" :label="t('dialog.userAddEdit.synologyChat')"
prepend-inner-icon="mdi-message"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
<VTextField v-model="userForm.settings.douban_userid" density="comfortable" clearable label="豆瓣用户" /> <VTextField
v-model="userForm.settings.douban_userid"
density="comfortable"
clearable
label="豆瓣用户"
prepend-inner-icon="mdi-movie"
/>
</VCol> </VCol>
</VRow> </VRow>
</VForm> </VForm>
+13 -2
View File
@@ -696,13 +696,24 @@ onMounted(() => {
</VCard> </VCard>
<!-- 重命名弹窗 --> <!-- 重命名弹窗 -->
<VDialog v-if="renamePopper" v-model="renamePopper" max-width="35rem"> <VDialog v-if="renamePopper" v-model="renamePopper" max-width="35rem">
<VCard :title="t('file.rename')"> <VCard>
<VCardItem>
<template #prepend>
<VIcon icon="mdi-pencil" class="me-2" />
</template>
<VCardTitle>{{ t('file.rename') }}</VCardTitle>
</VCardItem>
<VDialogCloseBtn @click="renamePopper = false" /> <VDialogCloseBtn @click="renamePopper = false" />
<VDivider /> <VDivider />
<VCardText> <VCardText>
<VRow> <VRow>
<VCol cols="12"> <VCol cols="12">
<VTextField v-model="newName" :label="t('file.newName')" :loading="renameLoading" /> <VTextField
v-model="newName"
:label="t('file.newName')"
:loading="renameLoading"
prepend-inner-icon="mdi-format-text"
/>
</VCol> </VCol>
<VCol cols="12" v-if="currentItem && currentItem.type == 'dir'"> <VCol cols="12" v-if="currentItem && currentItem.type == 'dir'">
<VSwitch v-model="renameAll" :label="t('file.includeSubfolders')" /> <VSwitch v-model="renameAll" :label="t('file.includeSubfolders')" />
+9 -2
View File
@@ -165,17 +165,24 @@ const sortIcon = computed(() => {
<IconBtn v-if="pathSegments.length > 0" @click="goUp"> <IconBtn v-if="pathSegments.length > 0" @click="goUp">
<VIcon icon="mdi-arrow-up-bold-outline" /> <VIcon icon="mdi-arrow-up-bold-outline" />
</IconBtn> </IconBtn>
<!-- 新建文件夹 -->
<VDialog v-model="newFolderPopper" max-width="35rem"> <VDialog v-model="newFolderPopper" max-width="35rem">
<template #activator="{ props }"> <template #activator="{ props }">
<IconBtn> <IconBtn>
<VIcon v-bind="props" icon="mdi-folder-plus-outline" /> <VIcon v-bind="props" icon="mdi-folder-plus-outline" />
</IconBtn> </IconBtn>
</template> </template>
<VCard :title="t('file.newFolder')"> <VCard>
<VCardItem>
<template #prepend>
<VIcon icon="mdi-folder-plus-outline" class="me-2" />
</template>
<VCardTitle>{{ t('file.newFolder') }}</VCardTitle>
</VCardItem>
<VDialogCloseBtn @click="newFolderPopper = false" /> <VDialogCloseBtn @click="newFolderPopper = false" />
<VDivider /> <VDivider />
<VCardText> <VCardText>
<VTextField v-model="newFolderName" :label="t('common.name')" /> <VTextField v-model="newFolderName" :label="t('common.name')" prepend-inner-icon="mdi-format-text" />
</VCardText> </VCardText>
<VCardActions> <VCardActions>
<div class="flex-grow-1" /> <div class="flex-grow-1" />
+18 -1
View File
@@ -322,7 +322,13 @@ watch(
<VForm class="mt-6"> <VForm class="mt-6">
<VRow> <VRow>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
<VTextField v-model="currentUserName" density="comfortable" readonly :label="t('user.username')" /> <VTextField
v-model="currentUserName"
density="comfortable"
readonly
:label="t('user.username')"
prepend-inner-icon="mdi-account"
/>
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
<VTextField <VTextField
@@ -331,6 +337,7 @@ watch(
clearable clearable
:label="t('user.email')" :label="t('user.email')"
type="email" type="email"
prepend-inner-icon="mdi-email"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -342,6 +349,7 @@ watch(
clearable clearable
:label="t('user.password')" :label="t('user.password')"
autocomplete="" autocomplete=""
prepend-inner-icon="mdi-lock"
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible" @click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
/> />
</VCol> </VCol>
@@ -354,6 +362,7 @@ watch(
:append-inner-icon="isConfirmPasswordVisible ? 'mdi-eye-off-outline' : 'mdi-eye-outline'" :append-inner-icon="isConfirmPasswordVisible ? 'mdi-eye-off-outline' : 'mdi-eye-outline'"
clearable clearable
:label="t('user.confirmPassword')" :label="t('user.confirmPassword')"
prepend-inner-icon="mdi-lock-check"
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible" @click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
/> />
</VCol> </VCol>
@@ -364,6 +373,7 @@ watch(
clearable clearable
:label="t('profile.nickname')" :label="t('profile.nickname')"
:placeholder="t('profile.nicknamePlaceholder')" :placeholder="t('profile.nicknamePlaceholder')"
prepend-inner-icon="mdi-card-account-details"
/> />
</VCol> </VCol>
</VRow> </VRow>
@@ -379,6 +389,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.wechatUser')" :label="t('profile.wechatUser')"
prepend-inner-icon="mdi-wechat"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -387,6 +398,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.telegramUser')" :label="t('profile.telegramUser')"
prepend-inner-icon="mdi-send"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -395,6 +407,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.slackUser')" :label="t('profile.slackUser')"
prepend-inner-icon="mdi-slack"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -403,6 +416,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.vocechatUser')" :label="t('profile.vocechatUser')"
prepend-inner-icon="mdi-chat"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -411,6 +425,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.synologychatUser')" :label="t('profile.synologychatUser')"
prepend-inner-icon="mdi-message"
/> />
</VCol> </VCol>
<VCol cols="12" md="6"> <VCol cols="12" md="6">
@@ -419,6 +434,7 @@ watch(
density="comfortable" density="comfortable"
clearable clearable
:label="t('profile.doubanUser')" :label="t('profile.doubanUser')"
prepend-inner-icon="mdi-movie"
/> />
</VCol> </VCol>
</VRow> </VRow>
@@ -462,6 +478,7 @@ watch(
autocomplete="" autocomplete=""
class="mb-8" class="mb-8"
variant="outlined" variant="outlined"
prepend-inner-icon="mdi-shield-key"
/> />
<div class="d-flex justify-end flex-wrap gap-4"> <div class="d-flex justify-end flex-wrap gap-4">
<VBtn variant="outlined" color="secondary" @click="otpDialog = false"> {{ t('common.cancel') }} </VBtn> <VBtn variant="outlined" color="secondary" @click="otpDialog = false"> {{ t('common.cancel') }} </VBtn>