([]),
currentTab: ref(''),
@@ -115,7 +120,7 @@
async function getData() {
const { ip, port } = await getffmpegip()
const resData = await getDevices({
- base: Data.currentTab,
+ base_id: props.baseId ?? Data.currentTab,
type: 1,
status: 1,
is_recommend: 1,
@@ -140,12 +145,18 @@
if (currentVido.value.url == e.url) return
currentVido.value = e
}
+ const isBase = computed(() => !!props.baseId)
onBeforeMount(() => {
- getTabs()
+ if (isBase.value) {
+ getData()
+ } else {
+ getTabs()
+ }
})
return {
+ isBase,
onChangeVideo,
currentVido,
...toRefs(Data),