Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
drag-tree-table-yk
Advanced tools
IE10+/Chrome/firefox
2.0.8
及以上版本基于vue实现的可以拖拽排序的树形表格
支持拖拽排序、固定头、拖拽改变行宽,checkbox多选、自定义单元格内容、设置行的背景色、动态控制某些行是否可以拖拽等等....
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文档
a5628354
,欢迎沟通(找我加新需求的记得先来个star支持下哦)FAQs
基于Vue实现可以拖拽排序的树形表格
The npm package drag-tree-table-yk receives a total of 14 weekly downloads. As such, drag-tree-table-yk popularity was classified as not popular.
We found that drag-tree-table-yk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.