# vue-cli3-vant-demo **Repository Path**: chenxiaomei/vue-cli3-vant-demo ## Basic Information - **Project Name**: vue-cli3-vant-demo - **Description**: vue项目中keep-alive的使用,从详情页返回列表时保存浏览位置 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-05-07 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vue-cli3-vant-demo ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Run your tests ``` npm run test ``` ### Lints and fixes files ``` npm run lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ### 列表页 ——> 详情页记录滚动距离,详情 ——> 列表设置滚动位置 遇到的问题: ``` 1、在列表页获取不到滚动距离 2、回到列表无法设置滚动位置 ``` 解决方法: ``` 1、在点击某个商品的时候,获取滚动距离,进行 sessionstorage 存储 2、使用 this.$root.$el 进行设置滚动位置 ```