Skip to content

Commit

Permalink
fix(cli/site): 修复语言不同步的问题
Browse files Browse the repository at this point in the history
affects: @varlet/cli
  • Loading branch information
haoziqaq committed Mar 25, 2021
1 parent 3a8a804 commit 3271d06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/varlet-cli/site/pc/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default defineComponent({
() => route.path,
(to: string) => {
currentMenuName.value = to.slice(to.lastIndexOf('/') + 1)
language.value = to.slice(to.indexOf('#/') + 2, to.lastIndexOf('/'))
if (!window['enableWatchURL']) {
window['enableWatchURL'] = true
Expand All @@ -178,7 +179,6 @@ export default defineComponent({
const currentNonComponent = menu.value.find((c) => c.doc === currentMenuName.value)?.nonComponent ?? false
componentName.value = currentNonComponent ? 'home' : currentMenuName.value
language.value = to.slice(to.indexOf('#/') + 2, to.lastIndexOf('/'))
},
{ immediate: true }
)
Expand Down

0 comments on commit 3271d06

Please sign in to comment.