在根目录下的 vite.config.ts 添加以下内容
1234567
export default defineConfig({ ... server: { host: '0.0.0.0', port: 8080, }})