mirror of
https://github.com/HuLaSpark/HuLa.git
synced 2026-09-24 23:11:59 +08:00
style(component): 💄 移除一些log
This commit is contained in:
@@ -19,13 +19,13 @@
|
||||
@mouseenter="isAnnouncementHover = true"
|
||||
@mouseleave="isAnnouncementHover = false">
|
||||
<n-flex :wrap="false" class="w-full" align="center" justify="space-between">
|
||||
<n-flex :wrap="false" align="center" class="pl-12px" :size="6">
|
||||
<n-flex :wrap="false" align="center" class="pl-12px select-none" :size="6">
|
||||
<svg class="size-16px flex-shrink-0"><use href="#Loudspeaker"></use></svg>
|
||||
<div style="max-width: calc(100vw - 630px)" class="line-clamp-1 text-(12px [--chat-text-color])">
|
||||
{{ topAnnouncement.content }}
|
||||
</div>
|
||||
</n-flex>
|
||||
<div class="flex-shrink-0 w-60px" @click="handleViewAnnouncement">
|
||||
<div class="flex-shrink-0 w-60px select-none" @click="handleViewAnnouncement">
|
||||
<p class="text-(12px #13987f) cursor-pointer">查看全部</p>
|
||||
</div>
|
||||
</n-flex>
|
||||
|
||||
@@ -347,17 +347,10 @@ const handleOpenAnnoun = (isAdd: boolean) => {
|
||||
*/
|
||||
// TODO:这里会出现把上一次的内容连贯起来一起打印,会出现打印好几十次的情况
|
||||
const handleLoadGroupAnnoun = async (roomId: string, reload: boolean) => {
|
||||
// 判断是否是群主管理员
|
||||
console.log('是否是群主:', isLord.value)
|
||||
console.log('是否是管理员:', isAdmin.value)
|
||||
// 设置是否可以添加公告
|
||||
isAddAnnoun.value = isLord.value || isAdmin.value || hasBadge6.value!
|
||||
console.log('是否可以添加公告:', isAddAnnoun.value)
|
||||
|
||||
console.log('handleLoadGroupAnnoun-获取群公告列表:', roomId)
|
||||
// 获取群公告列表
|
||||
const data = await groupStore.getGroupAnnouncementList(roomId, 1, 10, reload)
|
||||
console.log('获取群公告列表:', data)
|
||||
if (data) {
|
||||
announList.value = data.records
|
||||
// 处理置顶公告
|
||||
|
||||
+1
-1
@@ -220,7 +220,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/announList/:roomId/:type',
|
||||
name: 'announList',
|
||||
component: () => import('@/views/announWindow/AnnounList.vue')
|
||||
component: () => import('@/views/announWindow/index.vue')
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -256,11 +256,9 @@ export const useCachedStore = defineStore(StoresEnum.CACHED, () => {
|
||||
* 如果请求失败,则返回空数组
|
||||
*/
|
||||
const getGroupAnnouncementList = async (roomId: string, page: number, size: number, reload: boolean) => {
|
||||
console.log('group-获取群公告', roomId, reload)
|
||||
if (localStorage.getItem('GroupAnnouncementList') && !reload) {
|
||||
// 如果有缓存且不需要重新加载,则直接从缓存中获取
|
||||
const localList = JSON.parse(localStorage.getItem('GroupAnnouncementList') || '{}')
|
||||
console.log('localList', localList)
|
||||
if (localList[roomId]) {
|
||||
return localList[roomId] || []
|
||||
}
|
||||
|
||||
@@ -179,7 +179,6 @@
|
||||
border: 1px solid var(--bg-notice, rgba(19, 152, 127, 0.2));
|
||||
margin: 6px 12px 0 12px;
|
||||
height: 34px;
|
||||
user-select: none;
|
||||
transition: all 0.3s ease-in-out;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@@ -227,7 +227,6 @@ const handleInit = async (reload: boolean) => {
|
||||
pageNum.value = 1
|
||||
const data = await groupStore.getGroupAnnouncementList(roomId.value, pageNum.value, pageSize, reload)
|
||||
if (data) {
|
||||
console.log('data', data)
|
||||
announList.value = data.records
|
||||
if (announList.value.length === 0) {
|
||||
viewType.value = '0'
|
||||
@@ -375,7 +374,6 @@ const handleDel = async (announcement: any) => {
|
||||
|
||||
// 编辑公告
|
||||
const handleEdit = (announcement: any) => {
|
||||
console.log('edit:', announcement)
|
||||
isEdit.value = true
|
||||
editAnnoouncement.value = announcement
|
||||
announContent.value = announcement.content
|
||||
@@ -387,7 +385,6 @@ const handleEdit = (announcement: any) => {
|
||||
|
||||
// 验证公告内容
|
||||
const validateAnnouncement = (content: string) => {
|
||||
console.log('content', content)
|
||||
if (content.length < 1) {
|
||||
window.$message.error('公告内容不能为空')
|
||||
return false
|
||||
@@ -480,7 +477,6 @@ onMounted(async () => {
|
||||
await currentWindow.show()
|
||||
await currentWindow.setFocus()
|
||||
title.value = await currentWindow.title()
|
||||
console.log('title', title.value)
|
||||
}, 200)
|
||||
} catch (error) {
|
||||
console.error('组件挂载初始化失败:', error)
|
||||
Reference in New Issue
Block a user