Commit 00835b21 by pangchong

feat: 优化

parent ac29042a
<template> <template>
<div class="w-full h-full flex justify-center items-center flex-col absolute bg-theme-bg3 z-[999]"> <div class="w-full h-full flex justify-center items-center flex-col absolute bg-theme-bg3 z-[999]">
<global-avatar :avatar-size="124" :icon-size="32"></global-avatar> <global-avatar :avatar-size="124" :icon-size="32"></global-avatar>
<div class="text-4xl font-medium mt-8 mb-2 text-theme-text1">{{chattersName.join('、')}}</div> <div class="text-4xl font-medium mt-8 mb-2 text-theme-text1">{{ chattersName.join('、') }}</div>
<div v-if="chatChannelState.currentState === CallState.callIn" class="text-2xl font-medium mb-8 text-theme-text3">正在呼叫你...</div> <div class="text-2xl font-medium mb-8 text-theme-text3">{{ chatChannelState.currentState === CallState.callIn ? '正在呼叫你...' : '正在呼叫' }}</div>
<div v-else class="text-2xl font-medium mb-8 text-theme-text3">正在呼叫</div>
<a-space :size="32"> <a-space :size="32">
<template v-if="chatChannelState.currentState === CallState.callIn"> <template v-if="chatChannelState.currentState === CallState.callIn">
<a-button shape="circle" status="success" type="primary" @click="acceptCall"> <a-button shape="circle" status="success" type="primary" @click="acceptCall">
...@@ -23,14 +22,14 @@ ...@@ -23,14 +22,14 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {useAnyR} from "AnyR/index"; import { useAnyR } from 'AnyR/index'
import {chatChannelState} from "AnyR/states/chatChannelStates"; import { chatChannelState } from 'AnyR/states/chatChannelStates'
import {CallState} from "AnyR/constants/chatChannelRelated"; import { CallState } from 'AnyR/constants/chatChannelRelated'
import {allOtherChattersIdSet} from "AnyR/states/chatChannelStates"; import { allOtherChattersIdSet } from 'AnyR/states/chatChannelStates'
import {userStates} from "AnyR/states/wsStates"; import { userStates } from 'AnyR/states/wsStates'
import {computed} from "vue"; import { computed } from 'vue'
const AnyR = useAnyR(); const AnyR = useAnyR()
const chattersName = computed(function () { const chattersName = computed(function () {
return allOtherChattersIdSet.value.map(function (a: any) { return allOtherChattersIdSet.value.map(function (a: any) {
...@@ -48,9 +47,8 @@ function refuseCall() { ...@@ -48,9 +47,8 @@ function refuseCall() {
} }
function cancelCall() { function cancelCall() {
AnyR?.agora.cancelCurrentCall(); AnyR?.agora.cancelCurrentCall()
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.arco-btn { .arco-btn {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment