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