From 161c9f8ec14ce2cef6b04722b937cea48824b90e Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Tue, 18 Jul 2023 12:00:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8C=97=E5=90=91=E8=BE=93=E5=87=BAbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Northbound/AliCloud/Detail/index.vue | 4 +++- src/views/Northbound/DuerOS/Detail/index.vue | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/Northbound/AliCloud/Detail/index.vue b/src/views/Northbound/AliCloud/Detail/index.vue index 4f2bddc0..0ebba8e4 100644 --- a/src/views/Northbound/AliCloud/Detail/index.vue +++ b/src/views/Northbound/AliCloud/Detail/index.vue @@ -617,7 +617,9 @@ const onPlatError = (val: any) => { const _validator = (_rule: any, value: string): Promise => new Promise((resolve, reject) => { const _item = productList.value.find((item) => item.id === value); - if (!_item) { + if(!modelRef.id || modelRef.id === ':id') { + return resolve(''); + } else if (!_item) { return reject('关联产品已被删除,请重新选择'); } return resolve(''); diff --git a/src/views/Northbound/DuerOS/Detail/index.vue b/src/views/Northbound/DuerOS/Detail/index.vue index 4434f521..c0706042 100644 --- a/src/views/Northbound/DuerOS/Detail/index.vue +++ b/src/views/Northbound/DuerOS/Detail/index.vue @@ -779,7 +779,9 @@ const onActiveProduct = () => { const _validator = (_rule: any, value: string): Promise => new Promise((resolve, reject) => { const _item = productList.value.find((item) => item.id === value); - if (!_item) { + if(!modelRef.id || modelRef.id === ':id') { + return resolve(''); + } else if (!_item) { productChange(value); return reject('关联产品已被删除,请重新选择'); } else { @@ -789,8 +791,8 @@ const _validator = (_rule: any, value: string): Promise => } else { _error.value = ''; } + return resolve(''); } - return resolve(''); }); const saveBtn = async () => {