From ef40aa27b79f92964d5451d4f07f5ded37cd70f1 Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:56:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(goods):=20=E6=B7=BB=E5=8A=A0=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=98=BE=E7=A4=BA=E4=B8=8E=E5=90=A6=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=20add=20visible=20check=20for=20stock=20button=20in=20admin=20?= =?UTF-8?q?mallImplement=20a=20conditional=20'visible'=20attribute=20for?= =?UTF-8?q?=20the=20'stock'=20button=20within=20the=20goods=20management?= =?UTF-8?q?=20section=20of=20the=20admin=20mall=20interface,=20ensuring=20?= =?UTF-8?q?the=20button=20only=20appears=20when=20the=20goods=20status=20i?= =?UTF-8?q?s=20set=20to=201=20(active).=20This=20change=20streamlines=20th?= =?UTF-8?q?e=20UI=20by=20hiding=20irrelevant=20options=20for=20inactive=20?= =?UTF-8?q?goods=20items.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/admin/js/mall/goods.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/static/admin/js/mall/goods.js b/public/static/admin/js/mall/goods.js index 30118ca..7ef9a30 100644 --- a/public/static/admin/js/mall/goods.js +++ b/public/static/admin/js/mall/goods.js @@ -59,6 +59,9 @@ define(["jquery", "easy-admin"], function ($, ea) { method: 'open', auth: 'stock', class: 'layui-btn layui-btn-xs layui-btn-normal', + visible: function (row) { + return row.status === 1; + }, }], 'delete'] }