Merge pull request #38 from euvl/sse_bugs

SSR bugs
This commit is contained in:
Yev Vlasenko
2017-06-21 21:21:26 +01:00
committed by GitHub
7 changed files with 23 additions and 4054 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
"start": "nuxt" "start": "nuxt"
}, },
"dependencies": { "dependencies": {
"vue-js-modal": "github:euvl/vue-js-modal#dcf3291623d9fe54bcbf0ca48c0ed35865b8871a", "vue-js-modal": "latest",
"nuxt": "^1.0.0-alpha.4" "nuxt": "^1.0.0-alpha.4"
} }
} }

View File

@@ -1,10 +1,12 @@
<template> <template>
<div> <div>
<modal name="foo">bar</modal> <modal name="foo" :width="300" :height="140">
Woot
</modal>
<p>Hi from <b>{{ name }}</b>.</p>
<button @click="$modal.show('foo')"> <button @click="$modal.show('foo')">
Open modal Open modal
</button> </button>
<p>Hi from {{ name }}</p>
</div> </div>
</template> </template>
@@ -17,3 +19,17 @@ export default {
} }
} }
</script> </script>
<style>
body {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
padding: 50px;
}
.v--modal {
text-align: center;
padding: 50px;
}
</style>

3
dist/index.js vendored
View File

@@ -95,7 +95,7 @@ var Plugin = {
this.installed = true; this.installed = true;
this.event = new Vue(); this.event = new Vue();
var $modal = { Vue.prototype.$modal = {
show: function show(name, params) { show: function show(name, params) {
Plugin.event.$emit('toggle', name, true, params); Plugin.event.$emit('toggle', name, true, params);
}, },
@@ -107,7 +107,6 @@ var Plugin = {
} }
}; };
Vue.prototype.$modal = $modal;
Vue.component('modal', _Modal2.default); Vue.component('modal', _Modal2.default);
} }
}; };

3
dist/ssr.index.js vendored
View File

@@ -95,7 +95,7 @@ var Plugin = {
this.installed = true; this.installed = true;
this.event = new Vue(); this.event = new Vue();
var $modal = { Vue.prototype.$modal = {
show: function show(name, params) { show: function show(name, params) {
Plugin.event.$emit('toggle', name, true, params); Plugin.event.$emit('toggle', name, true, params);
}, },
@@ -107,7 +107,6 @@ var Plugin = {
} }
}; };
Vue.prototype.$modal = $modal;
Vue.component('modal', _Modal2.default); Vue.component('modal', _Modal2.default);
} }
}; };

View File

@@ -1,7 +1,7 @@
{ {
"name": "vue-js-modal", "name": "vue-js-modal",
"description": "Modal Component for Vue.js", "description": "Modal Component for Vue.js",
"version": "1.2.0", "version": "1.2.1",
"author": "euvl <yev.vlasenko@gmail.com>", "author": "euvl <yev.vlasenko@gmail.com>",
"main": "dist/index.js", "main": "dist/index.js",
"repository": { "repository": {

View File

@@ -9,7 +9,7 @@ const Plugin = {
this.installed = true this.installed = true
this.event = new Vue() this.event = new Vue()
const $modal = { Vue.prototype.$modal = {
show (name, params) { show (name, params) {
Plugin.event.$emit('toggle', name, true, params) Plugin.event.$emit('toggle', name, true, params)
}, },
@@ -23,7 +23,6 @@ const Plugin = {
} }
} }
Vue.prototype.$modal = $modal
Vue.component('modal', Modal) Vue.component('modal', Modal)
} }
} }