Skip to content

Commit 8babba1

Browse files
committed
Merge branch 'dev'
2 parents 35ca4b2 + 9461e71 commit 8babba1

25 files changed

+231
-291
lines changed

.babelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"plugins": [
77
"syntax-dynamic-import"
88
],
9-
"comments": false,
109
"env": {
1110
"test": {
1211
"presets": ["env", "stage-2"],

build/webpack.prod.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const webpackConfig = merge(baseWebpackConfig, {
2727
devtool: config.build.productionSourceMap ? '#source-map' : false,
2828
output: {
2929
path: config.build.assetsRoot,
30-
filename: utils.assetsPath('js/[name].[chunkhash].js'),
31-
chunkFilename: utils.assetsPath('js/[name].[chunkhash].js')
30+
filename: utils.assetsPath('js/[name].[chunkhash:7].js'),
31+
chunkFilename: utils.assetsPath('js/[name].[chunkhash:7].js')
3232
},
3333
plugins: [
3434
// http://vuejs.github.io/vue-loader/en/workflow/production.html
@@ -43,7 +43,7 @@ const webpackConfig = merge(baseWebpackConfig, {
4343
}),
4444
// extract css into its own file
4545
new ExtractTextPlugin({
46-
filename: utils.assetsPath('css/[name].[contenthash].css')
46+
filename: utils.assetsPath('css/[name].[contenthash:7].css')
4747
}),
4848
// Compress extracted CSS. We are using this plugin so that possible
4949
// duplicated CSS from different components can be deduped.

mock/login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var data = {
22
'login': '@boolean',
3-
'validate': '@boolean',
3+
'captcha': "@image('100x40', '#FFFFFF', 'captcha')",
44
'message': '这里是登录提交后错误提示信息@increment',
55
'uid': '@id',
66
'name': '@cname',

src/assets/css/common/article.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
margin-bottom: 2*$basicMargin;
55
// padding: 0 16px;
66
h2{
7-
font-size: $basicFontSize*1.2;
7+
font-size: $basicFontSize*1.3;
8+
padding: $basicPadding 0;
89
}
910
& > div{
1011
margin-bottom: 5px;

src/assets/css/components/sysSection.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
clear: both;
1414
}
1515
& > strong{
16-
font-weight: normal;
17-
font-size: 18px;
16+
font-weight: bold;
17+
font-size: 22px;
1818
line-height: 50px;
1919
}
2020
& > .toolbar{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.sys-title{
2-
height: 46px;
2+
height: 60px;
33
margin-bottom: $basicMargin;
44
border-bottom: 1px solid $borderColor;
55
& > strong{
6-
line-height: 46px;
7-
font-size: 18px;
6+
line-height: 60px;
7+
font-size: 26px;
88
font-weight: bold;
99
}
1010
}

src/assets/css/page/login.scss

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
}
1919

2020
.form-group {
21-
input::-webkit-input-placeholder{
22-
color: #7e9fb0;
23-
}
2421
position: relative;
2522
padding-bottom: 20px;
2623
color: $loginTextColor;
2724
overflow: hidden;
25+
26+
input::-webkit-input-placeholder{
27+
color: #7e9fb0;
28+
}
29+
2830
.el-input__inner {
2931
height: 40px;
3032
line-height: 40px;
@@ -35,6 +37,7 @@
3537
color: $loginInputColor;
3638
font-size: 15px;
3739
overflow: hidden;
40+
3841
&:hover{
3942
border-color: rgba(255,255,255,.2);
4043
}
@@ -47,11 +50,18 @@
4750
border-color: $red;
4851
background-color: $loginInputErrBg;
4952
}
50-
&.captcha input{
51-
width: 200px;
52-
}
53-
&.captcha img{
54-
float: right;
53+
&.captcha {
54+
.el-input{
55+
width: auto;
56+
}
57+
input{
58+
width: 200px;
59+
}
60+
img{
61+
float: right;
62+
width: 100px;
63+
height: 40px;
64+
}
5565
}
5666
}
5767
.el-form-item__error{
@@ -73,6 +83,7 @@
7383
font-size: 18px;
7484
text-align: center;
7585
cursor: pointer;
86+
7687
&:hover{
7788
background: darken($loginBtn, 2%)
7889
}
@@ -89,6 +100,7 @@
89100
.lang-toggle{
90101
text-align: center;
91102
color: $loginTextColor;
103+
92104
span{
93105
display: inline-block;
94106
width: 26px;
@@ -99,6 +111,7 @@
99111
font-size: 14px;
100112
text-align: center;
101113
cursor: pointer;
114+
102115
&.cur{
103116
background: $loginLangCurBg;
104117
color: $loginLangCurColor;

src/index.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,19 @@
55
</template>
66

77
<script>
8-
import changeTheme from "@/util/changeTheme"
8+
import setTheme from "@/util/setTheme"
9+
import Cookie from 'js-cookie'
910
1011
export default {
12+
// 加载默认语言包
13+
created(){
14+
let defLang = Cookie.get('lang') || this.$i18n.locale
15+
this.$store.dispatch("loadLang", defLang)
16+
},
1117
// 初次加载时,可通过接口获取用户的主题信息,或者通过按钮触发,或者直接加载默认主题
1218
mounted() {
1319
this.$nextTick(() => {
14-
changeTheme("theme-default")
20+
setTheme("theme-default")
1521
this.$store.commit("setThemeColor", "default")
1622
})
1723
}

src/lang/en.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
import enElement from 'element-ui/lib/locale/lang/en'
2+
13
export default {
2-
username: 'User Name',
3-
password: 'Password',
4-
login: 'Login',
5-
captcha: 'Captcha',
6-
forgetPassword: 'Forget Password?',
7-
loginTip: 'The login result is random. Just fill in the captcha',
8-
editpassword: 'Edit Password',
9-
logout: 'Logout',
10-
errMsg: {
11-
inputRequired: 'Please Input {cont}',
12-
selectRequired: 'Please Select {cont}'
13-
}
4+
global: {
5+
username: 'User Name',
6+
password: 'Password',
7+
login: 'Login',
8+
captcha: 'Captcha',
9+
forgetPassword: 'Forget Password?',
10+
loginTip: 'The login result is random. Just fill in the captcha',
11+
editpassword: 'Edit Password',
12+
logout: 'Logout',
13+
errMsg: {
14+
inputRequired: 'Please Input {cont}',
15+
selectRequired: 'Please Select {cont}'
16+
}
17+
},
18+
...enElement
1419
}

src/lang/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
// 中文简体
3+
"zhCN": {},
4+
// 中文繁体
5+
"zhTW": {},
6+
// 英文
7+
"en": {}
8+
}

src/lang/zh-cn.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/lang/zhCN.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import zhElement from 'element-ui/lib/locale/lang/zh-CN'
2+
3+
export default {
4+
global: {
5+
username: '用户名',
6+
password: '密码',
7+
login: '登录',
8+
captcha: '验证码',
9+
forgetPassword: '忘记密码?',
10+
loginTip: '当前登录结果随机。验证码随便填',
11+
editpassword: '修改密码',
12+
logout: '退出登录',
13+
errMsg: {
14+
inputRequired: '请输入{cont}',
15+
selectRequired: '请选择{cont}'
16+
}
17+
},
18+
...zhElement
19+
}

src/main.dev.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ import './components/platformCom/install'
1818

1919
// 注册组件到Vue
2020
Vue.prototype.$axios = axios
21-
Vue.use(ElementUI)
21+
Vue.use(ElementUI, {
22+
i18n: (key, value) => i18n.t(key, value)
23+
})
2224

2325
new Vue({
2426
i18n,

0 commit comments

Comments
 (0)