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

View File

@ -40,7 +40,7 @@
<text wx:else class="undecided-value">未定</text> <text wx:else class="undecided-value">未定</text>
</view> </view>
</t-cell> </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> <view slot="note">{{transportLabels[travel.transportationType]}}</view>
</t-cell> </t-cell>
</t-cell-group> </t-cell-group>