Commit c1105ebeba4a1a4a89aad539885d0dbe53da5e82

Authored by fengwotao
1 parent 10ca76d7

fix: 修改报表配置设备数限制5个

... ... @@ -45,11 +45,14 @@
45 45
46 46 const deviceList: Ref<TDeviceList[]> = ref([]);
47 47
  48 + const selectDeviceMaxCount = ref(5); // 限制设备数为5
  49 +
48 50 const getSelectAttributes = () => {
49 51 return unref(bindDeviceRef.deviceAttrRef)?.map((item: any) => item.emitChange());
50 52 };
51 53
52 54 const handleDeviceChange = (_, options) => {
  55 + if (options.length > selectDeviceMaxCount.value) return;
53 56 deviceList.value = options;
54 57 };
55 58
... ...