From 3fea0e29b4f33fe4efe67062b47c64a323a42989 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期三, 25 十月 2023 19:16:36 +0800 Subject: [PATCH] chore: 调整 README --- README.md | 65 ++++++++++++++++++-------------- 1 files changed, 37 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index e87b654..0a22319 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,55 @@ -# basic-vue3-template +# vue3-project-template -This template should help get you started developing with Vue 3 in Vite. +Vue3 + TypeScript + SCSS + Element Plus 椤圭洰妯℃澘 -## Recommended IDE Setup +## 鎺ㄨ崘 IDE 璁剧疆 -[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and +disable +Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). -## Type Support for `.vue` Imports in TS - -TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. - -If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: - -1. Disable the built-in TypeScript Extension - 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette - 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` -2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. - -## Customize configuration - -See [Vite Configuration Reference](https://vitejs.dev/config/). - -## Project Setup +## 椤圭洰鍒濆鍖� ```sh npm install ``` -### Compile and Hot-Reload for Development +### 鍚姩寮�鍙戞ā寮� ```sh npm run dev ``` -### Type-Check, Compile and Minify for Production +## 鍏朵粬鑳藉姏 -```sh -npm run build +### Element Plus 缁勪欢鑷姩寮曞叆 + +閰嶇疆浜嗙粍浠惰嚜鍔ㄥ紩鍏�, 鏃犻渶鎵嬪姩寮曞叆缁勪欢, vite 浼氬湪椤圭洰鏍圭洰褰曚笅鑷姩璋冩暣 `auto-imports.d.ts`銆乣components.d.ts` 鍐呭銆� Iconify +鍥炬爣鑷姩寮曞叆鍚屼笂銆� + +### 闆嗘垚 Iconify 鍥炬爣 + +iconify 鏈夎澶氬浘鏍囬泦鍚�, 鎵�浠ラ厤缃簡鑷姩涓嬭浇鍜岃嚜鍔ㄥ紩鍏�, 浣嗘槸涓嬭浇鎵�鏈夌殑鍥炬爣闆嗗悎闇�瑕佺害120鍏�, 鎵�浠ュ缓璁簨鍏堥�夊畾濂界敤鍝釜鍥炬爣闆�, +鍒贡鍔犲浘鏍囦笉鐒惰涓嬭浇濂藉 + +绀轰緥: + +```vue +<template> + <el-icon size="40" color="red"> + <IconAlert /> + </el-icon> +</template> + +<script setup lang="ts"> +import IconAlert from '~icons/mdi/alert' +</script> ``` -### Lint with [ESLint](https://eslint.org/) +鍥炬爣搴撳湴鍧�: [iconify](https://icon-sets.iconify.design/) -```sh -npm run lint -``` +鍥炬爣浣跨敤鏂规硶: [github.com/unplugin/unplugin-icons](https://github.com/unplugin/unplugin-icons#usage) + +### 寮曞叆 VueUse + +鏂囨。鍦板潃: [VueUse](https://vueuse.org/guide/) -- Gitblit v1.8.0