vue-no-ssr
Advanced tools
Comparing version 0.2.1 to 0.2.2
/*! | ||
* vue-no-ssr v0.2.1 | ||
* vue-no-ssr v0.2.2 | ||
* (c) 2017-present egoist <0x142857@gmail.com> | ||
@@ -35,3 +35,3 @@ * Released under the MIT License. | ||
}, | ||
this.placeholder | ||
this.$slots.placeholder || this.placeholder | ||
) | ||
@@ -38,0 +38,0 @@ } |
/*! | ||
* vue-no-ssr v0.2.1 | ||
* vue-no-ssr v0.2.2 | ||
* (c) 2017-present egoist <0x142857@gmail.com> | ||
@@ -39,3 +39,3 @@ * Released under the MIT License. | ||
}, | ||
this.placeholder | ||
this.$slots.placeholder || this.placeholder | ||
) | ||
@@ -42,0 +42,0 @@ } |
/*! | ||
* vue-no-ssr v0.2.1 | ||
* vue-no-ssr v0.2.2 | ||
* (c) 2017-present egoist <0x142857@gmail.com> | ||
* Released under the MIT License. | ||
*/ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.NoSSR=n()}(this,function(){"use strict";return{name:"no-ssr",props:["placeholder"],data:function(){return{canRender:!1}},mounted:function(){this.canRender=!0},render:function(e){return this.canRender?this.$slots.default&&this.$slots.default[0]:e("div",{class:["no-ssr-placeholder"]},this.placeholder)}}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.NoSSR=n()}(this,function(){"use strict";return{name:"no-ssr",props:["placeholder"],data:function(){return{canRender:!1}},mounted:function(){this.canRender=!0},render:function(e){return this.canRender?this.$slots.default&&this.$slots.default[0]:e("div",{class:["no-ssr-placeholder"]},this.$slots.placeholder||this.placeholder)}}}); | ||
//# sourceMappingURL=vue-no-ssr.min.js.map |
{ | ||
"name": "vue-no-ssr", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Vue component to wrap non SSR friendly components", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -39,3 +39,3 @@ # vue-no-ssr | ||
Use a component or text as placeholder until `<no-ssr />` is mounted on client-side. | ||
Use a slot or text as placeholder until `<no-ssr />` is mounted on client-side. | ||
@@ -48,5 +48,10 @@ eg, show a loading indicator. | ||
<h1>My Website</h1> | ||
<no-ssr :placeholder="Loading"> | ||
<!-- this component will only be rendered on client-side --> | ||
<!-- use slot --> | ||
<no-ssr> | ||
<comments /> | ||
<comments-placeholder slot="placeholder" /> | ||
</no-ssr> | ||
<!-- or use text --> | ||
<no-ssr placeholder="Loading..."> | ||
<comments /> | ||
</no-ssr> | ||
@@ -60,7 +65,2 @@ </div> | ||
export default { | ||
data() { | ||
return { | ||
Loading: require('./Loading.vue') | ||
} | ||
}, | ||
components: { | ||
@@ -67,0 +67,0 @@ 'no-ssr': NoSSR |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6897