Commit 0ec49a0a2864f16ea76a1827be35225f39da103f
Merge branch 'perf/report' into 'main_dev'
perf: 优化报表配置选择设备,超出数量提示信息 See merge request yunteng/thingskit-front!1310
Showing
1 changed file
with
4 additions
and
1 deletions
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 | import SelectAttributes from './SelectAttributes.vue'; |
| 26 | 26 | import { TDeviceList, TSelectOption } from '../type'; |
| 27 | 27 | import { createPickerSearch } from '/@/utils/pickerSearch'; |
| 28 | + import { useMessage } from '/@/hooks/web/useMessage'; | |
| 28 | 29 | |
| 29 | 30 | const props = defineProps({ |
| 30 | 31 | selectOptions: { |
| ... | ... | @@ -37,6 +38,8 @@ |
| 37 | 38 | }, |
| 38 | 39 | }); |
| 39 | 40 | |
| 41 | + const { createMessage } = useMessage(); | |
| 42 | + | |
| 40 | 43 | const selectValue = ref([]); |
| 41 | 44 | |
| 42 | 45 | const bindDeviceRef = { |
| ... | ... | @@ -52,7 +55,7 @@ |
| 52 | 55 | }; |
| 53 | 56 | |
| 54 | 57 | const handleDeviceChange = (_, options) => { |
| 55 | - if (options.length > selectDeviceMaxCount.value) return; | |
| 58 | + if (options.length > selectDeviceMaxCount.value) return createMessage.warn('最大限制选择5个'); | |
| 56 | 59 | deviceList.value = options; |
| 57 | 60 | }; |
| 58 | 61 | ... | ... |