Giter Site home page Giter Site logo

rudyden / basis-vue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laizuan/basis-vue

0.0 0.0 0.0 29.59 MB

基于Vue CLI 4构建的公司门户或者个人博客手脚架。已实现多语言切换,顶部导航固定,二级路由,按需加载,路由懒加载,CDN引入

Home Page: https://git.io/LBasic

License: MIT License

JavaScript 38.67% HTML 2.82% Vue 53.52% CSS 0.57% Less 4.43%

basis-vue's Introduction

basis-vue

简介

基于Vue CLI 4构建的公司门户或者个人博客手脚架,开箱即用

  • 多语言
  • ElementUi 按需加载
  • CDN 引入第三方依赖
  • 路由懒加载
  • 顶部导航固定
  • 二级路由
  • eslint 代码规范

注意点

  1. public 文件夹的静态资源都会被简单的复制,而不经过 webpack。详情
  2. ElementUI 是按需引入,可以更具自己的业务需求添加删除
  3. 如果不想使用引入CDN引入删除externals节点和chainWebpackCDN配置,最后删除public下面的index.html中CDN注入代码即可

项目结构

basis-vue
    ├── public                     -- 不进过webpack打开目录
    ├── src                        -- 开发目录
    ├      ├── assets              -- 资源文件夹
    ├      ├      └── css          -- css 存放
    ├      ├      └── js           -- js 存放
    ├      ├      └── img          -- 静态图片存放
    ├      ├── components          -- 封装组件 
    ├      ├── lang                -- 多语言包
    ├      ├── views               -- 路由页面
    ├── theme                      -- element ui 主题        

开发

# 克隆项目
git clone https://github.com/laizuan/basis-vue.git

# 安装依赖
yarn install

# 启动服务
yarn run dev

打包

#打包生产包
yarn run build

分析依赖

yarn run preview

Nginx 代理设置

server {
	listen   80;
    charset utf-8;        
    server_name localhost;
     location / {
        root \dist; #网站的根目录
        index index.html; #默认文件
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

技术选型

技术 名称 官网
vue 渐进式 JavaScript 框架 https://cn.vuejs.org/
vue-router 路由 https://router.vuejs.org/
vuex 状态管理 https://vuex.vuejs.org/
element-ui 基于 Vue 2.0 的桌面端组件库 http://element-cn.eleme.io
Headroom 隐藏或展示页面元素 http://www.bootcss.com/p/headroom.js/

演示地址

https://git.io/LBasic

捐助

如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 🍹 donate

License

MIT

basis-vue's People

Contributors

laizuan avatar dependabot[bot] 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.