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 🙏

© 2025 – Pkg Stats / Ryan Hefner

element-tree-grid

v0.1.4

Published

element tree table with vue

Downloads

382

Readme

element-tree-grid

tree grid extends element ui with vue

releases v1.0.4

  • try to expand row expanded after data reload

having problems with <el-table-column type="selection" fixed></el-table-column>

if you have any idea , welcome !!!

demos

start

  • clone to your project

    git clone https://github.com/foolishchow/element-tree-grid.git
    cd element-tree-grid
    npm install #or yarn
    npm run dev
  • use with node

    • install
    npm install element-tree-grid --save
    • in you project
    //common 
    var ElTreeGrid = require('element-tree-grid');
    Vue.component(ElTreeGrid.name,ElTreeGrid);

useage

  • common useage

    <el-table :data="model.menus" border max-height="250">
        <el-table-tree-column 
            file-icon="icon icon-file" 
            folder-icon="icon icon-folder" 
            prop="label" label="labelname" width="220"></el-table-tree-column>
        <el-table-column prop="description" label="description"   width="180"></el-table-column>
    </el-table>
  • get children from remote

    • html
    <div id="app" style="padding: 30px;">
        <el-table :data="model.menus" border max-height="400">
            <el-table-tree-column 
                :remote="remote"
                file-icon="icon icon-file" 
                folder-icon="icon icon-folder" 
                prop="label" label="MenuName" width="320"></el-table-tree-column>
            <el-table-column prop="id" label="id" width="180"></el-table-column>
            <el-table-column prop="description" label="Description" :show-overflow-tooltip="true" width="180"></el-table-column>
        </el-table>
    </div>
    • javascript
    new Vue({
        el: "#app",
        data: {
            model: {
                menus: trees
            }
        },
        methods:{
            remote(row,callback){
                // async or sync are both supported
                setTimeout(function() {
                    callback(row.children)
                },500)
            }
        }
    })
  • attributes

    all props of el-table-column are supported;

    | name | description | values | | ----------- | :--------------------------------------------------------------------------------------------- | :-------------------------------------------: | | prop | same as el-table-column | | | label | same as el-table-column | | | width | same as el-table-column | | | fixed | same as el-table-column | | | resizable | same as el-table-column | | | formatter | same as el-table-column | | | className | same as el-table-column | | | treeKey | the key for neasted parse | type:String, default:'id' | | childNumKey | the key of childNum | type:String, default:'child_num' | | parentKey | the key of parent_id | type:String, default:'parent_id' | | levelKey | the key of node's depth | type:String, default:'depth' | | childKey | the key of node's children been placed | type:String, default:'children' | | fileIcon | file icon className | type:String, default:'el-icon-file' | | folderIcon | folder icon className ,when opend use: folderIcon-open | type:String, default:'el-icon-folder' | | remote | remote method to get children | type:Function,default:null | | allRemote | request all data from remote ,you have to config prop remote first,default use request cache | type:Boolean,default:false | | expandAll | expand all nodes when loaded | type:Boolean,default:false | | expandKey | key tells if the line is opened at inited ( just expended once ) | type:String,default:expanded | | indentSize | indent number ,united in px | type:Number,default:14 |

examples

  • common
<el-table-tree-column 
            file-icon="icon icon-file" 
            folder-icon="icon icon-folder" 
            prop="label" 
            label="labelname" 
            width="220"></el-table-tree-column>
  • with formatter
<el-table-tree-column 
            file-icon="icon icon-file" 
            folder-icon="icon icon-folder" 
            prop="label" 
            label="labelname" 
            :formatter="formatter"
            width="220"></el-table-tree-column>
  • with scopedSolts
<el-table-tree-column 
            file-icon="icon icon-file" 
            folder-icon="icon icon-folder" 
            prop="label" 
            label="labelname" 
            width="220">
    <template slot-scope="scope">
        <span>prefix =></span>
        <span>{{scope.row.label}} -- {{scope.row.id}}</span> 
        <span><= suffix</span>   
    </template>
</el-table-tree-column>