Skip to content

eczn/vue-ppp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-ppp

A Popup Controller Based On Vue

Demo

DEMO

Install

$ npm install --save vue-ppp
import Vue from 'vue'; 
import PPP from 'vue-ppp'; 

Vue.use(PPP); 

Usage

Create Modal

import HelloPPP from 'a/b/c/d/HelloPPP.vue';

    ...
    created(){
        var hello = this.$ppp.create({
            type: 'modal', 
            component: HelloPPP,
            vbind: {
                style: {
                    backgroundColor: '#FFF'
                }
            }
        });
        hello.launch();
    }, 
    methods: {
        ... 
    }

Custom Transition Animate

import PPPAlert from '@/components/popup/PPPAlert.vue'; 

var al = this.$ppp.create({
    type: 'modal', 
    component: PPPAlert, 
    vbind: {
        style: {
            backgroundColor: 'rgba(0, 0, 0, .5)',
            color: '#fff'
        }
    },
    transitionName: 'alert'
}); 

al.launch();

css :

.alert-enter-active, .alert-leave-active {
    transition: all .2s; 
}

.alert-enter, .alert-leave-to {
    transform: scale(1.3);
    opacity: 0; 
}

About

💥 A Popup Controller Based On Vue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages