mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
fix order filter
This commit is contained in:
@@ -13,8 +13,32 @@ const message = useMessage()
|
|||||||
|
|
||||||
const client = new DanmakuClient(null)
|
const client = new DanmakuClient(null)
|
||||||
const isClientLoading = ref(true)
|
const isClientLoading = ref(true)
|
||||||
|
let bc: BroadcastChannel
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
if (window.BroadcastChannel) {
|
||||||
|
bc = new BroadcastChannel('vtsuru.danmaku')
|
||||||
|
let isCreated = false
|
||||||
|
bc.onmessage = (event) => {
|
||||||
|
switch (event.data) {
|
||||||
|
case 'ping':
|
||||||
|
bc.postMessage('pong')
|
||||||
|
break
|
||||||
|
case 'pong': //已存在其他客户端
|
||||||
|
if (!isCreated) {
|
||||||
|
isCreated = true
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'danmaku':
|
||||||
|
props.component.props?.onDanmaku?.(event.type)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bc.postMessage('ping')
|
||||||
|
setTimeout(() => {
|
||||||
|
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
const result = await client.Start()
|
const result = await client.Start()
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
message.error('无法启动弹幕客户端: ' + result.message)
|
message.error('无法启动弹幕客户端: ' + result.message)
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ interface EventModel {
|
|||||||
time: number
|
time: number
|
||||||
num: number
|
num: number
|
||||||
price: number
|
price: number
|
||||||
|
uface: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const accountInfo = useAccount()
|
const accountInfo = useAccount()
|
||||||
@@ -241,7 +242,7 @@ function objectsToCSV(arr: any[]) {
|
|||||||
lazy
|
lazy
|
||||||
borderd
|
borderd
|
||||||
:size="64"
|
:size="64"
|
||||||
:src="AVATAR_URL + item.uid"
|
:src="item.uid ? AVATAR_URL + item.uid : item.uface"
|
||||||
:img-props="{ referrerpolicy: 'no-referrer' }"
|
:img-props="{ referrerpolicy: 'no-referrer' }"
|
||||||
style="box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2)"
|
style="box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NSpin :show="isLoading">
|
<NSpin :show="isLoading">
|
||||||
<NEmpty v-if="filteredOrders.length == 0" description="暂无订单"></NEmpty>
|
<NEmpty v-if="orders.length == 0" description="暂无订单"></NEmpty>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<br />
|
<br />
|
||||||
<NFlex>
|
<NFlex>
|
||||||
|
|||||||
Reference in New Issue
Block a user