feat(scene-editor): 增加楼层删除功能,优化楼层输入界面布局

This commit is contained in:
xudan 2025-10-23 14:16:23 +08:00
parent dbb8ed4172
commit 02f63797a8

View File

@ -332,6 +332,10 @@ const addFloor = () => {
});
};
const removeFloor = (index: number) => {
floorImportList.value.splice(index, 1);
};
const openImportModal = () => {
importMode.value = 'floor'; // 使
importModalVisible.value = true;
@ -874,7 +878,12 @@ const handleFloorChange = async (value: any) => {
<!-- 分区域/楼层模式的内容将在这里添加 -->
<div>
<div v-for="(floor, index) in floorImportList" :key="index" class="floor-uploader-item">
<a-input v-model:value="floor.name" placeholder="楼层/区域名称" style="width: 120px; margin-bottom: 8px" />
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px">
<a-input v-model:value="floor.name" placeholder="楼层/区域名称" style="width: 120px" />
<a-button v-if="floorImportList.length > 1 && index !== 0" type="link" danger @click="removeFloor(index)">
删除
</a-button>
</div>
<a-upload-dragger
v-model:fileList="floor.fileList"
name="file"