From 38e0e2b39714aa29aacf9636097e464c50fcc1c3 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 10:50:34 +0800 Subject: [PATCH] 面板的提示 报错 换成弹框 --- src/components/AddControl.vue | 31 ++++++++++++------------------- 1 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/components/AddControl.vue b/src/components/AddControl.vue index b913beb..478c5e6 100644 --- a/src/components/AddControl.vue +++ b/src/components/AddControl.vue @@ -54,17 +54,16 @@ export default { components: {}, props: { - id:{ - type: [Number,String], + Arr:{ + type: [Array], default: () => { - return ''; + return []; }, } }, data() { return { islook: false, - Arr:[] }; }, mounted() { @@ -73,24 +72,11 @@ watch: { islook(val) { if (val) { - this.getStartInfo() - } }, }, methods: { - getStartInfo(){ - if(this.id){ - startTask({id:this.id}).then(res=>{ - if(res.code==200){ - this.Arr=res.data.Params; - } - }) - }else{ - this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); - } - - }, + validatorNum(rule, value, callback) { if (value) { if (value == undefined || value == null) { @@ -118,7 +104,14 @@ } }) }else{ - this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + this.$confirm( "褰撳墠璁惧娌℃湁宸ュ簭!", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(() => {}) + .catch(() => {}); + } }, shutdown() { -- Gitblit v1.8.0