@thinkpixellab-public/px-vue 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/common.js +2 -0
- package/utils/isServer.js +5 -0
- package/utils/utils.js +2 -1
package/package.json
CHANGED
package/plugins/common.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import bem from '../utils/bem';
|
|
7
|
+
import isServer from '../utils/isServer.js';
|
|
7
8
|
import { cssPx, cssEm, cssPcnt, cssUrl } from '../utils/cssStr.js';
|
|
8
9
|
import aspect from './filters/aspect.js';
|
|
9
10
|
import kebab from './filters/kebab.js';
|
|
@@ -20,6 +21,7 @@ export default {
|
|
|
20
21
|
Vue.prototype.cssEm = cssEm;
|
|
21
22
|
Vue.prototype.cssPcnt = cssPcnt;
|
|
22
23
|
Vue.prototype.cssUrl = cssUrl;
|
|
24
|
+
Vue.prototype.isServer = isServer;
|
|
23
25
|
|
|
24
26
|
// filters
|
|
25
27
|
Vue.filter('aspect', aspect);
|
package/utils/utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Common utility functions. Anything in here must be static and must be small and must be common
|
|
2
2
|
// enough to warrant inclusion.
|
|
3
|
+
import isServer from './isServer.js';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
/**
|
|
@@ -84,7 +85,7 @@ export default {
|
|
|
84
85
|
* Returns an object representing the current query string parameters.
|
|
85
86
|
*/
|
|
86
87
|
getQueryParams() {
|
|
87
|
-
if (
|
|
88
|
+
if (isServer()) {
|
|
88
89
|
return {};
|
|
89
90
|
}
|
|
90
91
|
return new Proxy(new URLSearchParams(window.location.search), {
|