解决计量单位页面校验错误的bug
This commit is contained in:
parent
e37b2e440d
commit
6153c49765
@ -35,7 +35,7 @@ export function isURL (s) {
|
||||
* @param {*} 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)
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ export function isDecimalTwo (s) {
|
||||
* @param {*} 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)
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭"
|
||||
style="top:100px; height:50%;">
|
||||
style="top:100px; height:55%;">
|
||||
<template slot="footer">
|
||||
<a-button key="back" v-if="isReadOnly" @click="handleCancel">
|
||||
关闭
|
||||
|
||||
Loading…
Reference in New Issue
Block a user