解决计量单位页面校验错误的bug
This commit is contained in:
@@ -35,7 +35,7 @@ export function isURL (s) {
|
|||||||
* @param {*} s
|
* @param {*} s
|
||||||
*/
|
*/
|
||||||
export function isDecimalTwo (s) {
|
export function isDecimalTwo (s) {
|
||||||
let reg = /^(([^0][0-9]+|0)\.([0-9]{1,2})$)|^([^0][0-9]+|0)$/
|
let reg = /^[0-9]+(\.[0-9]{1,2})?$/
|
||||||
return reg.test(s)
|
return reg.test(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ export function isDecimalTwo (s) {
|
|||||||
* @param {*} s
|
* @param {*} s
|
||||||
*/
|
*/
|
||||||
export function isDecimalThree (s) {
|
export function isDecimalThree (s) {
|
||||||
let reg = /^(([^0][0-9]+|0)\.([0-9]{1,3})$)|^([^0][0-9]+|0)$/
|
let reg = /^[0-9]+(\.[0-9]{1,3})?$/
|
||||||
return reg.test(s)
|
return reg.test(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭"
|
cancelText="关闭"
|
||||||
style="top:100px; height:50%;">
|
style="top:100px; height:55%;">
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
|
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
|
||||||
关闭
|
关闭
|
||||||
|
|||||||
Reference in New Issue
Block a user