Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meet-popup

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meet-popup

A mobile modal popup component ! Support IOS overlay scroll prevent background scroll

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Docs and Demos

showcase

image

feature

1、解决ios滚动穿透问题

2、支持open,close前后的生命周期

3、支持动画

install

npm install popup --save-dev

How to use?

HTML

  <body>

    <div class="container">
       <!-- 你的页面内容 -->
    </div>

    <div class="meet-popup">
      <div class="meet-popup-mask"></div>
      <div class="meet-popup-container">
        <div class="popup-header">
          <span class="p-left">顶部header数据</span>
          <span class="p-right">
            <div class="popup-close-icon"></div>
          </span>
        </div>
        <div class="popup-content">
           <!-- 你的弹框内容 -->
        </div>
      </div>
    </div>

  </body>

javascript

####基础使用

const Popup = require('popup');

var popupMsg = new Popup(document.querySelector('.meet-popup'),{
  container: '.container',  // 必须,页面容器的选择器
});

popupMsg.open();

Is it easy to use ? 😂

高级使用
const Popup = require('popup');

var popupMsg = new Popup(document.querySelector('.meet-popup'),{
  container: '.container',  // 必须,页面容器的选择器
  header: 'center',  // 必须 弹框header的布局 ,支持:left, center
  animate: true, // 非必须, 默认无动画
  beforeOpen: function(next){ // 非必须,open前的钩子函数
    next();
  },
  afterOpen: function(){  // 非必须 open后的钩子函数
  },
  beforeClose: function(next){  // 非必须 close前的钩子函数
    next()
  },
  afterClose: function(){  // 非必须 close后的钩子函数
  }
});

popupMsg.open();

All Popup options

propertydescription
openshow popup
closeclose popup

demo

image

FAQs

Package last updated on 12 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc