# Vue外卖app **Repository Path**: coderfeifei/vue-take-away-app ## Basic Information - **Project Name**: Vue外卖app - **Description**: 基于Vue框架的外卖app - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-05-22 - **Last Updated**: 2021-08-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: vue小试牛刀 ## README # takeout_client > A Vue.js project ## Build Setup ### 项目难点个人记录 #### 1.外卖订餐页面滚动问题和使用BetterScroll的bug a.使用BetterScroll需要注意warrp的高度要小于内容区域才能有滚动效果 b.需要注意设置滚动的时间,在异步请求数据成功之后,页面重新渲染之后才设置滚动,不然滚动无效,会有bug。在请求方法中传入一个回调函数,请求成功时候触发回调函数,在拿到新数据渲染页面之后设置滚动(this.$nextTick()) c.需要注意b中多级回调函数的设置中this的指向问题,这里用箭头函数是最好的解决方案 #### 2.左右侧的滑动实现联动效果(详细说明在shop/shop-goods/note.md) a.在点击左侧分类,右边会自动滑动到指定位置, b.滑动右边时,左边更着做出相印的变化 c.详细解决方案在src/pages/shop/shop-goods/note.md中有详细说明 ``` bash # 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 ``` For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).