feat(scene-editor): 增加楼层删除功能,优化楼层输入界面布局
This commit is contained in:
parent
dbb8ed4172
commit
02f63797a8
@ -332,6 +332,10 @@ const addFloor = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const removeFloor = (index: number) => {
|
||||||
|
floorImportList.value.splice(index, 1);
|
||||||
|
};
|
||||||
|
|
||||||
const openImportModal = () => {
|
const openImportModal = () => {
|
||||||
importMode.value = 'floor'; // 默认使用分区域模式
|
importMode.value = 'floor'; // 默认使用分区域模式
|
||||||
importModalVisible.value = true;
|
importModalVisible.value = true;
|
||||||
@ -874,7 +878,12 @@ const handleFloorChange = async (value: any) => {
|
|||||||
<!-- 分区域/楼层模式的内容将在这里添加 -->
|
<!-- 分区域/楼层模式的内容将在这里添加 -->
|
||||||
<div>
|
<div>
|
||||||
<div v-for="(floor, index) in floorImportList" :key="index" class="floor-uploader-item">
|
<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
|
<a-upload-dragger
|
||||||
v-model:fileList="floor.fileList"
|
v-model:fileList="floor.fileList"
|
||||||
name="file"
|
name="file"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user