fix instances.vue
parent
a585706b87
commit
4e5aaedc98
|
@ -208,7 +208,7 @@ export default {
|
|||
data() {
|
||||
const validateInput = (rule, value, callback) => {
|
||||
if (!this.checkSpecialKey(value)) {
|
||||
callback(new Error('不能含有空格或 [ ]`~!#$^&*=|"{}\':;?'))
|
||||
callback(new Error('不能含有空格或 [ ]`~!#$^&*=|"{}\':;?\\'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ export default {
|
|||
this.inputValue = ''
|
||||
},
|
||||
checkSpecialKey(str) {
|
||||
const specialKey = '[]`~!#$^&*=|{}\'":;? '
|
||||
const specialKey = '[]`~!#$^&*=|{}\'":;? \\'
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
if (specialKey.indexOf(str.substr(i, 1)) !== -1) {
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue