fix(dev2): when run dev2, fix the mode value (#673)

This commit is contained in:
申君健 2023-10-26 16:59:16 +08:00 committed by GitHub
parent d9c8a1528c
commit 07d4a29a5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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'

View File

@ -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'