Explorar o código

禁止输入空格

lilei %!s(int64=4) %!d(string=hai) anos
pai
achega
fe321b5095
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/main.js

+ 4 - 0
src/main.js

@@ -42,6 +42,10 @@ Vue.prototype.$hasPermissions = function (value) {
   }
   return isExist
 }
+// 禁止输入框输入空格,换行符,<,>
+Vue.prototype.$filterEmpty = function (e) {
+  return e.target.value.replace(/\s|\r\n|\n|<|>/g, '')
+}
 new Vue({
   router,
   store,