tachybase_todo/docs/zh-CN/development/guide/settings-center.md
chenos 85d8c3ecaf
feat: update development doc (#866)
* feat: update development doc

* fix: cleanup

* fix: remove
2022-09-30 12:41:23 +08:00

758 B

Settings Center

示例

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