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

@wemt/uniapp-vue3

v1.0.8

Published

一个基于 Vue 3 的 uni-app 开发框架,提供了一系列实用的工具和模块,帮助开发者快速构建 uni-app 应用。

Readme

@wemt/uniapp-vue3

一个基于 Vue 3 的 uni-app 开发框架,提供了一系列实用的工具和模块,帮助开发者快速构建 uni-app 应用。

✨ 功能特性

  • 🚀 基于 Vue 3 + TypeScript 开发
  • 📦 使用 Pinia 进行状态管理
  • 🔒 内置加密工具
  • 🌐 统一的网络请求处理
  • 🔄 自动的存储同步机制
  • 🎯 完整的类型支持
  • 📱 支持多端开发

📦 安装

npm install @wemt/uniapp-vue3

🚀 快速开始

import { createSSRApp } from "vue";
import App from "./App.vue";

import wemt from "@wemt/uniapp-vue3";

export function createApp() {
  const app = createSSRApp(App);
  app.use(wemt, {
    version: "100",
    debug: true,
    crypto: {
      key: "wemt2014@#$%^&*()_+QWERTYUIOPASDFGHJKL",
      iv: "wemt2014@#$%^&*",
      algorithm: "AES",
    },
    hook: {},
    language: {},
    request: {
      baseURL: "https://api.example.com",
      header: {
        "Content-Type": "application/json",
      },
      encrypt: true,
    },
    storage: {
      prefix: "wemt_",
      encrypt: true,
    },
  });
  return {
    app,
  };
}

模板中使用

<template>
  <view>
    <!-- 登录状态显示 -->
    <view v-if="$store.user">
      <text>已登录用户: {{ $store.user.user__id }}</text>
    </view>

    <view class="mt-8 space-y-6">
      <button @click="login">登录</button>
      <button @click="logout">退出</button>
    </view>
  </view>
</template>

选项式

export default {
  data() {
    return {};
  },
  methods: {
    login() {
      this.$wemt.user
        .login(
          {
            username: "username",
            password: "password",
          },
          (response: any) => {
            console.log("Login successful:", response);
          }
        )
        .catch((error: any) => {
          console.error("Login failed:", error);
        });
    },
    logout() {
      this.$wemt.user.logout();
    },
  },
};

组合式

import { getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance()!;
const wemt = proxy?.$wemt;

const wemt = inject("wemt");

核心模块

  • Storage: 本地存储管理 - 提供统一的本地存储接口,支持自动序列化和过期时间管理
  • Router: 路由管理 - 封装 uni-app 路由,提供类型安全的路由跳转和参数传递
  • Crypto: 加密工具 - 提供常用的加密解密功能,支持 MD5、AES 等算法
  • Utils: 通用工具函数 - 提供常用的工具函数,如日期格式化、字符串处理等
  • Hook: 事件钩子系统 - 提供全局事件订阅和发布机制,支持异步事件处理
  • User: 用户信息管理 - 管理用户登录状态、Token 和权限信息
  • Store: 状态管理 - 基于 Pinia 的状态管理,支持自动持久化
  • Request: 网络请求 - 统一的网络请求处理,支持自动 loading 和错误处理

依赖要求

  • Vue >= 3.4.21
  • Pinia >= 3.0.2
  • crypto.js >= 3.3.4

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT

👨‍💻 作者

Mutaoinc & Wemt Team


如果这个工具对你有帮助,请给个 ⭐ Star 支持一下!