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

baskreport

v0.2.0

Published

中式web报表工具BaskReport前端组件,通过该组件可以在您WEB应用页面中任意位置直接预览指定BaskReport报表文件;也可以直接调用该项目的的BaskReport对象实现报表的导出或打印操作。

Downloads

127

Readme

概述

中式web报表工具BaskReport前端组件,通过该组件可以在您WEB应用页面中任意位置直接预览指定BaskReport报表文件;也可以直接调用该项目的的BaskReport对象实现报表的导出或打印操作。

BaskReport是BaskSoft旗下一款web报表软件,它拥有强大的报表展示能力和卓越的大数据处理性能。BaskReport官网:http://www.basksoft.com

本项目基于Vue3+TS编写。

使用方法

npm i baskreport --S

安装BaskReport组件包。

在Vue3项目中使用BaskReportViewer组件

使用该组件可以直接预览一个已发布的BaskReport报表

首先导入使用该组件需要用到的样式:

import 'baskreport/dist/style.css'

然后再导入该组件:

import {BaskReportViewer} from 'baskreport'

导入后就可以在页面中使用它,需要注意的时,使用该组件时必须要指定id或code属性(二选一)以及baseUrl属性,示例:

<BaskReportViewer code="ds" :pageIndex="pageIndex" :callback="getReportInfo" baseUrl="http://localhost:8080/baskserver-test"></BaskReportViewer>

这里的callback属性用于获取报表加载后的一些信息,诸如总页数,允许使用的浏览工具等,上面的getReportInfo函数内容如下:

const getReportInfo = (info: ReportInfo) => {
  const tools = info.tools;
  for (let tool of tools) {
    console.log('name:' + tool.name);
  }
  totalPages.value = info.totalPages;
}

在JS中使用BaskReport对象

首先导入该对象

import {BaskReport} from 'baskreport'

然后就可以调用该对象中的打印、导出之类的方法,该对象实现的功能与Javascript-API集成中描述的相同,借助TS的代码提示功能,大家可以参照使用。

关于该组件的详细使用方法,请参考官方文档:https://basksoft.com/doc/report/output/components.html