fix: 功能样式优化完善。

This commit is contained in:
tianyongbao
2026-02-15 17:32:20 +08:00
parent 9b072ac892
commit 570e975e55
4 changed files with 256 additions and 157 deletions

View File

@@ -42,30 +42,33 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="card-name-section">
<view class="header-row">
<view class="account-icon">
<uni-icons type="wallet" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<view class="balance-section">
<text class="balance-value"><text class="balance-label">余额</text>{{ item.balance }}</text>
<view class="info-row">
<text class="account-type">{{ dictStr(item.type, accountType) || '--' }}</text>
<text class="account-status" :class="getStatusClass(item.status, dictStr(item.status, accountStatus))">{{ dictStr(item.status, accountStatus) || '--' }}</text>
<view class="balance-amount">
<text class="balance-label">余额</text>
<text class="balance-value">{{ item.balance }}</text>
</view>
</view>
</view>
<view class="card-body">
<view class="info-row">
<view class="info-item">
<!-- <view class="info-item">
<text class="info-label">账户类型</text>
<text class="info-value">{{ dictStr(item.type, accountType) }}</text>
</view>
<view class="info-item">
<text class="info-label">账户状态</text>
<text class="info-value" :class="getStatusClass(item.status, dictStr(item.status, accountStatus))">{{ dictStr(item.status, accountStatus) }}</text>
</view>
</view> -->
<view class="info-item">
<text class="info-label">可用额度</text>
<text class="info-value orange">{{ item.availableLimit }}</text>
@@ -521,17 +524,15 @@ page {
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
gap: 12rpx;
padding: 16rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
.header-row {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
margin-right: 16rpx;
gap: 10rpx;
}
.account-icon {
@@ -542,55 +543,86 @@ page {
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
flex-shrink: 0;
}
.card-info {
.card-name {
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card-code {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
line-height: 1.3;
letter-spacing: 0.5rpx;
font-family: 'Courier New', monospace;
flex-shrink: 0;
}
.info-row {
display: flex;
flex-direction: column;
gap: 4rpx;
justify-content: space-between;
align-items: center;
gap: 12rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.account-type {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
line-height: 1.3;
flex-shrink: 0;
}
.account-status {
font-size: 24rpx;
font-weight: 500;
line-height: 1.3;
flex: 1;
text-align: center;
.card-name {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.status-normal {
color: #52c41a;
}
.card-code {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
line-height: 1;
&.status-error {
color: #ff4d4f;
}
&.status-default {
color: rgba(255, 255, 255, 0.7);
}
}
.balance-section {
.balance-amount {
display: flex;
align-items: center;
align-items: baseline;
gap: 6rpx;
flex-shrink: 0;
white-space: nowrap;
.balance-value {
color: #fa8c16;
font-size: 32rpx;
font-weight: 700;
line-height: 1;
white-space: nowrap;
.balance-label {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
margin-right: 8rpx;
}
}
}
.balance-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
}
.balance-value {
font-size: 32rpx;
font-weight: 700;
color: #fa8c16;
line-height: 1.2;
}
}

View File

@@ -16,34 +16,37 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="card-name-section">
<view class="header-row">
<view class="card-icon">
<uni-icons type="vip-filled" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<view class="balance-section">
<text class="balance-value"><text class="balance-label">可用</text>{{ item.availableLimit || 0 }}</text>
<view class="info-row">
<text class="credit-limit">{{ item.creditLimit || 0 }}</text>
<text class="account-status" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
<view class="balance-amount">
<text class="balance-label">可用</text>
<text class="balance-value">{{ item.availableLimit || 0 }}</text>
</view>
</view>
</view>
<view class="card-body">
<view class="info-row">
<view class="info-item" v-if="item.creditLimit || true">
<!-- <view class="info-item" v-if="item.creditLimit || true">
<text class="info-label">信用额度</text>
<text class="info-value primary">{{ item.creditLimit ? item.creditLimit + '元' : '--' }}</text>
</view>
</view> -->
<view class="info-item" v-if="item.balance || true">
<text class="info-label">余额</text>
<text class="info-value orange">{{ item.balance ? item.balance + '元' : '--' }}</text>
</view>
<view class="info-item" v-if="dictStr(item.status, statusList) || true">
<!-- <view class="info-item" v-if="dictStr(item.status, statusList) || true">
<text class="info-label">账户状态</text>
<text class="info-value" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
</view>
</view> -->
<view class="info-item" v-if="item.bankName || true">
<text class="info-label">银行</text>
<text class="info-value">{{ item.bankName || '--' }}</text>
@@ -445,17 +448,15 @@ page {
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
gap: 12rpx;
padding: 16rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
.header-row {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
margin-right: 16rpx;
gap: 10rpx;
}
.card-icon {
@@ -466,55 +467,89 @@ page {
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
flex-shrink: 0;
}
.card-info {
.card-name {
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card-code {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
line-height: 1.3;
letter-spacing: 0.5rpx;
font-family: 'Courier New', monospace;
flex-shrink: 0;
}
.info-row {
display: flex;
flex-direction: column;
gap: 4rpx;
justify-content: space-between;
align-items: center;
gap: 12rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.credit-limit {
font-size: 24rpx;
color: #667eea;
font-weight: 600;
line-height: 1.3;
flex-shrink: 0;
background: rgba(255, 255, 255, 0.9);
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.account-status {
font-size: 24rpx;
font-weight: 500;
line-height: 1.3;
flex: 1;
text-align: center;
.card-name {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&.status-normal {
color: #52c41a;
}
.card-code {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
line-height: 1;
&.status-error {
color: #ff4d4f;
}
&.status-default {
color: rgba(255, 255, 255, 0.7);
}
}
.balance-section {
.balance-amount {
display: flex;
align-items: center;
align-items: baseline;
gap: 6rpx;
flex-shrink: 0;
white-space: nowrap;
.balance-value {
color: #fa8c16;
font-size: 32rpx;
font-weight: 700;
line-height: 1;
white-space: nowrap;
.balance-label {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
margin-right: 8rpx;
}
}
}
.balance-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
}
.balance-value {
font-size: 32rpx;
font-weight: 700;
color: #fa8c16;
line-height: 1.2;
}
}

View File

@@ -40,30 +40,33 @@
<u-list-item v-for="(item, index) in listData" :key="index">
<view class="list-item" @click="enterDetails(item)">
<view class="item-header">
<view class="card-name-section">
<view class="header-row">
<view class="card-icon">
<uni-icons type="home-filled" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<text class="card-name">{{ item.name }}</text>
<text class="card-code" v-if="item.code">{{ item.code }}</text>
</view>
<view class="balance-section">
<text class="balance-value"><text class="balance-label">余额</text>{{ item.balance }}</text>
<view class="info-row">
<text class="account-type">{{ dictStr(item.debitType, debitTypeList) || '--' }}</text>
<text class="account-status" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
<view class="balance-amount">
<text class="balance-label">余额</text>
<text class="balance-value">{{ item.balance }}</text>
</view>
</view>
</view>
<view class="card-body">
<view class="info-row">
<view class="info-item" v-if="dictStr(item.debitType, debitTypeList) || true">
<!-- <view class="info-item" v-if="dictStr(item.debitType, debitTypeList) || true">
<text class="info-label">账户类型</text>
<text class="info-value">{{ dictStr(item.debitType, debitTypeList) || '--' }}</text>
</view>
<view class="info-item" v-if="dictStr(item.status, statusList) || true">
<text class="info-label">账户状态</text>
<text class="info-value" :class="getStatusClass(item.status, dictStr(item.status, statusList))">{{ dictStr(item.status, statusList) || '--' }}</text>
</view>
</view> -->
<view class="info-item" v-if="item.activationDate || true">
<text class="info-label">开户日期</text>
<text class="info-value">{{ item.activationDate || '--' }}</text>
@@ -555,17 +558,15 @@ page {
.item-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
gap: 12rpx;
padding: 16rpx 24rpx;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
.card-name-section {
.header-row {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
margin-right: 16rpx;
gap: 10rpx;
}
.card-icon {
@@ -576,54 +577,85 @@ page {
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
flex-shrink: 0;
}
.card-info {
.card-name {
font-size: 28rpx;
font-weight: 600;
color: #ffffff;
line-height: 1.3;
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4rpx;
.card-name {
color: #ffffff;
font-size: 28rpx;
font-weight: 600;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-code {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
line-height: 1;
}
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.balance-section {
display: flex;
align-items: center;
.card-code {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
line-height: 1.3;
letter-spacing: 0.5rpx;
font-family: 'Courier New', monospace;
flex-shrink: 0;
white-space: nowrap;
}
.balance-amount {
display: flex;
align-items: baseline;
gap: 6rpx;
flex-shrink: 0;
}
.balance-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.75);
font-weight: 400;
}
.balance-value {
font-size: 32rpx;
font-weight: 700;
color: #fa8c16;
line-height: 1.2;
}
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12rpx;
padding-top: 12rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2);
}
.account-type {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.85);
font-weight: 500;
line-height: 1.3;
flex-shrink: 0;
}
.account-status {
font-size: 24rpx;
font-weight: 500;
line-height: 1.3;
flex: 1;
text-align: center;
.balance-value {
color: #fa8c16;
font-size: 32rpx;
font-weight: 700;
line-height: 1;
white-space: nowrap;
.balance-label {
color: rgba(255, 255, 255, 0.85);
font-size: 22rpx;
font-weight: 400;
margin-right: 8rpx;
}
&.status-normal {
color: #52c41a;
}
&.status-error {
color: #ff4d4f;
}
&.status-default {
color: rgba(255, 255, 255, 0.7);
}
}
}

View File

@@ -21,7 +21,7 @@
<uni-icons type="star" size="20" color="#ffffff"></uni-icons>
</view>
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
<text class="card-name">{{ item.name }}({{ item.code }})</text>
</view>
</view>
<view class="balance-section">