Comparing version 2.1.2 to 2.1.3
{ | ||
"name": "v-dialogs", | ||
"description": "A simple and powful dialog, dialog type including Modal, Alert, Mask and Toast, based on Vue2.x", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"author": "TerryZ <terry5@foxmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -1,5 +0,10 @@ | ||
import { getContainer } from './Dialog' | ||
import Container from './Container' | ||
export default { | ||
install (Vue, options = {}) { | ||
const DialogContainer = Vue.extend(Container) | ||
const dlg = new DialogContainer() | ||
// document.body.appendChild(dlg.$mount().$el) | ||
dlg.$mount(document.body.appendChild(document.createElement('div'))) | ||
/** | ||
@@ -50,3 +55,3 @@ * Merge options | ||
params.component = component | ||
return getContainer().addModal(params) | ||
return dlg.addModal(params) | ||
}, | ||
@@ -76,16 +81,16 @@ /** | ||
if (!arguments.length || !arguments[0]) return | ||
return getContainer().addAlert(paramSet(arguments)) | ||
return dlg.addAlert(paramSet(arguments)) | ||
}, | ||
mask () { | ||
return getContainer().addMask(paramSet(arguments)) | ||
return dlg.addMask(paramSet(arguments)) | ||
}, | ||
toast () { | ||
if (!arguments.length || !arguments[0]) return | ||
return getContainer().addToast(paramSet(arguments)) | ||
return dlg.addToast(paramSet(arguments)) | ||
}, | ||
close (key) { | ||
getContainer().close(key) | ||
dlg.close(key) | ||
}, | ||
closeAll (callback) { | ||
getContainer().closeAll(callback) | ||
dlg.closeAll(callback) | ||
} | ||
@@ -92,0 +97,0 @@ } |
@@ -8,9 +8,9 @@ var path = require('path') | ||
output: { | ||
path: path.resolve(__dirname, './dist'), | ||
publicPath: '/dist/', | ||
//filename: 'build.js' | ||
filename: 'v-dialogs.js', | ||
library: 'vDialog', | ||
libraryTarget: 'umd', | ||
umdNamedDefine: true | ||
path: path.resolve(__dirname, './dist'), | ||
publicPath: '/dist/', | ||
//filename: 'build.js' | ||
filename: 'v-dialogs.js', | ||
library: 'vDialog', | ||
libraryTarget: 'umd', | ||
umdNamedDefine: true | ||
}, | ||
@@ -17,0 +17,0 @@ module: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
354764
26
1497