-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
3,999 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
# frontend | ||
# Vue 3 + TypeScript + Vite | ||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn serve | ||
``` | ||
## Recommended IDE Setup | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn build | ||
``` | ||
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) | ||
|
||
### Run your unit tests | ||
``` | ||
yarn test:unit | ||
``` | ||
## Type Support For `.vue` Imports in TS | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn lint | ||
``` | ||
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps: | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). | ||
1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled. | ||
2. Reload the VS Code window by running `Developer: Reload Window` from the command palette. | ||
|
||
You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Generated by 'unplugin-auto-import' | ||
// We suggest you to commit this file into source control | ||
declare global { | ||
const ElNotification: typeof import('element-plus/es')['ElNotification'] | ||
} | ||
export {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// generated by unplugin-vue-components | ||
// We suggest you to commit this file into source control | ||
// Read more: https://github.com/vuejs/vue-next/pull/3399 | ||
import '@vue/runtime-core' | ||
|
||
declare module '@vue/runtime-core' { | ||
export interface GlobalComponents { | ||
ElAlert: typeof import('element-plus/es')['ElAlert'] | ||
ElButton: typeof import('element-plus/es')['ElButton'] | ||
ElCol: typeof import('element-plus/es')['ElCol'] | ||
ElCollapse: typeof import('element-plus/es')['ElCollapse'] | ||
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] | ||
ElInput: typeof import('element-plus/es')['ElInput'] | ||
ElOption: typeof import('element-plus/es')['ElOption'] | ||
ElRow: typeof import('element-plus/es')['ElRow'] | ||
ElSelect: typeof import('element-plus/es')['ElSelect'] | ||
HomeView: typeof import('./src/components/HomeView.vue')['default'] | ||
} | ||
} | ||
|
||
export {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
<script> | ||
global = globalThis | ||
</script> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.