You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/docs/zh-Hans/UI/Angular/Custom-Setting-Page.md

1.1 KiB

自定义设置页面

不同的模块提供它们的设置选项卡. 你可以通过3个步骤在项目中自定义设置页面.

  1. 创建一个组件
import { Select } from '@ngxs/store';
import { Component } from '@angular/core';

@Component({
  selector: 'app-your-custom-settings',
  template: `
    custom-settings works! 
  `,
})
export class YourCustomSettingsComponent {
  // Your component logic
}
  1. 添加 YourCustomSettingsComponentAppModule 中的 declarationsentryComponents 数组中.

  2. 打开 app.component.tsngOnInit 添加以下内容:

import { addSettingTab } from '@abp/ng.theme.shared';
// ...

ngOnInit() {
  addSettingTab({
    component: YourCustomSettingsComponent,
    name: 'Type here the setting tab title (you can type a localization key, e.g: AbpAccount::Login',
    order: 4,
    requiredPolicy: 'type here a policy key'
  });
}

导航到 /setting-management 路由你会看到以下变化:

Custom Settings Tab

下一步是什么?