tachybase_todo/docs/zh-CN/development/guide/settings-center.md
ChengLei Shao d805fafbfc
docs: relation repository & acl (#848)
* docs: relation-repository

* docs: has many repository

* docs: acl

* docs: acl

* docs: acl

* docs: acl

* docs: acl/AllowManager

* docs: acl/ACLAvailableAction

* docs: acl

* docs: clean up

* feat: doc menus

Co-authored-by: chenos <chenlinxh@gmail.com>
2022-10-06 10:29:53 +08:00

755 B

配置中心

示例

import { SettingsCenterProvider } from '@nocobase/client';
import React, { useContext } from 'react';

const HelloTab => () => <div>Hello Tab</div>;

export default React.memo((props) => {
  return (
    <SettingsCenterProvider
      settings={{
        'sample-hello': {
          title: 'Hello',
          icon: 'ApiOutlined',
          tabs: {
            tab1: {
              title: 'Hello Tab',
              component: HelloTab,
            },
          },
        },
      }}
    >{props.children}</SettingsCenterProvider>
  );
});

完整示例查看 samples/hello