feat(admin): add ignoreNode property to skip unnecessary node generation

- Add $ignoreNode property to Goods controller to specify methods to ignore
- Update Node service to check and skip ignored methods during node generation
- This change helps to filter out unnecessary nodes, improving system performance and readability
This commit is contained in:
wolfcode
2024-11-28 10:54:15 +08:00
parent e7f09d9c68
commit 08ea79033c
2 changed files with 12 additions and 0 deletions

View File

@@ -20,6 +20,12 @@ use think\response\Json;
class Goods extends AdminController
{
/**
* 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
* @var array[]
*/
protected array $ignoreNode = ['export'];
public function __construct(App $app)
{
parent::__construct($app);