Giter Club home page Giter Club logo

vue_starbucks's Introduction

vue_starbucks

A Vue.js project

1、简介

项目介绍

这个项目是基于 Vue.js 开发的PWA单页应用 

技术栈

技术栈为Vue + Vue Router + Vuex + webpack + Swpie + bootstrap 1.首先利用了Vue-Router的视图命名,构建了网页的左右布局。
左侧菜单(导航)部分,利用 v-show 判断当前路由地址,决定是否显示哪个层级的菜单。 右侧内容主题部分, 利用 路由出口,将所有子路由,子孙路由的视图都渲染在这里。

因此在src/router/index.js 路由管理模块中

 只有一个顶级路由 '/'
 其他路由地址皆为它的子孙路由,因此html代码量减少非常之多,但是问题也在于,左侧菜单(导航栏)部分显得臃肿。

2.由于使用了keep-alive标签导致某些不需要的状态被保持,于是通过监听当前路由地址的变化,重置组件中部分数据,避免了重复渲染DOM也使组件中关键不被注销。 Github_page地址(点击进入)[https://raotaohub.github.io/vue_starbucks/]

  • 首页

首页

  • 商品

商品

商品

商品

本地运行

本地需要提前安装Node 、 npm(cnpm)

在本地创建一个文件夹 然后将项目文件克隆到该文件夹内 并输入以下命令

npm install

npm run dev

vue_starbucks's People

Contributors

raotaohub avatar

Stargazers

 avatar  avatar  avatar  avatar  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.