Browse Source

表单提交不能填写......

master
王梦远 2 weeks ago
parent
commit
3bac042c45
  1. 3
      src/components/formula/FormulaConfig.vue
  2. 3
      src/components/formula/RunFormulaConfig.vue
  3. 3
      src/components/formula/SettingFormulaConfig.vue

3
src/components/formula/FormulaConfig.vue

@ -195,6 +195,9 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
if (!value && value !== 0 && value !== '0') {
callback(new Error('此为必填项'))
}
else if (value !== '.' && value.split('.').length > 2) {
callback(new Error('输入数值项'))
}
else if (config.val_type === 'int' || config.val_type === 'float') {
const temp = Number(value)
if (temp < config.val_lower_limit || temp > config.val_upper_limit) {

3
src/components/formula/RunFormulaConfig.vue

@ -47,6 +47,9 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
if (!value && value !== 0 && value !== '0') {
callback(new Error('此为必填项'))
}
else if (value.split('.').length > 2) {
callback(new Error('输入数值项'))
}
else if (config.val_type === 'int' || config.val_type === 'float') {
const temp = Number(value)
if (temp < config.val_lower_limit || temp > config.val_upper_limit) {

3
src/components/formula/SettingFormulaConfig.vue

@ -67,6 +67,9 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form
if (!value && value !== 0 && value !== '0') {
callback(new Error('此为必填项'))
}
else if (value.split('.').length > 2) {
callback(new Error('输入数值项'))
}
else if (config.val_type === 'int' || config.val_type === 'float') {
const temp = Number(value)
if (temp < config.val_lower_limit || temp > config.val_upper_limit) {

Loading…
Cancel
Save