Skip to content

Commit f2f9144

Browse files
committed
Merge branch 'vue-next' of https://github.com/TaleLin/lin-cms-vue into vue-next
2 parents 728afc8 + 7f9b909 commit f2f9144

File tree

16 files changed

+499
-184
lines changed

16 files changed

+499
-184
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,15 @@ QQ群搜索:Lin CMS 官方交流群 或 814597236
100100

101101
## 版本日志
102102

103-
最新版本 `0.4.0`
103+
最新版本 `0.4.1`
104104

105+
### 0.4.1
106+
107+
1. `A` 新增验证码功能,默认关闭验证码
105108
### 0.4.0
106109

107110
1. `U` 升级到 Vue3 版本
111+
108112
### 0.3.5
109113

110114
1. `F` 统一前端规范,文件夹、文件名统一用单数和小写字母中划线形式

babel.config.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
module.exports = {
22
presets: [['@vue/cli-plugin-babel/preset']],
33
plugins: [
4-
[
5-
'component',
6-
{
7-
libraryName: 'element-plus',
8-
styleLibraryName: 'theme-chalk',
9-
},
10-
],
4+
//去除element babel 新版直接手动导入即可
115
'@babel/plugin-proposal-optional-chaining',
126
'@babel/plugin-proposal-nullish-coalescing-operator',
137
],

package-lock.json

Lines changed: 269 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"@antv/g2plot": "^0.11.35",
1717
"@babel/polyfill": "^7.4.4",
1818
"@tinymce/tinymce-vue": "^4.0.0",
19-
"axios": "^0.21.1",
19+
"axios": "^0.21.2",
2020
"core-js": "^3.6.5",
2121
"dayjs": "^1.10.4",
22-
"element-plus": "^1.0.2-beta.70",
22+
"element-plus": "^1.2.0-beta.5",
2323
"event-source-polyfill": "^1.0.7",
2424
"fastscan": "^1.0.4",
2525
"good-storage": "^1.1.0",
@@ -30,7 +30,7 @@
3030
"photoswipe": "^4.1.2",
3131
"screenfull": "^4.2.0",
3232
"swiper": "^6.4.5",
33-
"vue": "^3.1.4",
33+
"vue": "^3.2.24",
3434
"vue-picture-cropper": "^0.1.9",
3535
"vue-router": "^4.0.10",
3636
"vuex": "^4.0.2",
@@ -43,7 +43,7 @@
4343
"@vue/cli-plugin-babel": "~4.5.0",
4444
"@vue/cli-plugin-eslint": "~4.5.0",
4545
"@vue/cli-plugin-unit-jest": "~4.5.0",
46-
"@vue/cli-service": "~4.5.0",
46+
"@vue/cli-service": "~4.5.15",
4747
"@vue/compiler-sfc": "^3.0.0",
4848
"@vue/eslint-config-airbnb": "^4.0.1",
4949
"@vue/test-utils": "^2.0.0-beta.8",

src/assets/style/elementFont.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
49.2 KB
Binary file not shown.
24.2 KB
Binary file not shown.

src/assets/style/realize/element-variable.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ $--background-color-base: #F6F7FA !default;
1919
$--link-default-active-color: $--color-primary !default;
2020
$--link-default-font-color: $--color-text-regular !default;
2121
$--link-disabled-font-color: $--color-text-placeholder !default;
22-
2322
/* 改变 icon 字体路径变量,必需 */
24-
$--font-path: "~element-plus/lib/theme-chalk/fonts";
25-
26-
@import "~element-plus/packages/theme-chalk/src/index";
23+
//$--font-path: "~element-plus/lib/theme-chalk/fonts";
24+
//兼容字体 新版本element-plus 已经移除font-icon
25+
@import "../elementFont.css";
26+
@import "~element-plus/theme-chalk/src/index";
27+
@import "~element-plus/theme-chalk/src/mixins/mixins";
2728

2829
// button
2930
.el-button {

src/component/layout/sidebar/menu-tree.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<template>
2-
<el-submenu v-if="item.children?.length > 0" :index="item.path" popper-append-to-body>
2+
<!--el-submenu改名为el-sub-menu-->
3+
<el-sub-menu v-if="item.children?.length > 0" :index="item.path" popper-append-to-body>
34
<template #title>
45
<i v-if="!filterIcon(item.icon)" :class="item.icon"></i>
56
<img v-else :src="item.icon" class="img-icon" />
67
<span>{{ item.title }}</span>
78
</template>
89
<menu-tree v-for="child in item.children" :key="child.path" :item="child" />
9-
</el-submenu>
10+
</el-sub-menu>
1011

1112
<el-menu-item v-else :index="item.path" @click="navigateTo(item.path)">
1213
<i v-if="!filterIcon(item.icon)" :class="item.icon"></i>
@@ -47,12 +48,14 @@ export default {
4748
display: inline-block;
4849
transform: translateY(21px);
4950
}
51+
5052
.iconfont {
5153
margin-right: 10px;
5254
margin-left: 5px;
5355
color: $sub-menu-title;
5456
height: $menu-item-height;
5557
}
58+
5659
.title {
5760
display: inline-block;
5861
width: 110px;

src/lin/model/user.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import store from '@/store'
2-
import _axios, { post, get, put } from '@/lin/plugin/axios'
2+
import _axios, { get, put } from '@/lin/plugin/axios'
33
import { saveTokens } from '../util/token'
44

55
export default class User {
@@ -24,13 +24,23 @@ export default class User {
2424

2525
/**
2626
* 登陆获取tokens
27-
* @param {string} username 用户名
28-
* @param {string} password 密码
27+
* @param { String } username 用户名
28+
* @param { String } password 密码
29+
* @param { String } captcha 验证码
30+
* @param { String } tag 验证码签名
2931
*/
30-
static async getToken(username, password) {
31-
const tokens = await post('cms/user/login', {
32-
username,
33-
password,
32+
static async getToken(username, password, captcha, tag) {
33+
const tokens = await _axios({
34+
url: 'cms/user/login',
35+
method: 'POST',
36+
data: {
37+
captcha,
38+
username,
39+
password,
40+
},
41+
headers: {
42+
tag,
43+
},
3444
})
3545
saveTokens(tokens.access_token, tokens.refresh_token)
3646
return tokens

0 commit comments

Comments
 (0)