lhoa-component
v1.0.6
Published
A sample of react component
Downloads
54
Readme
linghemedia
// src/index.jsx
import { GlobalContext } from 'lhoa-component'
import 'lhoa-component/dist/main.css'
...
<GlobalContext.Provider value={{
REACT_APP_AVATAR_PREFIX: '', // 头像路径前缀
REACT_APP_DEFAULT_AVATAR: '', // 默认头像
REACT_APP_ORG_LOGO: '', // 组织结构logo
getOrgAdmin: () => {},
getOrgAdminChilds: () => {},
getReadOnlyOrgTreeBySearch: () => {},
}}>
<App />
</GlobalContext.Provider>
...
import { OrgNodeSelect } from 'lhoa-component'
...
<div className="modal">
<OrgNodeSelect
multiple
ref={orgSelectorRef}
confirm={nodes => {}}
cancel={() => {}}
/>
</div>
...