Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
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
front-end-dev
techbook
Commits
3cbfae45
Commit
3cbfae45
authored
Oct 31, 2019
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语言包解析
parent
7e6019ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
api.js
src/api/api.js
+1
-1
validate.js
src/common/validate.js
+1
-1
No files found.
src/api/api.js
View file @
3cbfae45
...
...
@@ -7,7 +7,7 @@ import publicFunc from '../common/public'
Vue
.
use
(
VueI18n
);
import
{
Toast
}
from
'mint-ui'
;
const
i18n
=
new
VueI18n
({
locale
:
window
.
sessionStorage
.
getItem
(
"language"
),
// 语言标识
locale
:
window
.
sessionStorage
.
getItem
(
"language"
)
||
"zh-CN"
,
// 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages
:
{
'zh-CN'
:
require
(
'../common/lang/zh'
),
// 中文语言包
...
...
src/common/validate.js
View file @
3cbfae45
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue';
import
VueI18n
from
'vue-i18n'
;
Vue
.
use
(
VueI18n
);
const
i18n
=
new
VueI18n
({
locale
:
window
.
sessionStorage
.
getItem
(
"language"
),
// 语言标识
locale
:
window
.
sessionStorage
.
getItem
(
"language"
)
||
"zh-CN"
,
// 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages
:
{
'zh-CN'
:
require
(
'./lang/zh'
),
// 中文语言包
...
...
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