From 77b4ece1f95bb2b06a27cc258c060ff5d9c2a68a Mon Sep 17 00:00:00 2001 From: Eratosici Date: Tue, 28 Dec 2021 17:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=95=86=E5=93=81=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall4v/src/components/prods-select/index.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mall4v/src/components/prods-select/index.vue b/mall4v/src/components/prods-select/index.vue index c99fad0..644c914 100644 --- a/mall4v/src/components/prods-select/index.vue +++ b/mall4v/src/components/prods-select/index.vue @@ -51,8 +51,7 @@ layout="total, sizes, prev, pager, next, jumper"> - 取消 + 取消 确定 @@ -164,6 +163,15 @@ export default { }, // 确定事件 submitProds () { + if (!this.dataListSelections.length) { + this.$message({ + message: '请选择商品', + type: 'error', + duration: 1000, + onClose: () => {} + }) + return + } let prods = [] this.dataListSelections.forEach(item => { let prodIndex = prods.findIndex((prod) => prod.prodId === item.prodId)