Showing
1 changed file
with
4 additions
and
1 deletions
@@ -25,6 +25,7 @@ | @@ -25,6 +25,7 @@ | ||
25 | import SelectAttributes from './SelectAttributes.vue'; | 25 | import SelectAttributes from './SelectAttributes.vue'; |
26 | import { TDeviceList, TSelectOption } from '../type'; | 26 | import { TDeviceList, TSelectOption } from '../type'; |
27 | import { createPickerSearch } from '/@/utils/pickerSearch'; | 27 | import { createPickerSearch } from '/@/utils/pickerSearch'; |
28 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
28 | 29 | ||
29 | const props = defineProps({ | 30 | const props = defineProps({ |
30 | selectOptions: { | 31 | selectOptions: { |
@@ -37,6 +38,8 @@ | @@ -37,6 +38,8 @@ | ||
37 | }, | 38 | }, |
38 | }); | 39 | }); |
39 | 40 | ||
41 | + const { createMessage } = useMessage(); | ||
42 | + | ||
40 | const selectValue = ref([]); | 43 | const selectValue = ref([]); |
41 | 44 | ||
42 | const bindDeviceRef = { | 45 | const bindDeviceRef = { |
@@ -52,7 +55,7 @@ | @@ -52,7 +55,7 @@ | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | const handleDeviceChange = (_, options) => { | 57 | const handleDeviceChange = (_, options) => { |
55 | - if (options.length > selectDeviceMaxCount.value) return; | 58 | + if (options.length > selectDeviceMaxCount.value) return createMessage.warn('最大限制选择5个'); |
56 | deviceList.value = options; | 59 | deviceList.value = options; |
57 | }; | 60 | }; |
58 | 61 |