A simple、highly customizable vue modal plugin.
Introduction
A file corresponds to a modal, and registered to vue prototype, so I can use it through this
, it gives me a state of a promise
, so I can get this modal state.
Installation
$ npm i vuejs-modal -S
Usage
// If you can use default template, you should be: Vue
Use in component:
<template> //html</template> <script> methods: { this$modal } </script>
options
Vue
Event
// If you can click ok button, it can be resolve promise, and you can get params in then:this // If you can click cancel button, it can be reject promise, and you can get params in catch:this