| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { deviceList } from '@/constant/device-type'; |
| | | // import { deviceList } from '@/constant/device-type'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useDeviceStore } from '@/stores/device'; |
| | | |
| | |
| | | type: String, |
| | | modelValue: String |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | emits: ['update:modelValue', 'initOver'], |
| | | data() { |
| | | return {}; |
| | | }, |
| | |
| | | this.deviceStore.fetchDevice().then((res) => { |
| | | if (res.success && res.data.length > 0) { |
| | | this.handleChange(this.deviceOptions[0].value); |
| | | this.$emit('initOver'); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.fetchDevice(); |
| | | } else { |
| | | this.handleChange(this.deviceOptions[0].value); |
| | | this.$emit('initOver'); |
| | | } |
| | | } |
| | | }; |