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

tiptap-print-designer

v0.0.43

Published

一个开箱即用的富文本打印设计器,基于 tiptap 和 Vue3 开发

Readme

tiptap-print-designer

npm version license downloads

一个开箱即用的富文本打印设计器,基于 tiptap 和 Vue3 开发。让开发者可以像写文档一样设计打印模板。

✨ 特性

  • 🎨 所见即所得 - 基于 tiptap 的富文本编辑器
  • 📝 字段绑定 - 支持动态数据字段绑定
  • 📊 表格支持 - 支持表格和数据表格
  • 🧩 自定义组件 - 支持自定义 Vue 组件
  • 🌐 OpenAPI 集成 - 与 OpenAPI 文档深度集成
  • 🎯 TypeScript 支持 - 完整的 TypeScript 类型定义

📦 安装

npm install tiptap-print-designer
# 或
yarn add tiptap-print-designer
# 或
pnpm add tiptap-print-designer

🚀 快速开始

1. 引入样式

在你的入口文件中引入样式:

import 'tiptap-print-designer/index.css'

2. 使用设计器

<script setup lang="ts">
import { Designer } from 'tiptap-print-designer'

function handleSave(templateData) {
  console.log('保存模板数据:', templateData)
}
</script>

<template>
  <Designer @save="handleSave" />
</template>

3. 使用渲染器

<script setup lang="ts">
import type { TemplateData } from 'tiptap-print-designer'
import { Render } from 'tiptap-print-designer'
import { ref } from 'vue'

const template = ref<TemplateData>({
  content: '<p><field-node label="用户信息" path="user.name" format="" fontsize="12pt"></field-node></p>',
  page: {
    size: ['210mm', '297mm'],
    paperType: 'A4',
  },
  dataSources: [],
  mockData: {}
})

const data = ref({
  user: { name: '张三' }
})
</script>

<template>
  <Render :template="template" :data="data" />
</template>

🎯 功能特性

已实现功能:

  • ✅ 基础富文本功能
  • ✅ 字段绑定
  • ✅ 表格支持
  • ✅ 数据表格
  • ✅ 自定义组件

计划中功能:

  • ⏳ 二维码 / 条形码
  • ⏳ 分页符
  • ⏳ 分页(页头页脚)

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT © l1m2e

🔗 相关链接