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 isClientLoading = ref(true)
|
||||
let bc: BroadcastChannel
|
||||
|
||||
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()
|
||||
if (!result.success) {
|
||||
message.error('无法启动弹幕客户端: ' + result.message)
|
||||
|
||||
@@ -48,6 +48,7 @@ interface EventModel {
|
||||
time: number
|
||||
num: number
|
||||
price: number
|
||||
uface: string
|
||||
}
|
||||
|
||||
const accountInfo = useAccount()
|
||||
@@ -241,7 +242,7 @@ function objectsToCSV(arr: any[]) {
|
||||
lazy
|
||||
borderd
|
||||
:size="64"
|
||||
:src="AVATAR_URL + item.uid"
|
||||
:src="item.uid ? AVATAR_URL + item.uid : item.uface"
|
||||
:img-props="{ referrerpolicy: 'no-referrer' }"
|
||||
style="box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2)"
|
||||
/>
|
||||
|
||||
@@ -106,7 +106,7 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<NSpin :show="isLoading">
|
||||
<NEmpty v-if="filteredOrders.length == 0" description="暂无订单"></NEmpty>
|
||||
<NEmpty v-if="orders.length == 0" description="暂无订单"></NEmpty>
|
||||
<template v-else>
|
||||
<br />
|
||||
<NFlex>
|
||||
|
||||
Reference in New Issue
Block a user