fix transport icon

This commit is contained in:
Timi
2025-12-18 11:57:29 +08:00
parent 1ad1da1c4e
commit 51e679dd83
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@
import Time from "../../../utils/Time";
import { TravelApi } from "../../../api/TravelApi";
import { TravelLocationApi } from "../../../api/TravelLocationApi";
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon } from "../../../types/Travel";
import { Travel, TravelStatusLabel, TravelStatusIcon, TransportationTypeLabel, TravelLocation, TravelLocationTypeLabel, TravelLocationTypeIcon, TransportationTypeIcon } from "../../../types/Travel";
interface TravelDetailData {
/** 出行详情 */
@ -22,6 +22,8 @@ interface TravelDetailData {
statusIcons: typeof TravelStatusIcon;
/** 交通类型标签映射 */
transportLabels: typeof TransportationTypeLabel;
/** 交通类型图标映射 */
transportIcons: typeof TransportationTypeIcon;
/** 地点类型标签映射 */
locationTypeLabels: typeof TravelLocationTypeLabel;
/** 地点类型图标映射 */
@ -42,6 +44,7 @@ Page({
statusLabels: TravelStatusLabel,
statusIcons: TravelStatusIcon,
transportLabels: TransportationTypeLabel,
transportIcons: TransportationTypeIcon,
locationTypeLabels: TravelLocationTypeLabel,
locationTypeIcons: TravelLocationTypeIcon,
deleteDialogVisible: false,

View File

@ -40,7 +40,7 @@
<text wx:else class="undecided-value">未定</text>
</view>
</t-cell>
<t-cell left-icon="{{travel.transportationType === 'PLANE' ? 'flight-takeoff' : travel.transportationType === 'TRAIN' ? 'map-route' : travel.transportationType === 'SELF_DRIVING' ? 'control-platform' : 'location'}}" title="交通方式">
<t-cell left-icon="{{transportIcons[travel.transportationType]}}" title="交通方式">
<view slot="note">{{transportLabels[travel.transportationType]}}</view>
</t-cell>
</t-cell-group>