Giter Site home page Giter Site logo

vue-family-bucket's Introduction

vue-family-bucket (vue全家桶-移动端-spa)

vue vuex vux vue-router vue-resource vue-touch

  vue 主库
  vuex 数据状态管理
  vue-router 前端路由
  vue-resource ajax库
  vue-touch 移动端touch
   vux 仿微信UI库

移动端踩的坑

坑1: IOS页面切换页面title未变化

引发原因: 兼容问题,andriod无此现象 解决原理: IOS通过装载iframe会触发IOS重新检索标题 解决方案: 在路由钩子afterEach生命周期中识别当前设备是否为IOS设备,若是IOS则加载一个空内容的html页面(URL拼接随机参数,避免缓存),触发重新检索标题

坑2: SPA应用跳转第三方网页,通过物理返回键返回,应用数据池数据全部丢失的问题

引发原理: vuex的数据池是缓存在js内存中的,跳转至第三方网站时,内存中的数据已被释放 解决方案: 1: 通过iframe去转载载第三方页面 2: cookie localStorage缓存store中的数据

UI展示

开门动画有个小彩蛋,欢迎关注微信公众号社区半径,体验各种姿势开门

vue-family-bucket's People

Contributors

marszed avatar jdhakj avatar

Stargazers

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