Skip to content

Commit 7e0c6ec

Browse files
committed
修改前端ui
1 parent e4cae03 commit 7e0c6ec

33 files changed

Lines changed: 2782 additions & 896 deletions

app.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ func (a *App) startup(ctx context.Context) {
2121
a.ctx = ctx
2222
}
2323

24-
// Greet returns a greeting for the given name
25-
func (a *App) Greet(name string) string {
26-
27-
return fmt.Sprintf("Hello %s, It's show time!", name)
28-
}
29-
3024
// 一个简单供前端调用的函数
3125
func (a *App) G_获取游戏名称(搜索关键词 string) map[string]string {
3226

frontend/.browserslistrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> 1%
2+
last 2 versions
3+
not dead
4+
not ie 11

frontend/.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
2+
charset = utf-8
3+
indent_size = 2
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true

frontend/.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
# Editor directories and files
16+
.idea
17+
.vscode
18+
*.suo
19+
*.ntvs*
20+
*.njsproj
21+
*.sln
22+
*.sw?

frontend/README.md

Lines changed: 74 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,81 @@
1-
# Vue 3 + TypeScript + Vite
1+
# Vuetify (Default)
22

3-
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue
4-
3 `<script setup>` SFCs, check out
5-
the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3+
This is the official scaffolding tool for Vuetify, designed to give you a head start in building your new Vuetify application. It sets up a base template with all the necessary configurations and standard directory structure, enabling you to begin development without the hassle of setting up the project from scratch.
64

7-
## Recommended IDE Setup
5+
## ❗️ Important Links
86

9-
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
7+
- 📄 [Docs](https://vuetifyjs.com/)
8+
- 🚨 [Issues](https://issues.vuetifyjs.com/)
9+
- 🏬 [Store](https://store.vuetifyjs.com/)
10+
- 🎮 [Playground](https://play.vuetifyjs.com/)
11+
- 💬 [Discord](https://community.vuetifyjs.com)
1012

11-
## Type Support For `.vue` Imports in TS
13+
## 💿 Install
1214

13-
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type
14-
by default. In most cases this is fine if you don't really care about component prop types outside of templates.
15-
However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using
16-
manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
15+
Set up your project using your preferred package manager. Use the corresponding command to install the dependencies:
1716

18-
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look
19-
for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default,
20-
Take Over mode will enable itself if the default TypeScript extension is disabled.
21-
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
17+
| Package Manager | Command |
18+
|---------------------------------------------------------------|----------------|
19+
| [yarn](https://yarnpkg.com/getting-started) | `yarn install` |
20+
| [npm](https://docs.npmjs.com/cli/v7/commands/npm-install) | `npm install` |
21+
| [pnpm](https://pnpm.io/installation) | `pnpm install` |
22+
| [bun](https://bun.sh/#getting-started) | `bun install` |
2223

23-
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
24+
After completing the installation, your environment is ready for Vuetify development.
25+
26+
## ✨ Features
27+
28+
- 🖼️ **Optimized Front-End Stack**: Leverage the latest Vue 3 and Vuetify 3 for a modern, reactive UI development experience. [Vue 3](https://v3.vuejs.org/) | [Vuetify 3](https://vuetifyjs.com/en/)
29+
- 🗃️ **State Management**: Integrated with [Pinia](https://pinia.vuejs.org/), the intuitive, modular state management solution for Vue.
30+
- 🚦 **Routing and Layouts**: Utilizes Vue Router for SPA navigation and vite-plugin-vue-layouts for organizing Vue file layouts. [Vue Router](https://router.vuejs.org/) | [vite-plugin-vue-layouts](https://github.com/JohnCampionJr/vite-plugin-vue-layouts)
31+
- 💻 **Enhanced Development Experience**: Benefit from TypeScript's static type checking and the ESLint plugin suite for Vue, ensuring code quality and consistency. [TypeScript](https://www.typescriptlang.org/) | [ESLint Plugin Vue](https://eslint.vuejs.org/)
32+
-**Next-Gen Tooling**: Powered by Vite, experience fast cold starts and instant HMR (Hot Module Replacement). [Vite](https://vitejs.dev/)
33+
- 🧩 **Automated Component Importing**: Streamline your workflow with unplugin-vue-components, automatically importing components as you use them. [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components)
34+
- 🛠️ **Strongly-Typed Vue**: Use vue-tsc for type-checking your Vue components, and enjoy a robust development experience. [vue-tsc](https://github.com/johnsoncodehk/volar/tree/master/packages/vue-tsc)
35+
36+
These features are curated to provide a seamless development experience from setup to deployment, ensuring that your Vuetify application is both powerful and maintainable.
37+
38+
## 💡 Usage
39+
40+
This section covers how to start the development server and build your project for production.
41+
42+
### Starting the Development Server
43+
44+
To start the development server with hot-reload, run the following command. The server will be accessible at [http://localhost:3000](http://localhost:3000):
45+
46+
```bash
47+
yarn dev
48+
```
49+
50+
(Repeat for npm, pnpm, and bun with respective commands.)
51+
52+
> Add NODE_OPTIONS='--no-warnings' to suppress the JSON import warnings that happen as part of the Vuetify import mapping. If you are on Node [v21.3.0](https://nodejs.org/en/blog/release/v21.3.0) or higher, you can change this to NODE_OPTIONS='--disable-warning=5401'. If you don't mind the warning, you can remove this from your package.json dev script.
53+
54+
### Building for Production
55+
56+
To build your project for production, use:
57+
58+
```bash
59+
yarn build
60+
```
61+
62+
(Repeat for npm, pnpm, and bun with respective commands.)
63+
64+
Once the build process is completed, your application will be ready for deployment in a production environment.
65+
66+
## 💪 Support Vuetify Development
67+
68+
This project is built with [Vuetify](https://vuetifyjs.com/en/), a UI Library with a comprehensive collection of Vue components. Vuetify is an MIT licensed Open Source project that has been made possible due to the generous contributions by our [sponsors and backers](https://vuetifyjs.com/introduction/sponsors-and-backers/). If you are interested in supporting this project, please consider:
69+
70+
- [Requesting Enterprise Support](https://support.vuetifyjs.com/)
71+
- [Sponsoring John on Github](https://github.com/users/johnleider/sponsorship)
72+
- [Sponsoring Kael on Github](https://github.com/users/kaelwd/sponsorship)
73+
- [Supporting the team on Open Collective](https://opencollective.com/vuetify)
74+
- [Becoming a sponsor on Patreon](https://www.patreon.com/vuetify)
75+
- [Becoming a subscriber on Tidelift](https://tidelift.com/subscription/npm/vuetify)
76+
- [Making a one-time donation with Paypal](https://paypal.me/vuetify)
77+
78+
## 📑 License
79+
[MIT](http://opensource.org/licenses/MIT)
80+
81+
Copyright (c) 2016-present Vuetify, LLC

frontend/bun.lockb

110 KB
Binary file not shown.

frontend/components.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
// Generated by unplugin-vue-components
4+
// Read more: https://github.com/vuejs/core/pull/3399
5+
export {}
6+
7+
/* prettier-ignore */
8+
declare module 'vue' {
9+
export interface GlobalComponents {
10+
Home: typeof import('./src/components/Home.vue')['default']
11+
}
12+
}

frontend/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

frontend/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8"/>
5-
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
6-
<title>my-test-app</title>
7-
</head>
8-
<body>
9-
<div id="app"></div>
10-
<script src="./src/main.ts" type="module"></script>
11-
</body>
3+
<head>
4+
<meta charset="UTF-8">
5+
<link rel="icon" href="/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Welcome to Vuetify 3</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
1213
</html>
13-

0 commit comments

Comments
 (0)