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

yl-ai-modal-vue2

v0.1.8

Published

vue-cli 5.0.8 vue2.x

Readme

node 版本号 14.20.0

基础依赖

vue-cli 5.0.8
vue2.x

版本更新记录

| 版本号 | 变更内容 | | ------ | -------------------------------------------------------- | | 0.1.8 | 调整动画间隔 | | 0.1.7 | 添加 iframe 获取语音权限的配置 | | 0.1.6 | 添加了网站部署时的相对路径,以解决图片资源地址错误的问题 | | 0.1.5 | 已完成开发,补充使用文档 | | 0.1.4 | 调试打包构建问题 | | 0.1.3 | 修复 0.1.2 未修复完成的 gif 图无法正常渲染的问题 | | 0.1.2 | 修复 gif 图无法正常渲染的问题 | | 0.1.1 | 测试 gif 图是否可以正常渲染,系测试版本 | | 0.1.0 | 初始版本,仅供测试包安装依赖用 |

vue2.x 使用示例

注意 process.env.BASE_URL 为项目部署时的相对路径,默认值为 / 该弹框使用的图片素材会涉及到图片路径问题,所以请留意 你当前项目自己的 process.env.BASE_URL 是否正确,该 npm 插件会使用你项目中的 process.env.BASE_URL 。

<template>
  <div class="home">
    <button type="button" @click="initAiModal">初始化/销毁</button>
  </div>
</template>

<script>
import YlAiModalVue2 from 'yl-ai-modal-vue2';
export default {
  name: 'HomeView',
  components: {},
  data() {
    return {
      aiModal: null,
    };
  },
  methods: {
    initAiModal() {
      if (this.aiModal) {
        this.aiModal.destroy();
        this.aiModal = null;
        return;
      }
      /*
        必填参数:系统url
        其他可拼接参数需要拼接在url后
        accessToken 登录token 必传
        refreshToken 刷新token 必传
        dark=true 适配黑色系 可选
        publicPath 项目部署时的相对路径,默认值为 / 可选
      */
      const accessToken = '123';
      const refreshToken = '456';
      const dark = 'true';
      this.aiModal = YlAiModalVue2({
        url: `http://192.168.10.7:8880/sso?accessToken=${accessToken}&refreshToken=${refreshToken}&dark=${dark}`,
        // 如果你的项目打包时的public不是 ./ 或 / ,那么要把你项目的 publicPath 传进去
        publicPath: process.env.BASE_URL,
      });
    },
  },
};
</script>