🐛(input-number): 修复手动输入拼接字符串的问题

This commit is contained in:
就眠儀式 2022-11-04 19:52:36 +08:00
parent 11c793c7b1
commit 6a3fa5116e
2 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,7 @@ const inputChange = function () {
};
const isNumber = function (num: any) {
return /^\d+(\.\d+)?$/.test(num);
return !isNaN(num)
};
</script>

View File

@ -13,6 +13,7 @@
::: demo 使用 `lay-input-number` 标签, 创建数字输入框
<template>
{{data1}}
<lay-input-number v-model="data1"></lay-input-number>
<lay-input-number v-model="data2" position="right"></lay-input-number>
</template>