diyi-ui
Version:
diyi A Vue.js UI
24 lines (20 loc) • 499 B
JavaScript
/*
* @Author: last order
* @Date: 2020-08-11 15:46:04
* @LastEditTime: 2020-08-13 10:29:26
*/
// import Vue from 'vue'
export const isSSR = () => {
// const isServer = Vue.prototype.$isServer
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
return {
window: window,
document: document
}
} else {
return {
window: undefined,
document: undefined
}
}
}