tachybase_todo/docs/en-US/development/client/settings-center.md
chenos b8d0ad8fbc
feat: update docs (#996)
* feat: update docs

* feat: update docs

* fix: update docs

* Add files via upload

* Add files via upload

* Update the-first-app.md

* Update the-first-app.md

* Update v08-changelog.md

* feat: update docs

Co-authored-by: Zhou <zhou.working@gmail.com>
2022-10-31 22:41:24 +08:00

771 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