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 🙏

© 2026 – Pkg Stats / Ryan Hefner

tp-pivot

v1.0.16

Published

This repository holds a sample integration project of WebPivotTable reporting tool with the Vue framework.

Readme

#1.安装 npm install --save tp-pivot

#2.使用实例

参考
组件源码:https://gitee.com/tp805/tpivot
引入实例:https://gitee.com/tp805/spring-boot-dev-frame-ui-adv webDataRocks 分支

#3.Vue 引入

main.js
import { TPivotExt, TPivot } from 'tp-pivot'
Vue.use(TPivotExt)
Vue.use(TPivot)

#4.使用说明

属性

| 属性 | 说明 | 类型 | 默认值 | 备注 | | ----------------- | ------------------------------------------------------------------- | --------------- | -------------------------------------- | ---------------------------------------------------- | | dataSource | 数据源 | Array 或 String | [] | 数据源可以是对象数组, 也可以是 json 或 csv 文件地址 | | report | Object Report 类型 | Object | | | global | Object Report 类型 | Object | {localization: '中文对应的 json 地址'} | | | componentFolder | ## 待确认 | | toolBar | 控制报表工具栏的显示与隐藏, 优先级高于其他单个工具的显示与隐藏功能 | booealn | true | | connectVisible | 控制工具栏 “连接”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | openVisible | 控制工具栏 “打开”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | saveVisible | 控制工具栏 “保存”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | exportVisible | 控制工具栏 “导出”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | formatVisible | 控制工具栏 “格式化”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | optionsVisible | 控制工具栏 “选项”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | fieldsVisible | 控制工具栏 “字段”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | fullscreenVisible | 控制工具栏 “全屏”功能的显示与隐藏,优先级低于 toolbar | boolean | true | | chartVisible | 控制 highchart 图的显示与隐藏 | boolean | true | | chartType | hightchart 图的 type line 折线图 bar 柱状图 pie 饼图 scatter 散点图 | String | 'line' | | width | 透视表的宽度 | String | '60%' | | height | 整个模块的高度 | String | | | chartWidth | highchart 图的宽度 | String | '40%' |

事件

| 事件名 | 说明 | 回调参数 | 备注 | | -------------------- | ------------------------------------------------------ | --------------- | ---- | | ready | 就绪时触发 | ()=>void | | | reportchange | 报表数据改变时触发,选项变化时, 该时间同样会被触发 | ()=>void | | | update | 报表数据变化时触发, 选项内容变化是, 该事件不被触发 | ()=>void | | | cellclick | 单元格被点击时触发, cell:单元格相关信息 | (cell)=>void | | | celldoubleclick | 单元格被双击时触发, cell:单元格相关信息 | (cell)=>void | | | datachanged | ## 待确认 | ()=>void | | | loadingdata | 加载数据文件时触发 | ()=>void | | | dataloaded | 数据加载完成是触发 | ()=>void | | | dataerror | 加载数据文件出现错误时触发 | (param)=>void | | | fieldslistclose | 字段弹窗关闭时触发 | ()=>void | | | fieldslistopen | 字段弹窗打开时触发 | ()=>void | | | filterclose | 数据项筛选关闭时触发 | ()=>void | | | filteropen | 数据项筛选打开时触发 | ()=>void | | | reportcomplete | 报表被加载完之后触发 | ()=>void | | | afterchartdraw | ## 待确认 | ()=>void | | | aftergriddraw | 单元格被绘制完成之后触发 | (param)=>void | | | beforegriddraw | 单元格被绘制完成之前触发 | (param)=>void | | | beforetoolbarcreated | 工具栏被创建之前触发, toolbar:工具的栏的相关信息 | (toolbar)=>void | | | customizeCell | 单元格加载的时候触发 cell: 单元格 cellData: 单元格数据 | ()=>void | | | customizeContextMenu | ## 待确认 | ()=>void | | | fullscreen | ## 待确认 | ()=>void | | | loadinglocalization | 本地化的时候触发 | ()=>void | | | localizationloaded | 本地化成功之后触发 | ()=>void | | | localizationerror | 本地化失败时触发 | ()=>void | | | loadingolapstructure | ## 待确认 | ()=>void | | | olapstructureerror | ## 待确认 | ()=>void | | | olapstructureloaded | ## 待确认 | ()=>void | | | runningquery | 报表展示的数据发生变化时触发 | ()=>void | | | querycomplete | 报表展示的数据发生变化后触发 | ()=>void | | | queryerror | 报表展示的数据发生变化发生错误是触发 | ()=>void | | | datafilecancelled | 取消打开本地本地数据文件时触发 | ()=>void | | | loadingreportfile | 打开远程报表时触发 | ()=>void | | | openingreportfile | 打开本地报表是触发 | ()=>void | | | reportfilecancelled | 打开本地报表取消时触发 | ()=>void | | | reportfileerror | 打开本地报表文件出错时触发 | ()=>void | | | reportfileloaded | 本地报表成功打开数据加载完之后触发 | ()=>void | |

方法

| 方法名 | 说明 | 类型 | | --------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- | | addCalculatedMeasure | ## 待确认 | (measure)=>void | | addCondition | ## 待确认 | (condition)=>void | | clear | 清空报表数据 | ()=>void | | clearFilter | 清除筛选, hierarchyName 项对应的所有值 | (hierarchyName)=>void | | collapseAllData | 清空报表数据 | ()=>void | | collapseData | 折叠所有数据 | ()=>void | | clear | 折叠 hierarchyName 对应列表名的下层数据 | (hierarchyName)=>void | | connectTo | 直接连接 json,本地,远程,数据或数据文件 | (dataSource)=>void | | dispose | 关闭报表 | ()=>void | | expandAllData | 展开所有层级的数据, withAllChildren 是否包含所有子集, 可不传 | (withAllChildren)=>void | | expandData | 展开 hierarchyName 对应列表名的下层数据 | (hierarchyName)=>void | | exportTo | 报表导出 | (type, exportOptions, callback)=>void | | getAllConditions | ##待确认 | ()=>ConditionalFormat[] | | getAllHierarchies | ##待确认 | ()=>Hierarchy[] | | getAllMeasures | ##待确认 | ()=>Measure[] | | getCell | ##待确认 | (rowIdx, colIdx)=>CellData | | getColumns | ##待确认 | ()=>Hierarchy[] | | getCondition | ##待确认 | (id)=>ConditionalFormat | | getData | ##待确认 | (options, callback)=>void | | getFilter | ##待确认 | (hierarchyName)=> FilterItem[] | | getFilterProperties | ##待确认 | (hierarchyName)=>FilterProperties | | getFormat | ##待确认 | (measureName)=>Format | | getMeasures | ##待确认 | ()=>Measure[] | | getMembers | ##待确认 | (hierarchyName, memberName, callbackHandler)=> Member[] | | getOptions | ##待确认 | ()=>Options | | getReportFilters | ##待确认 | ()=>Hierarchy[] | | getReport | ##待确认 | (format)=>Report | | getRows | ##待确认 | ()=>Hierarchy[] | | getSelectedCell | ##待确认 | ()=>CellData | | getSort | ##待确认 | (hierarchyName)=>string | | load | ##待确认 | (url)=>void | | on | ##待确认 | (eventType, handler)=>void | | off | ##待确认 | (eventType, handler)=>void | | open | ##待确认 | ()=>void | | openFieldsList | ##待确认 | ()=>void | | print | ##待确认 | (options)=>void | | refresh | ##待确认 | ()=>void | | removeAllCalculatedMeasures | ##待确认 | ()=>void | | removeAllConditions | ##待确认 | ()=>void | | removeCondition | ##待确认 | (id)=>void | | removeCalculatedMeasure | ##待确认 | (uniqueName)=>void | | removeSelection | ##待确认 | ()=>void | | runQuery | ##待确认 | (slice)=>void | | save | ##待确认 | (filename, destination, callbackHandler, url, embedData)=>string | | setBottomX | ##待确认 | (hierarchyName, num, measureName)=>void | | setFilter | ##待确认 | (hierarchyName, items, negation)=>void | | setFormat | ##待确认 | (format, measureName)=>void | | setOptions | ##待确认 | (options)=>void | | setReport | ##待确认 | (report)=>void | | setSort | ##待确认 | (hierarchyName, sortName, customSorting)=>void | | setTopX | ##待确认 | (hierarchyName, num, measureName)=>void | | sortValues | ##待确认 | (axisName, type, tuple, measureName)=>void | | updateData | 更新报表数据, option 参数可传, 可不传 | (dataSource, options)=>void |