文章目录
安装pnpm
npm install -g pnpm
安装Vue脚手架
npm install -g @vue/cli
出现错误可以重新安装试试。
创建Vite版本的Vue
版本不符到官网https://nodejs.org/en/下载合适的版本
<script setup> vue3.0语法支持直接写setup语法更简洁
<style scoped> style加样式,scoped限定本页面生效,嵌入页面时,样式不会互相冲突
安装Element-Plus
pnpm install element-plus
安装Element-Plus Icon
pnpm install @element-plus/icons-vue
安装Router路由
(其中Vue3.x需要配合Router4.x的版本)
pnpm install vue-router@4
安装成功能在项目的依赖package.json上直观看到
安装VueUse-----使用cookie
https://vueuse.org/integrations/useCookies/#usecookies
pnpm i @vueuse/integrations #i就代表install安装
pnpm i universal-cookie
安装Vuex
pnpm install vuex@next --save
安装date-fns
pnpm install date-fns
安装echarts
pnpm install echarts
echarts官网:https://echarts.apache.org/handbook/zh/get-started/