feat:threshold添加校验
This commit is contained in:
@@ -111,6 +111,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import chartDataFormat from "../../charts/chartDataFormat";
|
import chartDataFormat from "../../charts/chartDataFormat";
|
||||||
import promqlInput from "../../page/dashboard/explore/promqlInput";
|
import promqlInput from "../../page/dashboard/explore/promqlInput";
|
||||||
|
import { nzNumber} from "../js/validate";
|
||||||
export default {
|
export default {
|
||||||
name: "alertConfigBox",
|
name: "alertConfigBox",
|
||||||
props: {
|
props: {
|
||||||
@@ -152,6 +153,7 @@
|
|||||||
],
|
],
|
||||||
threshold:[
|
threshold:[
|
||||||
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
{required:true,message:this.$t('validate.required'),trigger:'blur'},
|
||||||
|
{validator:nzNumber,trigger: 'blur'}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
operators:[
|
operators:[
|
||||||
|
|||||||
@@ -306,6 +306,7 @@
|
|||||||
import {getUUID, resetZIndex} from "../../common/js/common";
|
import {getUUID, resetZIndex} from "../../common/js/common";
|
||||||
import alertChartParam from "./alertChartParam";
|
import alertChartParam from "./alertChartParam";
|
||||||
import promqlInput from "./explore/promqlInput";
|
import promqlInput from "./explore/promqlInput";
|
||||||
|
import {nzNumber} from "../../common/js/validate";
|
||||||
var rz = {
|
var rz = {
|
||||||
methods: {
|
methods: {
|
||||||
rz(e) {
|
rz(e) {
|
||||||
@@ -348,6 +349,9 @@
|
|||||||
],
|
],
|
||||||
url: [
|
url: [
|
||||||
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
||||||
|
],
|
||||||
|
'param.threshold':[
|
||||||
|
{validator:nzNumber,trigger: 'blur'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
chartTypeList: [
|
chartTypeList: [
|
||||||
|
|||||||
Reference in New Issue
Block a user