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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cyning/cy-vue2-ui

v0.0.51

Published

基于 Vue 2 的轻量级组件库,适用于 uni-app

Readme

cyning-vue2-ui

🎨 一个基于 Vue 2 的 UI 组件库,目前主要面向微信小程序开发场景,也适用于其他移动端项目。

⚠️ 当前仍在开发中,接口可能会频繁变更,请谨慎用于生产环境。


✨ 特性

  • ✅ 支持 Vue 2.x
  • ✅ 支持微信小程序(通过 uni-app 或原生绑定)
  • ✅ 内置多个基础组件(Button、Modal 等)

📦 安装

yarn add @cyning/cyning-vue2-ui
# 或
npm install @cyning/cyning-vue2-ui --save

🔐 加密解密功能

配置

在项目初始化时配置加密解密参数:

import CyUI from '@cyning/cyning-vue2-ui'

Vue.use(CyUI, {
  // 加密解密配置
  cryptoConfig: {
    encryptType: 'aes', // 加密类型:'aes' | 'rsa' | 'hybrid'
    aesKey: 'your-aes-key', // AES密钥
    randomChars: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' // 随机字符集
  },
  rsaConfig: {
    publicKey: 'your-rsa-public-key', // RSA公钥
    privateKey: 'your-rsa-private-key' // RSA私钥
  }
})

使用方法

1. 在请求中使用加密

import { post } from '@cyning/cyning-vue2-ui'

// 启用加密
post('/api/login', userData, {
  encrypt: true, // 启用加密
  encryptType: 'aes', // 可选:指定加密类型
  decrypt: true // 启用解密
})

2. 手动加密解密

import { 
  encryptWithAes, 
  decryptWithAes, 
  rsaEncrypt, 
  rsaDecrypt, 
  generateAesKey 
} from '@cyning/cyning-vue2-ui'

// AES加密
const aesKey = generateAesKey()
const encrypted = encryptWithAes('hello world', aesKey)
const decrypted = decryptWithAes(encrypted, aesKey)

// RSA加密
const rsaEncrypted = rsaEncrypt('hello world')
const rsaDecrypted = rsaDecrypt(rsaEncrypted)

3. 加密类型说明

  • aes: 使用AES对称加密
  • rsa: 使用RSA非对称加密
  • hybrid: 混合加密(RSA加密AES密钥,AES加密数据)

配置项说明

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | cryptoConfig.encryptType | string | 'aes' | 默认加密类型 | | cryptoConfig.aesKey | string | - | AES密钥 | | cryptoConfig.randomChars | string | 默认字符集 | 随机字符集 | | rsaConfig.publicKey | string | - | RSA公钥 | | rsaConfig.privateKey | string | - | RSA私钥 |

请求参数说明

| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | encrypt | boolean | false | 是否启用加密 | | decrypt | boolean | false | 是否启用解密 | | encryptType | string | 配置的默认值 | 加密类型 | | publicKey | string | 配置的默认值 | RSA公钥 | | aesKey | string | 配置的默认值 | AES密钥 |