Nothing Prevents Misery

    legions-thirdparty-plugin
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.9 • Public • Published

    legions-thirdparty-plugin

    TODO: 第三方插件调用工具库

    Usage

    npm install --save legions-thirdparty-plugin
    import { legionsThirdpartyPlugin } from 'legions-thirdparty-plugin';
    legionsThirdpartyPlugin.use([
      {
        name: 'excel',
        url: 'https://qa-zy.hoolinks.com/static/plugin/excel.min.js',
      },
      {
        name: 'clipboard',
        url: 'https://qa-zy.hoolinks.com/static/plugin/clipboard.min.js',
      },
    ]);
    
    /* ====== start 如果在使用插件数据时,不确定插件是否返回,可以这样使用====== */
    legionsThirdpartyPlugin.subscribe('clipboard', () => {
      console.log(legionsThirdpartyPlugin.plugins);
    });
    /* ====== end====== */
    
    /* ====== start 如果在使用插件数据时,确定插件返回,可以这样使用====== */
    legionsThirdpartyPlugin.plugins.clipboard;
    /* ====== end====== */

    详情见 d.ts 文档

    Install

    npm i legions-thirdparty-plugin

    DownloadsWeekly Downloads

    2

    Version

    0.0.9

    License

    MIT

    Unpacked Size

    130 kB

    Total Files

    156

    Last publish

    Collaborators

    • duanguang