Skip to content

Commit df91f95

Browse files
author
sunshine824
committed
readme
1 parent 3d57280 commit df91f95

File tree

3 files changed

+3283
-16
lines changed

3 files changed

+3283
-16
lines changed

README.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,49 @@
1-
# Vue 3 + Typescript + Vite
1+
### 简介
22

3-
This template should help get you started developing with Vue 3 and Typescript in Vite.
3+
此项目是基于 Vue3.0 全家桶 + TypeScript + Antd2.0 + Vite 搭建简易脚手架,用到大多数常用的 API,适合 Vue3 入门新手借鉴。
4+
由于每个项目呈现内容不同,所以在这里我就只搭建了一个骨架,具体内容自定义。
45

5-
## Recommended IDE Setup
6+
Vue2.0 版本:<a href="https://github.com/sunshine824/vue-typescript-starter.git">https://github.com/sunshine824/vue-typescript-starter.git</a>
67

7-
[VSCode](https://code.visualstudio.com/) + [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur). Make sure to enable `vetur.experimental.templateInterpolationService` in settings!
8+
### 相关包版本号
89

9-
### If Using `<script setup>`
10+
所有技术都是当前最新的。
1011

11-
[`<script setup>`](https://github.com/vuejs/rfcs/pull/227) is a feature that is currently in RFC stage. To get proper IDE support for the syntax, use [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) instead of Vetur (and disable Vetur).
12+
- vue: "^3.0.5",
13+
- typescript : "^4.3.2",
14+
- ant-design-vue: "2.2.2",
15+
- vue-router : "^4.0.9",
16+
- less:"^4.1.1",
17+
- vuex: "^4.0.1"
18+
- axios:"^0.21.1",
1219

13-
## Type Support For `.vue` Imports in TS
20+
### Build Setup
1421

15-
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 use the following:
22+
```
23+
# clone
24+
git clone https://github.com/sunshine824/vue3.0-typescript-starter.git
25+
```
1626

17-
### If Using Volar
27+
```
28+
# cd
29+
cd vue3.0-typescript-starter
30+
```
1831

19-
Run `Volar: Switch TS Plugin on/off` from VSCode command palette.
32+
```
33+
# install dependencies
34+
npm install
35+
```
2036

21-
### If Using Vetur
37+
```
38+
# Compiles and hot-reloads for development
39+
npm run dev
40+
```
2241

23-
1. Install and add `@vuedx/typescript-plugin-vue` to the [plugins section](https://www.typescriptlang.org/tsconfig#plugins) in `tsconfig.json`
24-
2. Delete `src/shims-vue.d.ts` as it is no longer needed to provide module info to Typescript
25-
3. Open `src/main.ts` in VSCode
26-
4. Open the VSCode command palette
27-
5. Search and run "Select TypeScript version" -> "Use workspace version"
42+
```
43+
# Compiles and minifies for production
44+
npm run build
45+
```
46+
47+
### 最后
48+
49+
如果你觉得该项目不错,或者对你有所帮助,点个 Star 、或者真心赞赏一下 都是对我最大的鼓励,我会更有动力维护好该项目

0 commit comments

Comments
 (0)