From f76051769c73df3b6f53611cbd13fbb170acb7d4 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Thu, 14 Aug 2025 22:26:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E6=A0=8F=E6=A8=A1=E5=BC=8F=E4=B8=8B=E5=8F=AF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E6=8C=89=E9=92=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/project/plugins.js b/project/plugins.js index ac7039e6..a849e196 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3597,7 +3597,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } /** 物品栏仅显示指定类型物品 */ - classfiy(subType) { + classify(subType) { + if (UI.type !== 'all') { + // 非物品栏类型的菜单不支持分类 + return; + } if (this.subType !== subType) { const oldConfig = this.cache[this.subType], newConfig = this.cache[subType]; @@ -3886,9 +3890,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const allBtn = new ClassifyBtn(20, 10, 44, 24, "全部", "all"), toolsBtn = new ClassifyBtn(80, 10, 44, 24, "消耗", "tools"), constantsBtn = new ClassifyBtn(140, 10, 44, 24, "永久", "constants"); - this._back.registerBtn('allBtn', allBtn, () => this.toolInv.classfiy('all')); - this._back.registerBtn('toolsBtn', toolsBtn, () => this.toolInv.classfiy('tools')); - this._back.registerBtn('constantsBtn', constantsBtn, () => this.toolInv.classfiy('constants')); + this._back.registerBtn('allBtn', allBtn, () => this.toolInv.classify('all')); + this._back.registerBtn('toolsBtn', toolsBtn, () => this.toolInv.classify('tools')); + this._back.registerBtn('constantsBtn', constantsBtn, () => this.toolInv.classify('constants')); } return this._back; },