fix(goods): 添加属性显示与否演示 add visible check for stock button in admin mallImplement a conditional 'visible' attribute for the 'stock' button within the goods

management section of the admin mall interface, ensuring the button only appears
when the goods status is set to 1 (active). This change streamlines the UI by
hiding irrelevant options for inactive goods items.
This commit is contained in:
wolfcode
2024-09-13 10:56:27 +08:00
parent e69fddd2f7
commit ef40aa27b7

View File

@@ -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']
}