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

vue3-ztree

v0.1.3

Published

使用vue3包括ztree,理论上是支持全部ztree全部事件的

Downloads

4

Readme

vue3-ztree

npm license

:vue3-ztree: 基于ztree封装的Vue树形组件,轻松实现海量数据的高性能渲染。

logo

为什么需要vue3-ztree

Vue的数据监听机制决定了在大数据量场景下的渲染性能非常低下,基于Vue实现的常规树组件几乎无法胜任上万条数据的高性能渲染,在IE浏览器(即便是IE11)中很容易导致页面卡死甚至浏览器崩溃。

为了摆脱数据监听,只能放弃通过Vue渲染,采用常规DOM操作的方式。在这个领域ztree是当之无愧最成熟的方案,因此vue3-ztree直接基于ztree做上层封装,以组件的形式将ztree的配置和事件暴露出来,使其可以方便的在Vue项目中安装使用。

vue3-ztree仅仅是给ztree套了一层Vue组件的壳,顺便提供了一套更现代化的皮肤,因为主打大数据量场景。

ztree在性能优化方面已经做到了近乎极致,感谢ztree作者的工作,向您致敬!

安装

npm i vue3-ztree --save

使用

属性

| 参数 | 说明 | 类型 | 默认值 | | ---- | ---- | --- | --- | | setting | ztree 配置 | Object | {view: {showIcon: false}} | | nodes | ztree 数据 | Array | [] |

事件

完全移植zTree APIcallback支持的事件

扩展

zTree没有提供给整个实例更新数据的方法,vue3-ztree基于Vue的组件通信机制扩展实现了响应式数据特性,只要nodes的值发生变化,ztree实例就会随之更新。

项目DEMO里演示了vue3-ztree的响应式数据特性。

演示

  • 线上演示:
  • 本地演示:
npm i 
npm run serve 

License

MIT