mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 00:14:18 +00:00
chore(cli): update eslint config and prettier codes
This commit is contained in:
@@ -20,13 +20,13 @@ function parseName(name) {
|
||||
|
||||
return {
|
||||
component: `${decamelize(component)}`,
|
||||
lang: pairs.join('-')
|
||||
lang: pairs.join('-'),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
component: `${decamelize(name)}`,
|
||||
lang: ''
|
||||
lang: '',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ function getRoutes() {
|
||||
if (locales) {
|
||||
routes.push({
|
||||
path: '*',
|
||||
redirect: route => `/${getLangFromRoute(route)}/`
|
||||
redirect: route => `/${getLangFromRoute(route)}/`,
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
path: '*',
|
||||
redirect: '/'
|
||||
redirect: '/',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ function getRoutes() {
|
||||
name: lang,
|
||||
path: `/${lang || ''}`,
|
||||
component: Home,
|
||||
meta: { lang }
|
||||
meta: { lang },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ function getRoutes() {
|
||||
component: documents[name],
|
||||
meta: {
|
||||
lang,
|
||||
name: component
|
||||
}
|
||||
name: component,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
@@ -89,8 +89,8 @@ function getRoutes() {
|
||||
path: `/${component}`,
|
||||
component: documents[name],
|
||||
meta: {
|
||||
name: component
|
||||
}
|
||||
name: component,
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -109,7 +109,7 @@ export const router = new VueRouter({
|
||||
}
|
||||
|
||||
return { x: 0, y: 0 };
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
|
Reference in New Issue
Block a user