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

@qynpm/excel-preview

v1.0.1

Published

起印表格数据预览与轻量编辑组件包。

Readme

@qynpm/excel-preview

Qy 表格数据预览和轻量编辑组件。组件接收已经归一化的二维数组或对象数组;x-data-spreadsheet 只在包内部 renderer 中使用,不解析 .xlsx/.xls,也不调用业务接口。

使用

<script setup lang="ts">
import { ref } from 'vue'
import { QyExcelPreview, type QyExcelRow } from '@qynpm/excel-preview'

const open = ref(false)
const rows = ref<QyExcelRow[]>([])
const columns = [
  { key: 'name', title: '名称' },
  { key: 'quantity', title: '数量' },
  { key: 'enabled', title: '启用', readOnly: true }
]
const data = [
  { name: '纸箱', quantity: 0, enabled: false },
  { name: '标签', quantity: 12, enabled: true }
]
</script>

<template>
  <button type="button" @click="open = true">预览</button>
  <QyExcelPreview
    v-model:open="open"
    :data="data"
    :columns="columns"
    title="表格预览"
    @confirm="rows = $event"
  />
</template>

Qy 公共协议

  • props:opendatacolumnstitlewidthheightreadOnlyfreezeRowsfreezeColumnsloadingerroremptyText
  • data 可以是二维数组或按 column key 读取的对象数组;null 映射为空文本,数字、布尔值和 Date 映射为稳定文本。
  • columnskey 必须非空且不能重复;readOnly 可锁定单列,readOnly prop 可锁定整张表。第一行是列标题,默认冻结标题行。
  • emits:update:open(false)confirm(rows)cancel。确认只返回按 column key 组装的非空行;0false 的文本不会被当作空行。
  • expose:reload()getRows()close()。不暴露 Spreadsheet 实例、vendor event 或私有 DOM。

单组件入口:

import QyExcelPreview from '@qynpm/excel-preview/qy-excel-preview'

宿主仍需按当前 Qy UI 约定提供 @qynpm/ui、Vue 和 Element Plus runtime。文件解析、上传、业务 API、字段转换和确认后的提交逻辑由宿主负责。