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

sclinks-design-vue-net

v1.8.0

Published

sc-links前端设计-网络请求

Readme

sclinks-design-vue-net

网络请求

Query 查询参数

IdentifyParameter 标识参数

constructor(serviceName: string, entityId: string)

  • serviceName: string 服务名称
  • entityId: string 实体ID
  • IdentifyParameter.create(...).findById(httpRequest:HttpRequest)
  • IdentifyParameter.create(...).deleteForId(httpRequest: HttpRequest)
  • IdentifyParameter.create(...).changeField(httpRequest: HttpRequest, entityIdArray: Array = [], fieldName:string, value: any)

BaseSumParameter 基础统计, 对不同字段进行sum统计

constructor(serviceName:string, fieldNames:Array = [], query: Query)

  • serviceName: string 服务名称
  • fieldNames: Array 统计字段名称
  • query: Query 查询参数, 可选

CascadeItemParameter 获取级联数据

constructor(serviceName: string, endLevel: number, parentId: string)

  • serviceName: string 服务名称
  • endLevel: number 结束层级
  • parentId: string 父级ID

FieldChangeParameter 批量更新单个字段的提交参数

constructor(serviceName: string, entityIdArray: Array = [], fieldName: string, value: any)

  • serviceName: string 服务名称
  • entityIdArray: Array 实体ID数组
  • fieldName: string 字段名称
  • value: any 更新的字段值

ModifyEntityParameter

constructor(serviceName: string, entityClassName: string, entityId: any = undefined)

  • serviceName: string 服务名称
  • entityClassName: string 实体类名称
  • entityId: any 实体ID

GridDataParameter 获取表格数据查询语句

constructor(serviceName: string, first: number, maxResult: number, orderField: String ='', orderType: String = '', queryCondition: Query)

  • serviceName: string 服务名称
  • first: number 起始记录数
  • maxResult: number 最大记录数
  • orderField: String 排序字段
  • orderType: String 排序类型
  • queryCondition: Query 查询条件

HttpRequest 普通HTTP请求, axios实现

  • 使用 app.config.globalProperties的方式来使用
    • main.ts/js 中配置:
    • 组件中使用
  • 推荐使用pina来初始化和使用
  • HttpEvent 构建HttpRequest需要传递的参数
    • startRequest(config:any) 请求开始时调用
    • endRequest(config:any) 请求结束时调用
    • requestError(error:any) 请求错误时调用
    • responseError(error:any) 响应错误时调用
    • getBaseUrl() 获取基础URL
    • getContextPath() 获取上下文路径, 默认空字符串
    • getTimeout() 获取超时时间, 默认0

StreamRequest 流式请求, @microsoft/fetch-event-source实现

  • postStreamRequest(onMessage: (data: any)=>void, onClose:()=>{}, onError:(error:any)=>{})发送流式请求
    • onMessage: (data: any)=>void 响应数据时调用
    • onClose:()=>{} 响应关闭时调用
    • onError:(error:any)=>{} 响应错误时调用

FileUpload 文件上传, 推荐放入到pina中管理

  • generatorForAlibabaOss() 构建阿里云OSS上传器
  • generatorForLinks(fileUploadInfo: LinksFileUploadInfo) 构建自建文件上传器
    • fileUploadInfo: LinksFileUploadInfo 文件上传信息

FileUploadHandler 文件上传处理器

  • upload(file: File, onProgress: (progress: number) => void) 上传文件
    • file: File 文件对象
    • onProgress: (progress: number) => void 上传进度回调

LinksFileUploadInfo 自建文件上传信息

  • fileUploadUrl: string 文件上传地址
  • fileDownloadUrl: string 文件下载地址
  • customFileName: string 自定义文件名参数

流式请求示例代码, 使用微软@microsoft/fetch-event-source实现, 由于小程序不支持, 在该项目中进行移除