Giter VIP home page Giter VIP logo

vue3-vite's Introduction

Typing SVG

             GitHub Release Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Important

简介:图书借阅管理系统前端,使用vue3框架

这是对应的 后端项目地址

快速使用

1.进入项目根目录,使用npm命令下载项目所需的依赖模块

Caution

💥注意:要先安装nodejs,最好以管理员身份执行命令!!!💥

npm install

2.修改配置文件

打开vite.config.js文件,可以自行修改前端地址,也可以修改向后端请求的地址,但是要相应地修改后端项目的启动路径

//代理http请求,解决跨域问题
server: {
    // 前端项目启动路径,localhost:5173
    host: 'localhost',
    port: 5173,
    proxy: {
        '/api': { //匹配请求路径中含有 /api 的请求
            target: 'http://localhost:8080', //后端服务地址
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/api/, '') //去除路径中的/api,还原请求路径
        }
    }
},

3.执行命令,启动项目

npm run dev

项目目录结构

  • components:公共组件,包括顶部导航和侧栏
  • css:全局样式
  • methods:前端所有向后端发送的请求api
  • router:界面路由
  • stores:pinia存储
  • util:工具方法
  • views:页面
  • main.js:入口文件,app的初始化
  • package.json:项目的各种依赖,执行脚本等
  • vite.config.js:项目配置文件

vue3-vite's People

Contributors

caolib avatar

Stargazers

 avatar pangyuhua avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.