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

drag-tree-table-yk

v4.0.8

Published

基于Vue实现可以拖拽排序的树形表格

Downloads

5

Readme

vue drag tree table

IE10+/Chrome/firefox

请更新到2.0.8及以上版本

基于vue实现的可以拖拽排序的树形表格

支持拖拽排序、固定头、拖拽改变行宽,checkbox多选、自定义单元格内容、设置行的背景色、动态控制某些行是否可以拖拽等等....

drag-tree-table

安装

npm

npm i drag-tree-table-yk --save-dev

script

<script src="./dist/dtree-table.js"></script>

使用方式

我用的是iconfont阿里的图标库里面有些字体你的电脑没有可能 直接link引入//at.alicdn.com/t/font_1472101_svwr4uiuqh.css

<template>
  <div id="app">
    <dragTreeTable
      :data="treeData"
      :onDrag="onTreeDataChange"
      fixed
      border>
    </dragTreeTable>
  </div>
</template>

<script>
import dragTreeTable from "drag-tree-table";
export default {
  name: "app",
  data() {
    return {
      treeData: {
        columns: [...],
        lists: [...]
      }
    };
  },
  components: {
    dragTreeTable
  },
  mounted() {
              var columns = [
                {
                type: "icon",
                // title: "<a>菜单名称</a>",
                field: "name",
                width: 250,
                // align: "left",
                // titleAlign: "left",
                formatter: item => {
                    return "<span>" + item.name + "</span>";
                },
                totalNum:'id',  //新增了两个节点这个id可以随意放置你的参数名然后纯展示动态数据用
                isDragOpen:'isOpen',  //新增isOpen需要你在data中中加一个属性,然后只通过这个节点来控制拖动,另外我用的是iconfont阿里的图标库里面有些字体你的电脑没有可能   直接link引入//at.alicdn.com/t/font_1472101_svwr4uiuqh.css
                actions1:[{
                    text: "编辑",
                    onclick: this.onTreeDataChange,
                    formatter: item => {
                        return "<span>编辑</span>";
                    }
                    // onclick: this.onDetail,
                },{
                    text: "排序",
                    onclick: this.onTreeDataChange,
                    formatter: item => {
                        return "<span>排序</span>";
                    }
                    // onclick: this.onDetail,
                },{
                    text: "删除",
                    onclick: this.onTreeDataChange,
                    formatter: item => {
                        return "<span>删除</span>";
                    }
                    // onclick: this.onDetail,
                }]
        },

        ]
  },
  methods: {
    onTreeDataChange(list) {
      this.treeData.lists = list;
    }
  },
};
</script>

更多组件详细功能请参考 API文档

更新日志-CHANGELOG

我的微信a5628354,欢迎沟通(找我加新需求的记得先来个star支持下哦)