Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
1b12742c
Commit
1b12742c
authored
Jan 21, 2022
by
林家欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改中英文切换
parent
a701517d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
topBanner.vue
src/components/layout/topBanner.vue
+3
-2
index.js
src/router/index.js
+45
-0
No files found.
src/components/layout/topBanner.vue
View file @
1b12742c
...
...
@@ -72,8 +72,9 @@ export default {
watch
:
{
$route
:
{
handler
(
val
)
{
const
currentRouterComp
=
val
.
matched
[
val
.
matched
.
length
-
1
].
components
.
default
.
__file
;
if
(
currentRouterComp
.
indexOf
(
'English'
)
!==
-
1
)
{
console
.
log
(
val
,
'val'
);
const
currentRouterComp
=
val
.
meta
.
language
;
if
(
currentRouterComp
.
indexOf
(
'英文'
)
!==
-
1
)
{
this
.
languageTxt
=
'英文'
;
}
else
{
this
.
languageTxt
=
'中文'
;
...
...
src/router/index.js
View file @
1b12742c
...
...
@@ -1418,6 +1418,9 @@ const routes = [{
children
:
[{
path
:
"/EnglishHome"
,
component
:
()
=>
import
(
"@/views/English/Home/index"
),
meta
:
{
language
:
'英文'
},
}]
},
{
...
...
@@ -1429,56 +1432,89 @@ const routes = [{
path
:
"/SecondaryMenu/Introduction"
,
name
:
"Introduction"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/Introduction"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/Structure"
,
name
:
"Structure"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/Structure"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/ContactUs"
,
name
:
"ContactUs"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/ContactUs"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/Barcode"
,
name
:
"Barcode"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/Barcode"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/EPC"
,
name
:
"EPC"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/EPC"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/GDSN"
,
name
:
"GDSN"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/GDSN"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/ECommerce"
,
name
:
"ECommerce"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/ECommerce"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/HanXinCode"
,
name
:
"HanXinCode"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/HanXinCode"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/InnovativeSectors"
,
name
:
"InnovativeSectors"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/InnovativeSectors"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/industryPromotion"
,
name
:
"IndustryPromotion"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/industryPromotion"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/SecondaryMenu/eLearning"
,
name
:
"eLearning"
,
component
:
()
=>
import
(
"@/views/English/SecondaryMenu/eLearning"
),
meta
:
{
language
:
'英文'
},
}
]
},
...
...
@@ -1490,16 +1526,25 @@ const routes = [{
path
:
"/IndustryPromotion/FoodSafety"
,
name
:
"FoodSafety"
,
component
:
()
=>
import
(
"@/views/English/TertiaryMenu/IndustryPromotion/FoodSafety"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/IndustryPromotion/Healthcare"
,
name
:
"Healthcare"
,
component
:
()
=>
import
(
"@/views/English/TertiaryMenu/IndustryPromotion/Healthcare"
),
meta
:
{
language
:
'英文'
},
},
{
path
:
"/IndustryPromotion/Others"
,
name
:
"Others"
,
component
:
()
=>
import
(
"@/views/English/TertiaryMenu/IndustryPromotion/Others"
),
meta
:
{
language
:
'英文'
},
}
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment