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

@zinghub/zing-print

v0.1.1

Published

ERP 打印组件库基础骨架(Vue3 + Vite + TS + Ant Design Vue)

Readme

知印(@zinghub/zing-print)

基于 QZ Tray 的工业级标签打印工具。

安装

pnpm add @zinghub/zing-print

快速开始(PrintSetting 打印设置页)

@zinghub/zing-print 依赖 vue@3ant-design-vue@4,请确保你的业务项目已安装并正确初始化 Ant Design Vue。

使用前请确保:

  • 已安装并启动 QZ Tray:https://qz.io/download/
  • 浏览器可访问本机 QZ Tray 服务(默认 localhost 端口)

1)在 main.ts 注册(Ant Design Vue + 知印)

import { createApp } from 'vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import ZingPrint from '@zinghub/zing-print'

const app = createApp(/* root */)
app.use(Antd)
app.use(ZingPrint)

2)在页面中使用 PrintSetting

import { PrintSetting } from '@zinghub/zing-print'
<template>
  <PrintSetting />
</template>

<script setup lang="ts">
import { PrintSetting } from '@zinghub/zing-print'
</script>

3)打印能力说明

PrintSetting 已内置以下能力,可直接用于业务开发:

  • 连接 QZ Tray
  • 获取/选择打印机,并保存默认打印机
  • 调整模板参数(字体、间距、条码/二维码尺寸、标签尺寸等)
  • 预览标签
  • 打印测试(使用内置模板1渲染并调用 QZ Tray 打印)

内置模板打印(LabelPrinter)

如果你不想用 PrintSetting,也可以直接用 LabelPrinter 渲染内置模板(Template1/2/3),用于页面预览或自定义布局。

<template>
  <LabelPrinter
    :template="1"
    text1="产品"
    value1="苹果"
    text2="批次"
    value2="A001"
    text3="日期"
    value3="2024-01-01"
    text4="规格"
    value4="500g"
    text5="产地"
    value5="山东"
    qrcode="123456789"
    barcode="123456789"
    :label-width-mm="60"
    :label-height-mm="40"
  />
</template>

<script setup lang="ts">
import { LabelPrinter } from '@zinghub/zing-print'
</script>

低层方法(可选)

import { connectQZ, listPrinters, printHTML } from '@zinghub/zing-print'

本地运行(开发/预览)

pnpm install
pnpm dev

演示

知印演示

捐赠支持

如果知印对你有帮助,欢迎请作者喝杯咖啡。

| 微信 | 支付宝 | | --- | --- | | | |