npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-lazy-render

v1.0.20

Published

lazy render component from vue

Downloads

71

Readme

vue-lazy-render

GitHub issues GitHub forks GitHub stars Twitter

NPM

Description

A vue component for vue component lazy rending.

Vue组件,用于Vue组件的延迟渲染,改善初次进入页面或者数据量较大的页面操作时出现卡顿的情况

Installation

npm install vue-lazy-render

Usage

import LazyRender from 'vue-lazy-render'
Vue.use(LazyRender)

Props

| property | description | type | default |required| | ------------- |:-------------:|:-----:|:-------:|:-------:| |time|多长时间后开始渲染组件|Number|10|false| |immediately|是否立即开启延迟渲染,vue-lazy-render组件会在路由切换时,会进行一次延迟渲染,如果在同一个路由中需经常对某个组件进行延迟渲染,可以将immediately由false设为true,就会马上开启一次延迟渲染|Boolean|--|false| |data|如果需要延迟加载的组件是由数组渲染的,可以将数据的数据prop进vue-lazy-render组件,组件会根据配置监测数组变化,决定开启延迟加载的时机|array|--|false| |trackByData|是否根据data的变化来开启延迟加载,如果设为true,需将data prop进来,并且路由切换时不会再进行延迟渲染|Boolean|--|false| |limit|在数据超过多少后才开启延迟渲染,需要data和将trackByData设为true|Number|30|false| |maskClass|等待渲染时的遮罩层样式|String|--|false| |tip|等待渲染时的提示文字|String|正在渲染,请稍候|false|

Events

| name | description |params| | -------|:--------:|:-------:| | loaded |延迟渲染完成后的回调|--|

Example

基础用法

<lazy-render>
    <my-component></my-component>
</lazy-render>

trackByData

<lazy-render :data="myArray" :time="300" :limit="50" track-by-data>
    <my-component :data="myArray"></my-component>
</lazy-render>

Development

npm run dev

License

MIT