[new feature] Pagination code review (#328)

* fix: Tabbar icon line-height

* [new feature] progress add showPivot prop

* [new feature] TabItem support vue-router

* [new feature] update document header style

* [Doc] add toast english ducoment

* [bugfix] Search box-sizing wrong

* [Doc] update vant-demo respo

* [Doc] translate theme & demo pages

* [Doc] add Internationalization document

* [bugfix] remove unnecessary props

* [fix] optimize clickoutside

* [new feature] optimize find-parent

* [new feature]: change document title accordinng to language

* [new feature] Pagination code review
This commit is contained in:
neverland
2017-11-17 01:12:49 -06:00
committed by GitHub
parent d17f161772
commit 80e3c6dd65
9 changed files with 176 additions and 273 deletions

View File

@@ -386,6 +386,10 @@ module.exports = {
path: '/notice-bar',
title: 'NoticeBar'
},
{
path: '/pagination',
title: 'Pagination'
},
{
path: '/panel',
title: 'Panel'

View File

@@ -7,6 +7,11 @@ const langMap = {
'zh-CN': zhCN
};
const titleMap = {
'en-US': 'Vant - A Vue.js 2.0 Mobile UI at YouZan',
'zh-CN': 'Vant - 有赞移动端 Vue 组件库'
};
const userLang = window.localStorage.getItem('VANT_LANGUAGE') || window.navigator.language || 'en-US';
let defaultLang = 'en-US';
if (userLang.indexOf('zh-') !== -1) {
@@ -17,4 +22,5 @@ setLang(defaultLang);
export function setLang(lang) {
window.localStorage.setItem('VANT_LANGUAGE', lang);
Locale.use(lang, langMap[lang]);
document.title = titleMap[lang];
}