diff --git a/components.d.ts b/components.d.ts index 9d7db13..c479123 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,11 +10,11 @@ declare module 'vue' { Confirm: typeof import('./src/components/Confirm.vue')['default'] ElButton: typeof import('element-plus/es')['ElButton'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] - ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] - ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElFooter: typeof import('element-plus/es')['ElFooter'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ErrorModal: typeof import('./src/components/dialogs/ErrorModal.vue')['default'] Keyboard: typeof import('./src/components/Keyboard.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] @@ -22,4 +22,7 @@ declare module 'vue' { SimpleKeyboard: typeof import('./src/components/SimpleKeyboard.vue')['default'] StackInfoModal: typeof import('./src/components/dialogs/StackInfoModal.vue')['default'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } diff --git a/src/utils/getServerInfo.ts b/src/utils/getServerInfo.ts index b413673..9b1481b 100644 --- a/src/utils/getServerInfo.ts +++ b/src/utils/getServerInfo.ts @@ -8,7 +8,7 @@ export function getServerInfo(wsPath: string = '/api/v1/app/ws/state') { const host = window.location.hostname; // const host = "192.168.1.119"; // const port = '8082' // 使用固定的后端端口;由于本地开发时,8080被占用导致ws连接失败,所以使用8082 - const port = "80" + const port = "8888" // 构建 WebSocket URL const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' const wsUrl = `${wsProtocol}//${host}:${port}${wsPath}` diff --git a/vite.config.ts b/vite.config.ts index 5f247fd..e47006a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,7 +35,7 @@ export default defineConfig({ server: { proxy: { '/api': { - target: 'http://localhost', + target: 'http://localhost:8888', changeOrigin: true, // rewrite: (path) => path.replace(/^\/api/, ''), },