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

@deot/vc-components

v1.2.5

Published

`@deot/vc-components` 提供 `@deot/vc` 的桌面端与移动端组件。移动端组件通常使用 `M` 前缀,并与桌面端组件从同一入口导出。

Readme

@deot/vc-components

@deot/vc-components 提供 @deot/vc 的桌面端与移动端组件。移动端组件通常使用 M 前缀,并与桌面端组件从同一入口导出。

安装

pnpm add @deot/vc-components @deot/vc-locale vue

使用

import { Button, MButton } from '@deot/vc-components';

各组件的示例与 API 按使用场景收录在文档站侧栏中。应用项目通常可以直接从聚合包 @deot/vc 引入。

VcInstance

完整的配置契约、运行时示例与 API 请参阅 全局配置(VcInstance)。

VcInstance 用于统一配置语言、主题变量和组件的全局默认行为。configure() 可以多次调用,每次只更新传入的顶层配置项。

import { VcInstance } from '@deot/vc-components';
import { enUS } from '@deot/vc-locale';

VcInstance.configure({
	locale: enUS,
	Theme: {
		variables: {
			brandColor: '#456cf6'
		}
	}
});

也可以从聚合包引入:

import { VcInstance, enUS } from '@deot/vc';

组件专属的全局配置使用组件名作为键,例如 Theme、Image、Upload 和 RecycleList。局部 props 可以继续覆盖对应组件的全局默认值。

FilePreview 的配置由 FilePreview、UploadPicker 与 Editor 共用,用于自定义文件类型识别、文件名推导和接管预览(Editor 不使用 enhancer):

VcInstance.configure({
	FilePreview: {
		// 返回空值时回退内置规则
		getFileType: ({ source }) => (/\.jpg!/.test(source) ? 'image' : undefined),
		// 数据未提供名称时调用,返回空值时回退内置规则
		getFileName: ({ source }) => decodeURIComponent(source.split('/').pop()).replace(/^\d+_/, ''),
		// 返回真值(或 resolve 真值)表示已接管,不再执行内置预览
		enhancer: ({ current, data, instance }) => {
			const item = data[current];
			if (item.type !== 'file') return false;
			window.open(`https://view.example.com/?src=${encodeURIComponent(item.source)}`);
			return true;
		}
	}
});