fix?:use [] not {}

This commit is contained in:
Tianpao
2025-11-22 02:05:01 +08:00
parent d2dc4222b5
commit 5055f2bf6d

View File

@@ -60,7 +60,7 @@ async function fetchUserInfo() {
async function fetchNodes() {
loadingNodes.value = true
try {
const {data} = await listNodes()
const [data] = await listNodes()
nodeList.value = data
} catch (e: any) {
console.error('获取节点失败:', e)
@@ -93,7 +93,7 @@ async function handleToggleNodeStatus(node: any) {
async function fetchApiKeys() {
loadingApiKeys.value = true
try {
const {data} = await listApiKeys()
const [data] = await listApiKeys()
apiKeys.value = data
} catch (e: any) {
@@ -140,7 +140,7 @@ async function fetchAdmins() {
if (!isAdmin.value) return
loadingAdmins.value = true
try {
const { data } = await listAdmins()
const [ data ] = await listAdmins()
userList.value = data
} catch (e: any) {