feat: 在pen-groups组件中新增普通路线和普通点的折叠面板,优化用户选择体验

This commit is contained in:
xudan 2025-06-30 14:37:25 +08:00
parent dadde5e1ca
commit 78c38add80

View File

@ -144,6 +144,21 @@ const select = (id: string) => {
</a-list>
</a-collapse-panel>
<a-collapse-panel :header="$t('普通路线')">
<a-list rowKey="id" :data-source="routes.filter(({ route }) => route?.pass === MapRoutePassType.)">
<template #renderItem="{ item }">
<a-list-item
class="ph-16"
:class="{ selected: item.id === current }"
style="height: 36px"
@click="select(item.id)"
>
<a-typography-text type="secondary">{{ item.label }}</a-typography-text>
</a-list-item>
</template>
</a-list>
</a-collapse-panel>
<a-collapse-panel :header="$t('等待点')">
<a-list rowKey="id" :data-source="points.filter(({ point }) => point?.type === MapPointType.等待点)">
<template #renderItem="{ item }">
@ -203,6 +218,21 @@ const select = (id: string) => {
</template>
</a-list>
</a-collapse-panel>
<a-collapse-panel :header="$t('普通点')">
<a-list rowKey="id" :data-source="points.filter(({ point }) => point?.type === MapPointType.普通点)">
<template #renderItem="{ item }">
<a-list-item
class="ph-16"
:class="{ selected: item.id === current }"
style="height: 36px"
@click="select(item.id)"
>
<a-typography-text type="secondary">{{ item.label }}</a-typography-text>
</a-list-item>
</template>
</a-list>
</a-collapse-panel>
</template>
</a-collapse>
</a-flex>