1.1.25 • Published 4 years ago
dcapp-business-components v1.1.25
开发者中心公共业务组件
一、统一权限中心 unified-authority
1.业务组件引用方法
import UnifiedAuthority from 'dcapp-business-components';
import 'dcapp-business-components/dist/index.css'<!--跟Modal组件方法一样-->
<UnifiedAuthority
show={authModal}
onClose={()=>setAuthModal(false)}
resourceType={'package'}
dataId={activeItem&&activeItem.id}
dataCode={activeItem&&activeItem.code}
/>2.API文档
Props
| 参数 | 说明 | 参数 | 说明 |
|---|---|---|---|
| show | 是否打开模态框 | boolean | -- |
| onClose | 关闭模块框的事件 | function | -- |
| resourceType | 接入模块类型 | string | -- |
| dataId | 权限控制最小单位ID(产品盘的ID,应用ID) | string | -- |
| dataCode | 权限控制最小单位Code(产品盘的Code,应用Code) | string | -- |
| title | 模态框的标题 | string | 默认值为-权限 |
| left_title | 左侧分组标题 | string | 默认值为-权限分组 |
| isAuth | 控制模态框授权按钮是否可用 | string | -- |
resourceType 业务模块类型
| 排序 | 模块Code | 模块名称 |
|---|---|---|
| 1 | package | YPR |
| 2 | -- | -- |
3.公共组件调试方法
切到
dcapp-business-components目录下面 执行link命令npm link再到业务模块下面执行
npm link dcapp-business-components就可以直接在业务模块引用了 PS:如果要更新组件,可以在
dcapp-business-components重新npm run build