为了提升页面响应速度,优化用户体验,可以适当的减轻页面首次加载的压力,把不在可视区的部分,进行懒加载。
In order to improve the page response speed and optimize the user experience, it can properly reduce the pressure of the first loading of the page, and lazily load the part not in the visual area.
npm install vue-dom-lazy-load --save
import VueDomLazyLoad from 'vue-dom-lazy-load';
Vue.use(VueDomLazyLoader);
<img :src="baseUrl" v-dom-lazy-load />