1
0
forked from dyf/dyf-vue-ui
This commit is contained in:
fengerli
2025-09-01 17:02:21 +08:00
parent 031f6135c1
commit 3782f73215
6 changed files with 59 additions and 41 deletions

View File

@ -39,9 +39,10 @@
</template>
<script setup lang="ts">
import {deviceVO } from '@/api/controlCenter/controlPanel/types';
const props = defineProps({
deviceList: {
type: Array,
type: Array as PropType<deviceVO[]>, // 用PropType指定数组元素为DeviceItem
required: false,
default: () => [] // 数组/对象类型的默认值必须用函数返回,避免引用共享
}
@ -54,7 +55,7 @@ declare var AMap: any;
const mapRef = ref<HTMLDivElement | null>(null);
let mapInstance: any = null;
// 复选框状态管理
const checkedDeviceIds = ref(); // 存储选中的设备ID
const checkedDeviceIds = ref(); // 存储选中的设备ID
const checkAll = ref(false); // 全选状态
// 全选/取消全选
const handleCheckAllChange = (val: boolean) => {