Skip to content

该项目是一款购物商城应用,可以分为商户和个人;本项目使用vue框架搭建,需要和后台的接口交互,来获取各种数据,其中项目主要用到vue的vuex、vue-router、axios、等实现;我在本项目中做了登录、注册、忘记密码,获取/修改用户信息,首页等内容;

Notifications You must be signed in to change notification settings

hexluxiang/shopping-application

Repository files navigation

my-project

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm run unit

# run e2e tests
npm run e2e

# run all tests
npm test

username:13003939821 password:123456

For a detailed explanation on how things work, check out the guide and docs for vue-loader.

项目从webpack+vue2.0升级成vite+vue3.0总结

我已经成功将您的项目从 webpack + Vue 2.0 升级到 Vite + Vue 3.0。以下是完成的主要工作: ✅ 已完成的升级内容

  1. 📦 依赖更新 Vue 2.5.2 → Vue 3.3.0 Vue Router 3.0.1 → Vue Router 4.2.0 Vuex 3.0.1 → Pinia 2.1.0 (推荐的状态管理库) Vant 1.3.4 → Vant 4.8.0 (UI组件库) 添加 Vite 5.0.0 作为构建工具
  2. ⚙️ 配置文件 创建了 vite.config.js 配置文件 创建了 postcss.config.js 配置文件 删除了旧的 webpack 配置文件 更新了 index.html 以适配 Vite
  3. 🔧 核心文件升级 main.js: 从 Vue 2 的 new Vue() 改为 Vue 3 的 createApp() 路由: 升级到 Vue Router 4 的 createRouter() 语法 状态管理: 从 Vuex 迁移到 Pinia 组件: 升级主要组件到 Vue 3 Composition API
  4. 🎨 组件升级示例 src/views/app/app.vue: 使用 Composition API src/components/Login.vue: 升级到 Vue 3 语法 src/components/Reg.vue: 升级到 Vue 3 语法 src/views/home/home.vue: 使用 Composition API

About

该项目是一款购物商城应用,可以分为商户和个人;本项目使用vue框架搭建,需要和后台的接口交互,来获取各种数据,其中项目主要用到vue的vuex、vue-router、axios、等实现;我在本项目中做了登录、注册、忘记密码,获取/修改用户信息,首页等内容;

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published