Skip to content

Commit 026f71f

Browse files
authored
refactor(*): upgrade to version 0.3.6 (#331)
1 parent 84b3980 commit 026f71f

File tree

9 files changed

+46
-46
lines changed

9 files changed

+46
-46
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
insert_final_newline = false
13+
trim_trailing_whitespace = false

.eslintrc.js

+13-16
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,32 @@ module.exports = {
99
plugins: ['vue'],
1010
extends: ['plugin:vue/essential', '@vue/airbnb'],
1111
rules: {
12-
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13-
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
14-
'import/extensions': 0, // import不需要写文件扩展名
15-
'import/no-unresolved': 0,
16-
// 'import/no-duplicates': 0,
17-
'no-underscore-dangle': 0, // 无下划线
1812
camelcase: 0, // 变量可以用下划线
19-
semi: ['error', 'never'], // 无分号
20-
'no-extra-semi': 0, // 和prettier冲突
2113
'no-plusplus': 0, // 禁止使用++,--
22-
// 'no-tabs': [o],
2314
'guard-for-in': 0,
24-
'max-len': ['error', { code: 200 }],
15+
'no-extra-semi': 0, // 和prettier冲突
16+
'import/extensions': 0, // import不需要写文件扩展名
17+
'import/no-unresolved': 0,
18+
'no-underscore-dangle': 0, // 无下划线
2519
'no-restricted-syntax': 0,
26-
'import/no-extraneous-dependencies': ['error', { devDependencies: ['script/**/*.js'] }],
2720
'no-restricted-syntax': 0,
28-
'class-methods-use-this': 'off',
2921
'consistent-return': 'off',
30-
'arrow-parens': ['error', 'as-needed'],
3122
'no-prototype-builtins': 'off',
23+
'class-methods-use-this': 'off',
24+
semi: ['error', 'never'], // 无分号
25+
'max-len': ['error', { code: 200 }],
26+
'arrow-parens': ['error', 'as-needed'],
27+
'comma-dangle': ['error', 'only-multiline'],
28+
'no-param-reassign': ['error', { props: false }],
29+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
30+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
31+
'import/no-extraneous-dependencies': ['error', { devDependencies: ['script/**/*.js'] }],
3232
'object-curly-newline': [
3333
'error',
3434
{
3535
ImportDeclaration: 'never',
3636
},
3737
],
38-
'comma-dangle': ['error', 'only-multiline'],
39-
'no-param-reassign': ['error', { props: false }],
40-
'max-len': 0,
4138
},
4239
parserOptions: {
4340
parser: 'babel-eslint',

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,13 @@ QQ群搜索:Lin CMS 官方交流群 或 814597236
9999

100100
## 版本日志
101101

102-
最新版本 `0.3.5`
102+
最新版本 `0.3.6`
103+
104+
### 0.3.6
105+
106+
1. `F` 修复一级菜单双击报错
107+
2. `U` 统一不同编辑器换行符
108+
3. `U` 内容提交使用“加载中”按钮
103109

104110
### 0.3.5
105111

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/view/admin/group/group-create.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
ref="form"
1212
label-position="right"
1313
label-width="100px"
14-
v-loading="loading"
1514
@submit.native.prevent
1615
>
1716
<el-form-item label="分组名称" prop="name">
@@ -30,7 +29,7 @@
3029
</group-permissions>
3130
</el-form-item>
3231
<el-form-item class="submit">
33-
<el-button type="primary" @click="submitForm('form')">保 存</el-button>
32+
<el-button type="primary" :loading="loading" @click="submitForm('form')">保 存</el-button>
3433
<el-button @click="resetForm('form')">重 置</el-button>
3534
</el-form-item>
3635
</el-form>

src/view/admin/user/user-info.vue

+1-22
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
:rules="rules"
77
:label-position="labelPosition"
88
ref="form"
9-
v-loading="loading"
109
label-width="100px"
1110
@submit.native.prevent
1211
>
@@ -35,23 +34,14 @@
3534
<el-input size="medium" clearable type="password" v-model="form.confirm_password" autocomplete="off"></el-input>
3635
</el-form-item>
3736
<el-form-item v-if="pageType !== 'password'" label="选择分组">
38-
<!-- <el-select
39-
size="medium"
40-
multiple
41-
v-model="form.group_ids"
42-
:disabled="groups.length === 0"
43-
placeholder="请选择分组"
44-
>
45-
<el-option v-for="item in groups" :key="item.id" :label="item.name" :value="item.id"> </el-option>
46-
</el-select> -->
4737
<el-checkbox-group v-model="form.group_ids" size="small" style="transform: translateY(5px);">
4838
<el-checkbox v-for="item in groups" :key="item.id" :label="item.id" border style="margin-left: 0">{{
4939
item.name
5040
}}</el-checkbox>
5141
</el-checkbox-group>
5242
</el-form-item>
5343
<el-form-item v-show="submit" class="submit">
54-
<el-button type="primary" @click="submitForm('form')">保 存</el-button>
44+
<el-button type="primary" :loading="loading" @click="submitForm('form')">保 存</el-button>
5545
<el-button @click="resetForm('form')">重 置</el-button>
5646
</el-form-item>
5747
</el-form>
@@ -232,17 +222,6 @@ export default {
232222
this.form.group_ids = temp
233223
},
234224
},
235-
// watch: {
236-
// groups: {
237-
// // 默认选中管理员组
238-
// handler() {
239-
// if (this.groups && this.groups[0] && this.groups[0].id) {
240-
// this.form.group_ids = [this.groups[0].id]
241-
// }
242-
// },
243-
// immediate: true,
244-
// },
245-
// },
246225
created() {
247226
// 通过是否接收到数据来判断当前页面是添加数据还是编辑数据
248227
if (this.pageType === 'edit') {

src/view/book/book-create.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</el-form-item>
2727

2828
<el-form-item class="submit">
29-
<el-button type="primary" @click="submitForm('form')">保 存</el-button>
29+
<el-button type="primary" @click="submitForm('form')" :loading="loading">保 存</el-button>
3030
<el-button @click="resetForm('form')">重 置</el-button>
3131
</el-form-item>
3232
</el-form>
@@ -48,17 +48,21 @@ export default {
4848
summary: '',
4949
image: '',
5050
},
51+
loading: false,
5152
}
5253
},
5354
methods: {
5455
async submitForm(formName) {
5556
try {
57+
this.loading = true
5658
const res = await book.createBook(this.form)
59+
this.loading = false
5760
if (res.code < window.MAX_SUCCESS_CODE) {
5861
this.$message.success(`${res.message}`)
5962
this.resetForm(formName)
6063
}
6164
} catch (error) {
65+
this.loading = false
6266
this.$message.error('图书添加失败,请检测填写信息')
6367
console.log(error)
6468
}

src/view/center/center.vue

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export default {
118118
if (!value) {
119119
return callback(new Error('原始密码不能为空'))
120120
}
121+
if (value.length < 6) {
122+
callback(new Error('密码长度不能少于6位数'))
123+
}
121124
callback()
122125
}
123126
const validatePassword = (rule, value, callback) => {

src/view/log/log.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ export default {
219219
} else {
220220
res = await log.moreLogPage()
221221
}
222-
console.log('res', res)
223222
224223
let moreLogs = res.items
225224
if (this.isSearch && this.searchKeyword) {
@@ -229,9 +228,9 @@ export default {
229228
230229
this.more = false
231230
} catch (error) {
232-
console.log('error', error)
231+
console.error('error', error)
233232
234-
if (error.data.code === 10020) {
233+
if (error.data.code === 10220) {
235234
this.finished = true
236235
}
237236

0 commit comments

Comments
 (0)