From 11283e9ca180d77e203870d33859c3e1fbf3edb4 Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Thu, 16 Apr 2026 09:21:21 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=88=9B=E5=BB=BA=E4=B8=AD=E6=96=87REA?= =?UTF-8?q?DME=E6=96=87=E6=A1=A3=EF=BC=8C=E6=BB=A1=E8=B6=B3issue=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 332 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 329 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1511959..8960712 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,331 @@ -# Vue 3 + Vite +# CSGO 管理后台 -This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` +``` + +### API 请求示例 + +```javascript +// src/api/modules/user.js +import { request } from '../request' + +export const getUserList = (params) => { + return request.get('/api/users', { params }) +} + +export const login = (data) => { + return request.post('/api/login', data) +} +``` + +### 状态管理示例 + +```javascript +// src/store/modules/user.js +import { defineStore } from 'pinia' + +export const useUserStore = defineStore('user', { + state: () => ({ + userInfo: null, + token: '' + }), + + actions: { + setUserInfo(info) { + this.userInfo = info + }, + setToken(token) { + this.token = token + } + } +}) +``` + +### 使用 Store + +```vue + +``` + +--- + +## 常用命令 + +| 命令 | 说明 | +|------|------| +| `npm run dev` | 启动开发服务器 | +| `npm run build` | 构建生产版本 | +| `npm run preview` | 预览生产构建 | + +--- + +## 相关文档 + +- [Vue 3 官方文档](https://cn.vuejs.org/) +- [Vite 官方文档](https://vitejs.dev/) +- [PrimeVue 官方文档](https://primevue.org/) +- [PrimeIcons 图标库](https://primeicons.org/) +- [Tailwind CSS 官方文档](https://tailwindcss.com/docs) +- [Vue Router 文档](https://router.vuejs.org/zh/) +- [Pinia 文档](https://pinia.vuejs.org/zh/) +- [Axios 文档](https://axios-http.com/docs/intro) + +--- + +## 许可证 + +MIT License \ No newline at end of file -- Gitee