chore: remote isWeapp mixin (#9236)
* chore: remote isWeapp mixin * fix: demo locale
This commit is contained in:
@@ -5,15 +5,6 @@ Locale.add({
|
||||
'en-US': enUS,
|
||||
});
|
||||
|
||||
export const DemoLocaleMixin = {
|
||||
computed: {
|
||||
// flag for vant-weapp demos
|
||||
isWeapp() {
|
||||
return location.search.indexOf('weapp=1') !== -1;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// switch lang after routing
|
||||
if (window.vueRouter) {
|
||||
window.vueRouter.afterEach((to) => {
|
||||
|
||||
+1
-4
@@ -1,11 +1,8 @@
|
||||
import { DemoLocaleMixin } from './demo-locale';
|
||||
import './demo-locale';
|
||||
import Lazyload from '../../src/lazyload';
|
||||
|
||||
const { app } = window;
|
||||
if (app) {
|
||||
// helper for demo locales
|
||||
app.mixin(DemoLocaleMixin);
|
||||
|
||||
app.use(Lazyload, {
|
||||
lazyComponent: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user