【fix ESLint】src/views/system/modules

This commit is contained in:
danshihao
2023-03-07 14:23:25 +08:00
parent 0e41300963
commit 9e05297813
33 changed files with 179 additions and 183 deletions
@@ -104,6 +104,7 @@ export default {
validator: (rule, value, callback) => {
const pattern = /^[a-z|A-Z][a-z|A-Z\d_-]{0,}$/
if (!pattern.test(value)) {
// eslint-disable-next-line standard/no-callback-literal
callback('编码必须以字母开头可包含数字下划线横杠')
} else {
validateDuplicateValue('sys_data_source', 'code', value, this.model.id, callback)
@@ -244,12 +245,12 @@ export default {
// 获取以上字段的值,并清除校验状态
const fieldsValues = this.form.getFieldsValue(keys)
const setFields = {}
keys.forEach(key => setFields[key] = { value: fieldsValues[key], errors: null })
keys.forEach(key => (setFields[key] = { value: fieldsValues[key], errors: null }))
// 清除校验状态,目的是可以让错误文字闪烁
this.form.setFields(setFields)
// 重新校验
this.$nextTick(() => {
this.form.validateFields(keys, (errors, values) => {
this.form.validateFields(keys, (errors/* , values */) => {
if (!errors) {
const loading = this.$message.loading('连接中', 0)
postAction('/online/cgreport/api/testConnection', fieldsValues).then(res => {