fix instances.vue

pull/46/head
starsliao 2022-11-17 01:40:41 +08:00
parent a585706b87
commit 4e5aaedc98
1 changed files with 2 additions and 2 deletions

View File

@ -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