docs: simplify seciton name (#4961)
This commit is contained in:
@@ -38,8 +38,7 @@ function getQueryString(name) {
|
||||
export default {
|
||||
computed: {
|
||||
title() {
|
||||
const { name } = this.$route.meta;
|
||||
return name ? name.replace(/-/g, '') : '';
|
||||
return this.$route.meta.title || '';
|
||||
},
|
||||
|
||||
showNav() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import Vue from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
import VantDoc, { DemoBlock, DemoSection } from '@vant/doc';
|
||||
import VantDoc from '@vant/doc';
|
||||
import i18n from '../utils/i18n';
|
||||
import Vant, { Lazyload, Locale } from '../../../src';
|
||||
import { camelize } from '../../../src/utils/format/string';
|
||||
@@ -18,8 +18,6 @@ Vue
|
||||
});
|
||||
|
||||
Vue.mixin(i18n);
|
||||
Vue.component('demo-block', DemoBlock);
|
||||
Vue.component('demo-section', DemoSection);
|
||||
|
||||
Locale.add({
|
||||
'zh-CN': {
|
||||
|
||||
+3
-3
@@ -57,13 +57,13 @@ const registerRoute = ({ mobile, componentMap }) => {
|
||||
}
|
||||
|
||||
route.push({
|
||||
name: lang + '/' + path,
|
||||
component,
|
||||
name: `${lang}/${path}`,
|
||||
path: `/${lang}/${path}`,
|
||||
meta: {
|
||||
lang,
|
||||
path,
|
||||
name: page.title
|
||||
name: path,
|
||||
title: page.title
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user