You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ABP Lepton主题左侧菜单故障:toLowerCase未定义问题求助

ABP框架Lepton主题运行报错问题

更新

使用Lepton主题时若遇到问题,相关讨论内容十分详实。

声明

此问题针对ABP框架,其开发者Volo鼓励开发者在Stackoverflow提交问题。

版本信息

  • ABP Framework版本:6.0.1 - Commercial Suite
  • Lepton版本:6.0.1

问题现象

通过Abp Suite创建项目并运行后,出现以下错误:
ERROR TypeError: Cannot read properties of undefined (reading 'toLowerCase')
报错文件位置:volo-abp.ng.theme.lepton.mjs:1266:42

对应报错行的代码如下:

const LEPTON_THEME_FEATURES = new InjectionToken('LEPTON_THEME_FEATURES', {
    providedIn: 'root',
    factory: () => {
        const configState = inject(ConfigStateService);
        const featureKey = 'LeptonManagement.Enable';
        const mapFn = features => ({
            
        // The prolem is here: Uncaught ReferenceError: features is not defined
            enable: features[featureKey].toLowerCase() !== 'false',
        });
        return featuresFactory(configState, [featureKey], mapFn);
    },
});

补充说明

Abp Suite为框架官方工具,上述代码属于官方包文件,我希望尽量不修改包文件来解决问题。

恳请告知解决方法?

错误截图


内容的提问来源于stack exchange,提问作者Idrees

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 20:31:05