commit 28c1110344c149a176457c640a82ccc2722f7cdc Author: 徐勤民 Date: Thu Apr 30 16:59:06 2026 +0800 feat: initial Vue3 SDK Demo application - Login page with quick user selection - Real-time chat with WebSocket (STOMP) - Conversation/friend/group list sidebar - API test console with operation logs - Integration with local dev environment diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7ac8ea1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +dist +.DS_Store +*.log diff --git a/index.html b/index.html new file mode 100644 index 0000000..5754fc9 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Vue3 SDK Demo + + +
+ + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..13e5c65 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "xuqmgroup-vue3-sdk-demo", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vue-tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.5.13", + "element-plus": "^2.9.1", + "@element-plus/icons-vue": "^2.3.1" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.2.3", + "typescript": "^5.8.2", + "vite": "^6.2.2", + "vue-tsc": "^2.2.8" + } +} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..94828b3 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..0a1fc1f --- /dev/null +++ b/src/main.ts @@ -0,0 +1,17 @@ +import { createApp } from 'vue' +import ElementPlus from 'element-plus' +import 'element-plus/dist/index.css' +import App from './App.vue' +import { init } from '@xuqm/vue3-sdk' + +init({ + appKey: 'ak_demo_chat', + appSecret: 'as_demo_secret', + debug: true, + baseUrl: 'http://192.168.113.37:8082', + wsUrl: 'ws://192.168.113.37:8082/ws/im', +}) + +const app = createApp(App) +app.use(ElementPlus) +app.mount('#app') diff --git a/src/views/ChatDemoView.vue b/src/views/ChatDemoView.vue new file mode 100644 index 0000000..3b43fa0 --- /dev/null +++ b/src/views/ChatDemoView.vue @@ -0,0 +1,699 @@ + + + + + diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue new file mode 100644 index 0000000..23d8704 --- /dev/null +++ b/src/views/LoginView.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..33099e8 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "jsx": "preserve", + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": true, + "esModuleInterop": true, + "lib": ["ESNext", "DOM"], + "skipLibCheck": true, + "noEmit": true, + "baseUrl": ".", + "paths": { "@/*": ["src/*"] } + }, + "include": ["src/**/*.ts", "src/**/*.vue"] +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..d38be40 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,17 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import { resolve } from 'path' + +export default defineConfig({ + plugins: [vue()], + resolve: { + alias: { + '@': resolve(__dirname, 'src'), + '@xuqm/vue3-sdk': resolve(__dirname, '../XuqmGroup-Vue3SDK/src/index.ts'), + }, + }, + server: { + port: 5173, + host: true, + }, +})