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