Skip to content

Commit

Permalink
fix(cli/site/pc): add browser title toggle both
Browse files Browse the repository at this point in the history
 in english and chinese
 fix(varletconfig): Merge less commonly used configurations
  into default configuration items
  • Loading branch information
34982452 committed May 28, 2021
1 parent 58328e0 commit 28c9745
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 37 deletions.
3 changes: 2 additions & 1 deletion packages/varlet-cli/site/pc/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default defineComponent({
menu.value = configMenu
header.value = configHeader
title.value = configTitle
const changeRoute = (item) => {
Expand Down Expand Up @@ -199,7 +200,7 @@ export default defineComponent({
let [, languageValue, name] = to.split('/')
currentMenuName.value = name
language.value = languageValue
document.title = config.pc.title[languageValue]
isBack.value ? judgmentType('') : (isBack.value = true)
if (!window['enableWatchURL']) {
Expand Down
33 changes: 21 additions & 12 deletions packages/varlet-cli/varlet.default.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
module.exports = {
name: 'Varlet',
namespace: 'var',
host: 'localhost',
title: 'Varlet',
title: 'VARLET',
port: 8080,
pc: {
title: 'Varlet 组件库文档',
description: 'Varlet 组件库文档',
logo: 'https://cn.vuejs.org/images/logo.png',
redirect: undefined,
title: {
'zh-CN': 'Varlet 面向Vue3的Material风格移动端组件库',
'en-US': 'Material design mobile components built for Vue3',
},
description: 'Varlet 面向Vue3的Material风格移动端组件库',
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
redirect: '/zh-CN/home',
header: {
i18nButton: {
zh_CN: 'En',
en_US: '中文',
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
search: {
'zh-CN': '搜索文档...',
'en-US': 'Search...',
},
language: {
'zh-CN': '中文',
'en-US': 'English',
},
},
},
mobile: {
title: 'Varlet 组件库示例',
description: 'Varlet 组件库示例',
logo: 'https://cn.vuejs.org/images/logo.png',
redirect: undefined,
title: 'Varlet 面向Vue3的Material风格移动端组件库',
description: 'Varlet 面向Vue3的Material风格移动端组件库',
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
redirect: '/home',
},
}
25 changes: 1 addition & 24 deletions packages/varlet-ui/varlet.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
module.exports = {
name: 'Varlet',
namespace: 'var',
title: 'VARLET',
host: '0.0.0.0',
port: 8080,
pc: {
title: 'Varlet 面向Vue3的Material风格移动端组件库',
description: 'Varlet 面向Vue3的Material风格移动端组件库',
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
redirect: '/zh-CN/home',
header: {
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
search: {
'zh-CN': '搜索文档...',
'en-US': 'Search...',
},
language: {
'zh-CN': '中文',
'en-US': 'English',
},
},
menu: [
{
text: {
Expand Down Expand Up @@ -423,10 +405,5 @@ module.exports = {
},
],
},
mobile: {
title: 'Varlet 面向Vue3的Material风格移动端组件库',
description: 'Varlet 面向Vue3的Material风格移动端组件库',
logo: 'https://varlet.gitee.io/varlet-ui/varlet_icon.png',
redirect: '/home',
},
mobile: {},
}

0 comments on commit 28c9745

Please sign in to comment.