style: Oxc 代码格式调整

This commit is contained in:
2026-05-27 14:22:21 +08:00
parent 0796250df8
commit 58012e43db
6 changed files with 71 additions and 64 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
{ {
"$schema": "./node_modules/oxfmt/configuration_schema.json", "$schema": "./node_modules/oxfmt/configuration_schema.json",
"semi": false, "semi": false,
"singleQuote": true "singleQuote": true,
"bracketSpacing": true
} }
+2
View File
@@ -36,6 +36,7 @@ declare module 'vue' {
NDataTable: typeof import('naive-ui')['NDataTable'] NDataTable: typeof import('naive-ui')['NDataTable']
NDrawer: typeof import('naive-ui')['NDrawer'] NDrawer: typeof import('naive-ui')['NDrawer']
NDrawerContent: typeof import('naive-ui')['NDrawerContent'] NDrawerContent: typeof import('naive-ui')['NDrawerContent']
NDynamicTags: typeof import('naive-ui')['NDynamicTags']
NEllipsis: typeof import('naive-ui')['NEllipsis'] NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty'] NEmpty: typeof import('naive-ui')['NEmpty']
NFlex: typeof import('naive-ui')['NFlex'] NFlex: typeof import('naive-ui')['NFlex']
@@ -106,6 +107,7 @@ declare global {
const NDataTable: typeof import('naive-ui')['NDataTable'] const NDataTable: typeof import('naive-ui')['NDataTable']
const NDrawer: typeof import('naive-ui')['NDrawer'] const NDrawer: typeof import('naive-ui')['NDrawer']
const NDrawerContent: typeof import('naive-ui')['NDrawerContent'] const NDrawerContent: typeof import('naive-ui')['NDrawerContent']
const NDynamicTags: typeof import('naive-ui')['NDynamicTags']
const NEllipsis: typeof import('naive-ui')['NEllipsis'] const NEllipsis: typeof import('naive-ui')['NEllipsis']
const NEmpty: typeof import('naive-ui')['NEmpty'] const NEmpty: typeof import('naive-ui')['NEmpty']
const NFlex: typeof import('naive-ui')['NFlex'] const NFlex: typeof import('naive-ui')['NFlex']
+8 -4
View File
@@ -15,7 +15,7 @@ import {useHead} from '@unhead/vue'
const pageHead = reactive({ const pageHead = reactive({
title: '正在加载聊天室...', title: '正在加载聊天室...',
titleTemplate: '%s | 聊天室 | NyaHome' titleTemplate: '%s | 聊天室 | NyaHome',
}) })
useHead(pageHead) useHead(pageHead)
@@ -92,6 +92,7 @@ function chat() {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
Authorization: `Bearer ${localStorage.getItem('access-token')}`,
}, },
body: JSON.stringify({ body: JSON.stringify({
message: inputMessage.value, message: inputMessage.value,
@@ -310,7 +311,8 @@ div.page-container {
border-radius: 5px; border-radius: 5px;
opacity: var(--opacity); opacity: var(--opacity);
transition: background-color 0.8s, transition:
background-color 0.8s,
transform 0.5s, transform 0.5s,
opacity 1s, opacity 1s,
height 0.5s, height 0.5s,
@@ -339,7 +341,8 @@ div.page-container {
position: relative; position: relative;
transition: transform 1s, transition:
transform 1s,
opacity 1s, opacity 1s,
flex-basis 1s; flex-basis 1s;
transform: translateX(var(--transform-x)); transform: translateX(var(--transform-x));
@@ -356,7 +359,8 @@ div.page-container {
background: rgb(0 0 0 / 0.1); background: rgb(0 0 0 / 0.1);
border-radius: 5px; border-radius: 5px;
transition: background-color 0.8s, transition:
background-color 0.8s,
transform 0.5s, transform 0.5s,
height 0.5s, height 0.5s,
width 0.5s, width 0.5s,
+2 -2
View File
@@ -6,10 +6,10 @@ import type {ChatroomPublic} from '@/types/chatroom.ts'
import type { ReturnDto } from '@/types/response.ts' import type { ReturnDto } from '@/types/response.ts'
import ChatroomCreatorModal from '@/components/chatroom/ChatroomCreatorModal.vue' import ChatroomCreatorModal from '@/components/chatroom/ChatroomCreatorModal.vue'
import { useNowUser } from '@/stores/now-user.ts' import { useNowUser } from '@/stores/now-user.ts'
import {useHead} from "@unhead/vue"; import { useHead } from '@unhead/vue'
useHead({ useHead({
title: "聊天室列表", title: '聊天室列表',
}) })
const NOWUSER = useNowUser() const NOWUSER = useNowUser()