Giter Club home page Giter Club logo

boqii-modal's Introduction

#弹窗骨架封装 boqii-modal主要是用来在移动端显示弹窗莫太框

使用方法 npm install boqii-modal

import 'boqii-modal'
import AComponent from '@/component/AComponent'
let propsdata = []
this.$modal({
  template: AComponent,
  params: propsdata,
  enter: 'slideInUp', //莫太框进入时的动画,不需要动画时填 none
  leave: 'slideOutDown', //莫太框离开时的动画,不需要动画时填 none
  success:function(data){
     console.log(" success callback data", data)
     //this.emit('hide')  //隐藏当前莫太框
     //this.emit('show')  //显示当前莫太框
  },
  fail: function(err){
    console.log(" failed callback err", err)  
  },
  duration: 700 //默认700ms, 动画执行的过渡时间
  backScroll: false //默认为false, 莫太框展开时是否让背面滚动, true为滚动
  backdropClickable: true //默认为false, 灰色背景是否可以点击
  backdropColor: 'transparent' //蒙层背景颜色,不填默认是rgba(0, 0, 0, 0.7)
})

Changelog

2018/12/17  给蒙层添加背景颜色,默认是灰色rgba(0, 0, 0, 0.7),透明色可以是transparent
2018/12/14  增加每个莫太框show and hide的方法,添加灰色背景是否可以点击的参数
2018/12/13  添加backScroll参数,使背景框可以滚动,修改模态框背包滚动的bug
2018/11/11  添加animate.css,给动态莫太框添加动效
2018/10/13  模态框基本搭建完成

boqii-modal's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.