Giter Site home page Giter Site logo

Comments (4)

myronliu347 avatar myronliu347 commented on July 28, 2024 2

嗯,这个demo页面是没有做异步加载组件的, 这个官网有介绍 动态载入组件 ,

keep-alive 只是保存了组件状态,并没有保存滚动条的位置。

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024 2

保存滚动条位置的实现:

首先给content 加上一个索引

<content v-ref:scroller></content>

切出是保存 scrollTop 切入是修改scrollTop

let scrollTop = 0

export default {
   //....
route: {
    activate (transition) {
      transition.next()
      Vue.nextTick(() => {
        this.$refs.scroller.$el.scrollTop = scrollTop
      })
    },
    deactivate (transition) {
      scrollTop = this.$refs.scroller.$el.scrollTop
      transition.next()
    }
  }
}

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024 1

总结了下你的问题, 解决如下:

  1. CARBON 这个是设计资源,只是参考了它的配色
  2. 至于热加载,使用vue-cli创建的项目是有这个功能的
  3. vue carbon 完全开源,可以随意使用,有问题给我提 issues , 我会及时解决
  4. 目前 vue carbon 已经有使用文档: Vue Carbon 使用文档
  5. 最后至于QQ 群嘛,目前并不打算建,主要是怕人太少,有问题可以直接问我,我都会予以解答 (有时会晚点,工作原因)

from vue-carbon.

issmile avatar issmile commented on July 28, 2024

我在电脑上跑起了里面的example.这个例子是热加载的?还是一下子载入所有组件的?

我放在微信里打开,第一次大概5-7秒加载时间,后来加载大概2-3秒.所以觉得好像是一次性加载了所有的?

看里面example的返回去的时候都是返回的初始状态,比如看完FORMS组件后按返回,home页面又变回了首屏,没有保存list当前的位置,看源码是设置了keep-alive,按官方介绍应该是是保存状态的呀,为什么没有保存当前滚动位置?如果要实现保存当前位置的话,应该怎么实现?

from vue-carbon.

Related Issues (20)

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.