fix: 添加默认激活状态到折叠面板,优化组件的初始显示逻辑
This commit is contained in:
parent
81055f7df2
commit
2e5dd24f39
@ -43,12 +43,12 @@ const select = (id: string) => {
|
||||
</template>
|
||||
</a-input>
|
||||
|
||||
<a-collapse style="flex: auto; overflow-y: auto" expand-icon-position="end" ghost>
|
||||
<a-collapse style="flex: auto; overflow-y: auto" expand-icon-position="end" ghost defaultActiveKey="defaultActive">
|
||||
<template #expandIcon="v">
|
||||
<i class="icon dropdown" :class="{ active: v?.isActive }" />
|
||||
</template>
|
||||
|
||||
<a-collapse-panel v-if="onlyArea1" :header="$t('库区')">
|
||||
<a-collapse-panel v-if="onlyArea1" :header="$t('库区')" key="defaultActive">
|
||||
<a-list rowKey="id" :data-source="areas.filter(({ area }) => area?.type === MapAreaType.库区)">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item
|
||||
|
@ -170,12 +170,12 @@ const toRemoveRobots = () =>
|
||||
</a-space>
|
||||
</a-flex>
|
||||
|
||||
<a-collapse style="flex: auto; overflow-y: auto" expand-icon-position="end" ghost>
|
||||
<a-collapse style="flex: auto; overflow-y: auto" expand-icon-position="end" ghost defaultActiveKey="defaultActive">
|
||||
<template #expandIcon="v">
|
||||
<i class="icon dropdown" :class="{ active: v?.isActive }" />
|
||||
</template>
|
||||
|
||||
<a-collapse-panel v-for="{ id, label, robots } in groups" :key="id">
|
||||
<a-collapse-panel v-for="({ id, label, robots }, index) in groups" :key="index === 0 ? 'defaultActive' : id">
|
||||
<template v-if="editable" #extra>
|
||||
<a-dropdown placement="bottomRight">
|
||||
<a-button class="icon-btn" size="small" @click.stop>
|
||||
|
Loading…
x
Reference in New Issue
Block a user