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

mix-public

v1.2.4

Published

use mix-app

Downloads

109

Readme

MIX-PUBLIC

说明

  • mixAPP依赖,可用于web/app开发

安装方法

  // npm
  npm i mix-public
  // yarn
  yarn mix-public
  // pnpm
  pnpm i mix-public

初始化方式

  // 布局使用(入口文件)
  import mixRender from "mix-public"

  const mixPublicLib = mixRender({
        mixProjectType: mixProjectType, // 项目类型: 在服务端创建的项目标识
        mixVersion: mixVersion, // 项目版本号: 服务端的版本标识
        mixAppKey: mixAppKey, // appKey: 当前APPKey
        mixApptype: mixApptype, // app类型: web/app
        mixDeviceInfo: mixDeviceInfo // 项目版本号: 服务端的版本标识
      });
  import 'mix-public/mixRender.css'; // 引入web端app基础样式
  mixPublicLib // 为原生基础调用方法,可在页面使用

  // 单独方法使用
  import mixRender from "mix-public"
  const PublicLib = mixRender({
    mixJustMethod: true,
    mixApptype: apptype, // app类型: web/app
    mixVersion: mixVersion, // 项目版本号: 服务端的版本标识
  });

生命周期

  // 页面加载时
  OnloadPage((op)=>{
    // op为页面参数,包含上一个页面参数
  })

  //页面退回
  //immediate:是否立即执行
  OnStartLoad(()=>{
    // 添加当前方法,在页面退回时执行
  },{immediate:false})

方法使用方式


  // 调用类型
  //1.直接调用类
  mixPublicLib.PutCookieInfo('key','value')
  //2.同步返回类
  const result = mixPublicLib.GetCookieInfo('key')
  //1.异步返回类
  mixPublicLib.UploadPhoto({PhotoCount:1, isCut:true, Quality:1}).then(file=>{
    console.log(file)
  })

更新记录

  • v1.0.0 项目初始化
  • v1.0.1 调整文档调用方式
  • v1.0.2 调整publicLib调用方式(区分类app样式及单公共调用方法)
  • v1.0.3 添加pag依赖(调整单独调用方法参数)
  • v1.0.4 title模块添加背景色配置
  • v1.0.5 优化网页端实现方法(优化统一图片选择回调参数/APP跳转/小程序跳转/添加 onstart 生命周期/优化返回根页面/优化链接分享/添加 web 图片下载方法)
  • v1.0.6 去除冗余依赖/优化 tabbar 选择逻辑
  • v1.0.7 整体依赖调用方式调整/优化目录结构
  • v1.0.8 依赖引用调整
  • v1.0.9 依赖引用调整
  • v1.1.0 方法包调用方式整体调整
  • v1.1.1 添加OnloadPage生命周期/调整 goto 方法参数
  • v1.1.2 修复方法环境变量/添加 a 标签捕获自定义站内跳转
  • v1.1.3 方法包剩余调用方式整体调整
  • v1.1.4 goto 方法参数调整
  • v1.1.5 部分方法网页版完善/优化方法样式
  • v1.1.6 添加APPpop页面
  • v1.1.7 添加文档模板/部分 web 实现添加
  • v1.1.8 添加核心方法TS配置,部分方法修复/部分方法吗规范统一
  • v1.1.9 添加视频下载/视频预览/音频录制方法
  • v1.2.0 ios方法调用调整/安卓方法兼容性调整
  • v1.2.1 标题栏样式兼容调整
  • v1.2.2 添加获取当前页面是否使用原生标题方法
  • v1.2.3 修复获取页面信息方法导入错误
  • v1.2.4 修复首页 tabbar 图片及PAG动画文件宽度问题