forked from opentiny/tiny-vue
fix(dev2): when run dev2, fix the mode value (#673)
This commit is contained in:
parent
d9c8a1528c
commit
07d4a29a5c
|
@ -4,9 +4,8 @@ import VueI18n from 'vue-i18n'
|
||||||
import { initI18n } from '@opentiny/vue-locale'
|
import { initI18n } from '@opentiny/vue-locale'
|
||||||
import { Loading } from '@opentiny/vue'
|
import { Loading } from '@opentiny/vue'
|
||||||
import App from '@/App.vue'
|
import App from '@/App.vue'
|
||||||
import { $local } from '@/uses'
|
|
||||||
|
|
||||||
const mode = $local.mode || 'pc'
|
const mode = location.pathname.split('/')[1] || 'pc'
|
||||||
|
|
||||||
Vue.prototype.tiny_mode = { value: mode }
|
Vue.prototype.tiny_mode = { value: mode }
|
||||||
Vue.prototype.isPcMode = mode === 'pc'
|
Vue.prototype.isPcMode = mode === 'pc'
|
||||||
|
|
|
@ -4,10 +4,9 @@ import VueI18n from 'vue-i18n'
|
||||||
import { initI18n } from '@opentiny/vue-locale'
|
import { initI18n } from '@opentiny/vue-locale'
|
||||||
import { Loading } from '@opentiny/vue'
|
import { Loading } from '@opentiny/vue'
|
||||||
import App from '@/App.vue'
|
import App from '@/App.vue'
|
||||||
import { $local } from '@/uses'
|
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
const mode = $local.mode || 'pc'
|
const mode = location.pathname.split('/')[1] || 'pc'
|
||||||
|
|
||||||
Vue.prototype.tiny_mode = { value: mode }
|
Vue.prototype.tiny_mode = { value: mode }
|
||||||
Vue.prototype.isPcMode = mode === 'pc'
|
Vue.prototype.isPcMode = mode === 'pc'
|
||||||
|
|
Loading…
Reference in New Issue