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

popup-supwisdom

v0.1.46

Published

一款弹框浮层的插件

Downloads

37

Readme

popup.js

一款弹框浮层的插件

已默认自动识别三端,为了防止识别无效,支持自定义设置当前所在端

集成方式1: npm安装

    npm i popup-supwisdom --save
    
    import('popup-supwisdom/popup.css')
    var EvaPopup = require('popup-supwisdom/popup.js')

集成方式2: cdn引入

evaluation-center.dev2.supwisdom.com 按照各个学校的实际路径地址调整

    <!-- 引入样式 -->
    <link rel="stylesheet" href="http://evaluation-center.dev2.supwisdom.com/eva-plugin/popup.css">
    <!-- 引入组件库 -->
    <script src="http://evaluation-center.dev2.supwisdom.com/eva-plugin/popup.js"></script>

最简用法示例

evaluation-center.dev2.supwisdom.com 按照各个学校的实际路径地址调整

    new EvaPopup({
        objKey: '2323', // 对象key 必传
        token: '', // token值 必传
        requestUrl: 'https://evaluation-center.dev2.supwisdom.com', // 评价中台服务url 必传
        userAgent: 'pc', // 系统自动获取所在端,支持自定义当前所在端 参数app,pc,wx 非必传,不传根据当前页面的userAgent判断
    })

完整用法示例

evaluation-center.dev2.supwisdom.com 按照各个学校的实际路径地址调整

    var pop = new EvaPopup({
        objKey: '2323', // 对象key 必传
        token: '', // token值 必传
        requestUrl: 'https://evaluation-center.dev2.supwisdom.com', // 评价中台服务url 必传
        userAgent: 'pc', // 系统自动获取所在端,支持自定义当前所在端 参数app,pc,wx 非必传,不传根据当前页面的userAgent判断
        title: '',  // 支持自定义传标题 非必传,不传则取document.getElementsByTagName('title')[0].innerText
        url: '', // 支持自定义传所在页面的url 非必传,不传则取location.href
        answers: function () {
            console.log('点击 "小希问答" 按钮时的回调,可不定义')
        },
        evaluation: function () {
            console.log('点击 "服务评价" 按钮时的回调,可不定义')
        },
        feedback: function () {
            console.log('点击 "咨询反馈" 按钮时的回调,可不定义')
        }
    })

    // 监听事件
    pop.on('answers', function () {
        console.log('点击 "小希问答" 按钮时的监听,可不定义')
    })
    pop.on('evaluation', function () {
        console.log('点击 "服务评价" 按钮时的监听,可不定义')
    })
    pop.on('feedback', function () {
        console.log('点击 "咨询反馈" 按钮时的监听,可不定义')
    })

API

Props

| 参数 | 说明 | 类型 | 默认值 | 可选值 | 是否必填| | ---- | ---- | ---- | ---- | ---- | ---- | | objKey | 对象key | String | ' ' | - | 是 | | token | token值 | String | ' ' | - | 是 | | requestUrl | 评价中台服务url | String | ' ' | - | 是 | | userAgent | 系统自动获取所在端,支持自定义当前所在端 参数 非必传 | - | 系统自动获取 | app,pc,wx | 否 | | title | 自定义标题 | String | 当前页面的title | - | 否 | | url | 自定义传所在页面的url | String | 当前页面的url | - | 否 |

Events

| 事件名 | 说明 | 回调函数 | | ---- | ---- | ---- | | answers | 点击问答时触发 | - | | evaluation | 点击评价时触发 | - | | feedback | 点击咨询反馈时触发 | - |