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

celtable

v0.3.8

Published

tree-table element-ui table plus

Downloads

9

Readme

celtable

安装 依赖element-ui

npm i celtable -S
npm i element-ui -S

导入Vue

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import CUI,{CTable} from 'celtable'
import 'celtable/lib/ctable.css'
Vue.use(ElementUI);
Vue.use(CUI)

export components

CTable
  CTableColumn
  CTableColumns // column group 多层表头children

CMenu
  CMenuListItem

CTable

Table Attributes

其他属性及方法和elementUi相同,以下属性,方法为附加

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :-----| ----: | :----: | :----: | :----: | | rowDrag | 行拖拽,依赖row-key | Boolean | :----: | false | | columnDrag | 列拖拽 | Boolean | :----: | false | | rowDropCopy | 行拖拽复制依赖rowDrag=true auto自动生成inquiry弹框询问 suffix:用于变更复制的数据的Key的数组,suffixV<string|Function>:用于如何处理suffix中的值 EP:(v)=>{v+'-Copy'} | Object | {type: 'auto',suffix: ['name'],suffixV: '-Copy'},{type: 'inquiry'} | null | | rowFixData | 固定行数据 | Array | :----: | null | | levelFlag | 父子层级特殊固定关系标记start=0,++(非固定层级关系慎用) EP:levelFlag="{0:'年',1:'月',2:'周'}" | Object | :----: | null | | headerTipInfo | 特殊说明如树结构全选不包含子数据 | Object | 参考 el-tooptip {className: 's',effect: 'dark',content: '全选仅选择最外层',placement: 'top'}, | headerTipInfo: {effect: 'dark',placement: 'top'}, | | rowDragOptions | 拖拽 sortable.options | Object | 参考 sortable | :rowDragOptions="{animation: 300}" | | columnDragOptions | 同上 | Object | 参考 sortable | :columnDragOptions="{animation: 300}" |

Table Events

| 事件名 | 说明 | 参数 | | :-----| ----: | :----: | | fixRow-contextmenu | 固定行右击 | row, column, event | | fixRow-click | 固定行单击 | row, column, event | | fixRow-dbclick | 固定行双击 | row, column, event | | columnDropOnEnd | 列拖动结束回调 args1[sortable.onEnd] args2-newProp、oldProp 列prop值, 附加说明:如果用了勾选此时newIndex,和oldIndex与数据中index不相同(+-1关系)或者使用多级表头,此时使用new-old-Prop来定位拖动到是哪一列是最准确的 | columnDropOnEnd({newIndex,oldIndex},{newProp,oldProp}) | | rowDropOnEnd | 行拖动结束回调 (args1<sortable.onEnd>,args2) args2: {oldRow: 拖拽row, copyRow: 复制row 《1,Id变动原id+-Copy,2新增属性isDropCopyed: true》, parent: {row: 拖拽结束落点的父节点row, 根节点为null,newIndex: 拖拽结束落点的下标}} | args1,args2 | | overrideRowDropOnEnd | 重写行拖拽(args1) | args1 sortable.onEnd | | overrideColumnDropOnEnd | 重写列拖拽(args1) | args1 sortable.onEnd |

CMenu

CMenu Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :-----| ----: | :----: | :----: | :----: | | show | 显示&隐藏 | Boolean | | false | | top | 位置 | Number | | | | left | 位置 | Number | | | | right | 位置 | Number | | | | bottom | 位置 | Number | | | | menuItems | 自定义子内容 | Array<CMenuListItem> | | |

CMenu

| 参数 | 说明 | 类型 | 可选值 | 默认值 | | :-----| ----: | :----: | :----: | :----: | | show | 显示&隐藏 | Boolean | | false | | top | 位置 | Number | | | | left | 位置 | Number | | | | right | 位置 | Number | | | | bottom | 位置 | Number | | | | menuItems | 自定义子内容 | Array<CMenuListItem> | | |

功能介绍

1. 行拖拽,列拖拽,行拖拽复制
2. 固定行,固定行伸缩,固定列
3. 

功能截图

cut