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 🙏

© 2024 – Pkg Stats / Ryan Hefner

wl-notice-remind

v1.0.8

Published

通知弹窗组件

Downloads

1

Readme

通知弹窗

使用方法

npm install @stl/notice-remind

css:
    import "/node_modules/@stl/notice-remind/index.css"

ts:
    let stlNoticeRemind:any = new NoticeRemind({
        top:50
        right:20
    });
    let obj:any = {
        contentStr:"内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容",
        headStr:"标题标题标题标题标题标题标题标题标题标题",
        footStr:"",
    };
    stlNoticeRemind.addNewNotice(obj);

参数说明

{
   close?:boolean 是否显示关闭按钮  默认为false
  cancel?:boolean 是否显示不再显示弹窗按钮  默认为true
  cancelCloseAll?:boolean 点击不再显示弹窗按钮是否关闭所有当前已显示的弹窗 默认为true
  autoClose?:boolean   是否自动关闭弹窗  默认为true
  closeTime?:number 自动关闭弹窗时间  默认3000
  number?:number//每次允许显示的最大数量 默认为1
  top?:number 距离页面顶部的距离 默认195
  right?:number 距离页面右边的距离 默认23
  left?:number 距离页面左边的距离 默认没有此属性,如果传入此参数则"right"参数将无效
  bottom?:number 距离页面底部的距离 默认没有此属性,如果传入此参数则"top"参数将无效
  showCallback?(obj)=>void 当前显示的通知回调,此方法接收一个参数 当前显示的此条通知内容
  cancelCallback?()=>void 点击不再显示弹窗按钮的回调 不传则默认关闭此页面前不再弹窗
}
 

方法说明

addNewNotice
    调用方式:stlNoticeRemind.addNewNotice(obj);
    参数说明:{
        contentStr:string 内容部分显示的innerhtml
        headStr:string 头部显示的innerhtml
        footStr?:string 底部显示的innerhtml 没有可不传
        id?:string|number 此条消息的标识
    }或者[
        {
            contentStr:string 内容部分显示的innerhtml
            headStr:string 头部显示的innerhtml
            footStr?:string 底部显示的innerhtml 没有可不传
            id?:string|number 此条消息的标识
        },
        {
            contentStr:string 内容部分显示的innerhtml
            headStr:string 头部显示的innerhtml
            footStr?:string 底部显示的innerhtml 没有可不传
            id?:string|number 此条消息的标识
        }
    ]