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 { Loading } from '@opentiny/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.isPcMode = mode === 'pc'
|
||||
|
|
|
@ -4,10 +4,9 @@ import VueI18n from 'vue-i18n'
|
|||
import { initI18n } from '@opentiny/vue-locale'
|
||||
import { Loading } from '@opentiny/vue'
|
||||
import App from '@/App.vue'
|
||||
import { $local } from '@/uses'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
const mode = $local.mode || 'pc'
|
||||
const mode = location.pathname.split('/')[1] || 'pc'
|
||||
|
||||
Vue.prototype.tiny_mode = { value: mode }
|
||||
Vue.prototype.isPcMode = mode === 'pc'
|
||||
|
|
Loading…
Reference in New Issue