directives: {
num: {
update: function (el) {
let oinput = el.children[0].lastElementChild
console.dir(oinput)
if (oinput) {
oinput.value = oinput.value.replace(/[^0-9|.]|\s/g, '')
oinput.dispatchEvent(new Event('input'))
oinput.onblur = function () {
let reg = /(^[1-9]+\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/
if (!reg.test(oinput.value)) {
oinput.value = ''
oinput.dispatchEvent(new Event('input'))
}
}
}
}
}
}