chore(搜索转账对象页): 调整样式并补充翻译

This commit is contained in:
hzj 2025-12-12 11:13:50 +08:00
parent d38dfe5aa4
commit ed06b53d72

View File

@ -26,7 +26,7 @@
padding: 4px 12px;
"
>
<img src="../../../assets/icon/search.png" alt="" width="16px" style="opacity: 0.6" />
<img src="../../../assets/icon/search.png" alt="" style="width: 1.5em; opacity: 0.6" />
<input
v-model="searchQuery"
type="text"
@ -46,7 +46,6 @@
<button
v-if="!hasSearched && searchQuery"
class="search-btn"
style="
border: none;
color: rgba(0, 0, 0, 0.4);
@ -59,7 +58,6 @@
</button>
<button
v-else
class="search-btn"
style="border: none; font-weight: 600; background-color: transparent"
@click="clearSearch"
>
@ -87,11 +85,13 @@
"
>
<div style="display: flex; align-items: center; justify-content: space-between; gap: 4px">
<!-- 基本信息 -->
<div style="flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px">
<div
style="
width: 50px;
height: 50px;
width: 3.5em;
align-self: stretch;
display: flex;
align-items: center;
justify-content: center;
@ -100,27 +100,66 @@
<img
:src="user.avatar || ''"
style="
display: block;
width: 100%;
height: 100%;
aspect-ratio: 1/1;
border-radius: 50%;
object-fit: cover;
display: block;
"
@error="handleAvatarImageError"
/>
</div>
<div class="user-details" style="flex: 1; min-width: 0">
<h4>{{ user.name }}</h4>
<div style="display: flex; align-items: center">
<p>ID</p>
<p>:</p>
<p>{{ user.account || user.id }}</p>
<div
style="
flex: 1;
min-width: 0;
align-self: stretch;
display: flex;
flex-direction: column;
gap: 4px;
"
>
<div
style="
font-weight: 700;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>
{{ user.name }}
</div>
<div style="font-size: 0.9em; font-weight: 500; color: rgba(0, 0, 0, 0.4)">
{{ t('user_id_prefix') }} {{ user.account || user.id }}
</div>
</div>
</div>
<button class="add-btn" @click="selectUser(user)">{{ t('add') }}</button>
<!-- 添加按钮 -->
<button
style="
width: auto;
background-color: transparent;
color: rgba(0, 0, 0, 0.4);
border: 1px solid #e6e6e6;
border-radius: 12px;
font-size: 0.9em;
font-weight: 500;
padding: 2px 8px;
cursor: pointer;
"
@click="selectUser(user)"
>
{{ t('add') }}
</button>
</div>
<div style="display: flex; gap: 2px; margin-top: 8px; margin-left: 50px; height: 20px">
<!-- 身份徽章 -->
<div style="margin-top: 4px; margin-left: 3em; height: 20px">
<img
src="../../../assets/icon/identity/coinSeller.png"
alt=""
@ -337,125 +376,16 @@ onMounted(() => {})
font-family: 'SF Pro Text';
}
.search-payee {
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.content {
padding: 16px;
position: relative;
z-index: 2;
}
/* 用户类型选择器 */
.user-type-selector {
margin-bottom: 12px;
}
.user-type-selector label {
display: block;
font-size: 14px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}
.type-buttons {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.type-btn {
padding: 6px 12px;
border: 1px solid #ddd;
border-radius: 16px;
background-color: white;
color: #666;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.type-btn.active {
background-color: #8b5cf6;
color: white;
border-color: #8b5cf6;
}
.type-btn:active {
transform: scale(0.98);
}
.search-input {
font-size: 16px;
}
.search-input::placeholder {
color: #999;
}
.search-btn {
font-size: 16px;
}
.user-details h4 {
font-size: 16px;
font-weight: 700;
margin-bottom: 4px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.user-details p {
font-size: 14px;
font-weight: 500;
color: rgba(0, 0, 0, 0.4);
}
.add-btn {
background-color: transparent;
color: rgba(0, 0, 0, 0.4);
border: 1px solid #e6e6e6;
border-radius: 12px;
font-size: 14px;
font-weight: 500;
padding: 2px 8px;
cursor: pointer;
}
/* 空状态和提示 */
.empty-state,
.search-hint {
text-align: center;
padding: 40px 20px;
color: #666;
}
.empty-icon,
.hint-icon {
font-size: 48px;
margin-bottom: 16px;
}
.empty-state p,
.search-hint p {
font-size: 18px;
font-weight: 600;
margin: 0 0 8px 0;
color: #333;
}
.empty-state span,
.search-hint span {
font-size: 14px;
color: #666;
}
/* 加载状态 */
.loading-state {
text-align: center;
@ -484,44 +414,24 @@ onMounted(() => {})
.loading-state p {
margin: 0;
color: #666;
font-size: 14px;
font-size: 0.9em;
}
/* 响应式设计 */
@media (max-width: 480px) {
.search-input {
font-size: 14px;
}
.search-btn {
font-size: 13px;
}
.type-btn {
padding: 5px 10px;
font-size: 11px;
}
.user-details h4 {
font-size: 15px;
}
.user-details p {
font-size: 13px;
}
.add-btn {
font-size: 13px;
@media screen and (max-width: 360px) {
* {
font-size: 10px;
}
}
/* RTL支持 */
[dir='rtl'] .user-details {
text-align: right;
@media screen and (min-width: 360px) {
* {
font-size: 12px;
}
}
[dir='rtl'] .add-btn {
margin-left: 0;
margin-right: 12px;
@media screen and (min-width: 768px) {
* {
font-size: 24px;
}
}
</style>