myesn

myEsn2E9

hi
github

ABP: Global JavaScript/CSS

打开 Web 项目的 WebModule 文件,添加如下代码:
这些全局的 js/css 文件位于 Web 项目的 wwwroot 目录下

private void ConfigureBundles()
{
    Configure<AbpBundlingOptions>(options =>
    {
        options.StyleBundles.Configure(
            LeptonXLiteThemeBundles.Styles.Global,
            bundle =>
            {
                bundle.AddFiles("/global-styles.css");
            }
        );
        options.ScriptBundles.Configure(
            LeptonXLiteThemeBundles.Scripts.Global,
            bundle =>
            {
                bundle.AddFiles("/global.js");
            }
        );
    });
}

参考:
https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.