diff --git a/demo/server_side_rendering/pages/index.vue b/demo/server_side_rendering/pages/index.vue index 499b991..d960ec6 100644 --- a/demo/server_side_rendering/pages/index.vue +++ b/demo/server_side_rendering/pages/index.vue @@ -1,10 +1,11 @@ @@ -17,3 +18,12 @@ export default { } } + diff --git a/dist/index.js b/dist/index.js index 39d3fe2..744fb03 100644 --- a/dist/index.js +++ b/dist/index.js @@ -95,7 +95,7 @@ var Plugin = { this.installed = true; this.event = new Vue(); - var $modal = { + Vue.prototype.$modal = { show: function show(name, params) { Plugin.event.$emit('toggle', name, true, params); }, @@ -107,7 +107,6 @@ var Plugin = { } }; - Vue.prototype.$modal = $modal; Vue.component('modal', _Modal2.default); } }; diff --git a/dist/ssr.index.js b/dist/ssr.index.js index cb38393..6a05aab 100644 --- a/dist/ssr.index.js +++ b/dist/ssr.index.js @@ -95,7 +95,7 @@ var Plugin = { this.installed = true; this.event = new Vue(); - var $modal = { + Vue.prototype.$modal = { show: function show(name, params) { Plugin.event.$emit('toggle', name, true, params); }, @@ -107,7 +107,6 @@ var Plugin = { } }; - Vue.prototype.$modal = $modal; Vue.component('modal', _Modal2.default); } }; diff --git a/src/index.js b/src/index.js index 193d758..bb44ed4 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,7 @@ const Plugin = { this.installed = true this.event = new Vue() - const $modal = { + Vue.prototype.$modal = { show (name, params) { Plugin.event.$emit('toggle', name, true, params) }, @@ -23,7 +23,6 @@ const Plugin = { } } - Vue.prototype.$modal = $modal Vue.component('modal', Modal) } }