@@ -1,6 +1,6 @@
{
"name": "stdf",
- "version": "1.0.4",
+ "version": "1.0.5",
"description": "Mobile web component library based on Svelte and Tailwind",
"author": "any-tdf",
"funding": "https://stdf.design?fund",
@@ -200,8 +200,11 @@
.replace(/\.{2,}/g, '.')
.replace(/^(\d*\.\d*)\./, '$1');
} else {
+ // 不允许小数点开头且只允许一个小数点
+ // Do not allow decimal points to start and only allow one decimal point
value = e.value
.replace(/[^\d.]+/g, '')
+ .replace(/^\./, '')
}