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

uni-dz-miniprogram

v0.0.2

Published

uni-app 小程序公共组件与工具库(含 quote-table、z-paging 等)

Readme

uni-dz-miniprogram

uni-app 小程序公共组件与工具库(workspace 本地包)。

使用

1. 添加依赖

package.json

"dependencies": {
  "uni-dz-miniprogram": "workspace:*"
}

2. 应用启动时注入配置

src/main.ts

import { configureQuoteTable } from 'uni-dz-miniprogram';
import { getStaticUrl } from '@/util/util';

configureQuoteTable({
  getStaticUrl,
});

3. 引入组件

<script setup lang="ts">
import QuoteTable from 'uni-dz-miniprogram/components/quote-table/quote-table.vue';
import { Column, SortOrder, TextAlign } from 'uni-dz-miniprogram/components/quote-table/type';
</script>

4. timeChart 列类型

包内不再内置行情分时图(避免拖入业务依赖)。若列 type: 'timeChart',请通过 timeChart 具名插槽传入宿主项目的图表组件:

<QuoteTable ...>
  <template #timeChart="{ row, rowHeight }">
    <QuoteTimeChart
      :market="row.market"
      :code="row.code"
      :time="row.time"
      :lastClose="row.lastclose"
      :height="rowHeight"
    />
  </template>
</QuoteTable>

不传插槽时,timeChart 列回退为普通文本单元格。

组件清单

  • components/quote-table/quote-table.vue — 公共行情表格
  • components/no-data/no-data.vue — 空状态占位
  • components/retry/retry.vue — 加载失败重试
  • components/z-paging/* — 分页列表主组件(完整复制自 z-paging 组件库)
  • components/z-paging-cell/* — z-paging 配套的 cell 组件
  • components/z-paging-empty-view/* — z-paging 配套的空状态组件
  • components/z-paging-swiper/* — z-paging 配套的 swiper 组件
  • components/z-paging-swiper-item/* — z-paging 配套的 swiper-item 组件

类型

import {
  Column,
  SortOrder,
  TextAlign,
  DataItem,
  QueryParams,
} from 'uni-dz-miniprogram/components/quote-table/type';

与原组件的差异

  • getStaticUrl 运行期注入:组件内的图标地址不硬编码,通过 configureQuoteTable({ getStaticUrl }) 由宿主项目注入。
  • timeChart 列用插槽实现:避免在包内耦合 QuoteTimeChart 及其 usePolling / quote-client-s6 等业务依赖。mp-weixin 不支持 <component :is>,故采用插槽方案。

静态资源

组件使用的图标走运行期 CDN(通过 getStaticUrl 解析),宿主项目需保证 CDN 上以下路径可访问:

  • /market/icon_sort.svg
  • /market/icon_sort_asc.svg
  • /market/icon_sort_desc.svg
  • /table-arrow.svg
  • /home/no-data.png
  • /error.svg