|
@@ -275,6 +275,34 @@ Vue.directive("input-limit", {
|
|
e.target.dispatchEvent(new Event("input"))
|
|
e.target.dispatchEvent(new Event("input"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (binding.value == 5) {
|
|
|
|
+ if (wins_0.test(e.target.value.toString().replace(/\d+\.(\d*)/, '$1'))) {
|
|
|
|
+ remainder = true
|
|
|
|
+ }
|
|
|
|
+ if ((e.target.value.split('.')).length - 1 > 1) {
|
|
|
|
+ points = true
|
|
|
|
+ }
|
|
|
|
+ if (e.target.value.toString().split(".")[1] != undefined) {
|
|
|
|
+ if (e.target.value.toString().split(".")[1].length > 5) {
|
|
|
|
+ lengths = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (e.target.value.toString().indexOf(".") != -1) {
|
|
|
|
+ no_int = false
|
|
|
|
+ } else {
|
|
|
|
+ no_int = true
|
|
|
|
+ }
|
|
|
|
+ if (wins_1.test(e.target.value) || lengths || points || remainder) {
|
|
|
|
+ if (!no_int) {
|
|
|
|
+ e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
|
|
|
|
+ '$#$', '.').substring(0, e.target.value.indexOf(
|
|
|
|
+ ".") + 6)
|
|
|
|
+ } else {
|
|
|
|
+ e.target.value = e.target.value.replace(wins_0, "")
|
|
|
|
+ }
|
|
|
|
+ e.target.dispatchEvent(new Event("input"))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}, 0)
|
|
}, 0)
|
|
})
|
|
})
|