直播管理
This commit is contained in:
@@ -12,16 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-if="tabindex==1">
|
||||
<LiveItem :type="2"></LiveItem>
|
||||
<LiveItem :type="2"></LiveItem>
|
||||
<LiveItem :type="2"></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem></LiveItem>
|
||||
<LiveItem :type="2" v-for="(i,j) in livelist" :key="j" :img="i.img" :title="i.title" :score="i.score" :date="i.starttime" :takehour="i.vodduration" :livenum="i.livenumber" :status="i.livestatus"></LiveItem>
|
||||
</div>
|
||||
|
||||
<div class="list" v-if="tabindex==2">
|
||||
@@ -144,24 +135,29 @@
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref } from "vue";
|
||||
import { defineComponent, onMounted, ref } from "vue";
|
||||
import LiveItem from "@/components/LiveItem.vue";
|
||||
import { getlivelist } from '@/api';
|
||||
import { LiveList } from '@/types';
|
||||
export default defineComponent({
|
||||
components: {
|
||||
LiveItem,
|
||||
},
|
||||
setup() {
|
||||
const page = ref(6);
|
||||
const page = ref(1);
|
||||
const tabindex = ref(1);
|
||||
getlivelist()
|
||||
const livelist=ref<Array<LiveList>>()
|
||||
onMounted(async ()=>{
|
||||
livelist.value= await getlivelist()
|
||||
})
|
||||
function tabchange(e: number): void {
|
||||
tabindex.value=e
|
||||
}
|
||||
return {
|
||||
page,
|
||||
tabindex,
|
||||
tabchange
|
||||
tabchange,
|
||||
livelist
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user