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

wx-screen-ui

v1.0.22

Published

A Vue 3 component library

Readme

Wx Screen UI

一个基于 Vue 3 的组件库,提供了一系列常用的 UI 组件,帮助开发者快速构建前端界面。

特性

  • 基于 Vue 3 开发
  • 支持按需引入
  • 组件带有 Wx 前缀,避免命名冲突
  • 响应式设计
  • 易于使用和定制

安装

# 使用 npm
npm install wx-screen-ui

# 使用 yarn
yarn add wx-screen-ui

# 使用 pnpm
pnpm add wx-screen-ui

快速开始

全局引入

main.js 中引入:

import { createApp } from "vue";
import App from "./App.vue";
import WxScreenUI from "wx-screen-ui";
import "wx-screen-ui/style.css";

const app = createApp(App);
app.use(WxScreenUI);
app.mount("#app");

按需引入

在组件中按需引入:

import { WxEmpty, WxTable } from "wx-screen-ui";
import "wx-screen-ui/style.css";

export default {
	components: {
		WxEmpty,
		WxTable,
	},
};

组件列表

基础组件

  • WxEmpty - 空状态组件
  • WxRadio - 单选框组件
  • WxPagination - 分页组件

数据展示

  • WxTable - 表格组件
  • WxEcharts - ECharts 图表组件

媒体组件

  • WxVideoFromFlv - FLV 视频播放器组件
  • WxVideoFromHls - HLS 视频播放器组件

消息提示

  • WxMessage - 消息提示组件

组件使用示例

WxEmpty 组件

<template>
	<WxEmpty />
</template>

<script setup>
	import { WxEmpty } from "wx-screen-ui";
	import "wx-screen-ui/style.css";
</script>

WxTable 组件

<template>
	<WxTable :data="tableData" :columns="columns" />
</template>

<script setup>
	import { WxTable } from "wx-screen-ui";
	import "wx-screen-ui/style.css";

	const tableData = [
		{ id: 1, name: "张三", age: 20 },
		{ id: 2, name: "李四", age: 22 },
	];

	const columns = [
		{ prop: "id", label: "ID" },
		{ prop: "name", label: "姓名" },
		{ prop: "age", label: "年龄" },
	];
</script>

开发指南

克隆项目

git clone <repository-url>
cd wx-screen-ui

安装依赖

npm install

开发模式

npm run dev

构建组件库

npm run build

浏览器支持

  • Chrome (最新版本)
  • Firefox (最新版本)
  • Safari (最新版本)
  • Edge (最新版本)

许可证

MIT

主题配置

Wx Screen UI 支持主题颜色的自定义,默认主题颜色为 rgba(18, 154, 232, 1)

主题管理 API

import { setTheme, getTheme, resetTheme, initTheme } from "wx-screen-ui";

// 设置主题颜色
setTheme({
  primaryColor: "255, 0, 0" // 红色主题
});

// 获取当前主题配置
const currentTheme = getTheme();
console.log(currentTheme);

// 重置主题到默认值
resetTheme();

// 初始化主题(从本地存储加载)
initTheme();

参数说明

  • primaryColor: 主色调,格式为 "r, g, b",例如 "18, 154, 232"

主题变量

以下是可用于自定义的主题变量:

| 变量名 | 描述 | 默认值 | | --- | --- | --- | | --wx-primary-color | 主色调的 RGB 值 | 18, 154, 232 | | --wx-primary | 主色调 | rgba(var(--wx-primary-color), 1) | | --wx-primary-light | 主色调的浅色版本 | rgba(var(--wx-primary-color), 0.2) | | --wx-primary-hover | 主色调的 hover 版本 | rgba(var(--wx-primary-color), 0.8) | | --wx-primary-disabled | 主色调的禁用版本 | rgba(var(--wx-primary-color), 0.4) | | --wx-primary-light | 主色调的浅色背景 | rgba(var(--wx-primary-color), 0.2) | | --wx-text-primary | 主要文本颜色 | #303133 | | --wx-text-secondary | 次要文本颜色 | #606266 | | --wx-text-placeholder | 占位文本颜色 | #909399 | | --wx-text-disabled | 禁用文本颜色 | #c0c4cc | | --wx-bg-color | 背景颜色 | #ffffff | | --wx-bg-color-light | 浅色背景颜色 | #f5f7fa | | --wx-bg-color-disabled | 禁用背景颜色 | #f5f7fa | | --wx-border-color | 边框颜色 | #dcdfe6 | | --wx-border-color-light | 浅色边框颜色 | #e4e7ed | | --wx-border-color-hover | 边框 hover 颜色 | rgba(var(--wx-primary-color), 0.5) | | --wx-shadow | 阴影 | 0 2px 12px 0 rgba(0, 0, 0, 0.1) | | --wx-shadow-light | 浅色阴影 | 0 0 0 2px rgba(var(--wx-primary-color), 0.2) |

深色主题适配

组件库默认支持系统的深色主题模式,会根据系统的颜色方案自动切换主题变量。

贡献

欢迎提交 Issue 和 Pull Request 来改进这个组件库。

联系我们

如果您有任何问题或建议,请随时联系我们。