-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36235e5
commit 2568ee2
Showing
5 changed files
with
137 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 全局配置 | ||
* @Author: jiangxiaowei | ||
* @Date: 2021-12-17 11:22:05 | ||
* @Last Modified by: jiangxiaowei | ||
* @Last Modified time: 2021-12-17 17:29:35 | ||
*/ | ||
import { atom } from 'recoil' | ||
|
||
// form-generator支持的配置 | ||
export type HeaderConfig = { | ||
// 是否展示header区域 | ||
showHeader?: boolean | ||
// 是否展示logo组件 | ||
showLogo?: boolean | ||
// 是否展示 导入JSON 按钮 | ||
showUploadJSON?: boolean | ||
// 是否展示 JSON编辑 按钮 | ||
showEditJSON?: boolean | ||
// 是否展示 表单预览 按钮 | ||
showPreviewForm?: boolean | ||
// 是否展示 导出JSON 按钮 | ||
showExportJSON?: boolean | ||
// 导出json自定义文案 | ||
exportText?: string | ||
// 自定义exportjson函数 | ||
customExport?: (exportJsonFn: () => void) => void | ||
// 自定义左侧logo组件 | ||
renderLeftHeader?: () => JSX.Element | ||
} | ||
|
||
// 头部自定义配置 | ||
export const headerConfigAtom = atom<HeaderConfig>({ | ||
key: 'headerOptions', | ||
default: { | ||
showHeader: true, | ||
showLogo: true, | ||
showUploadJSON: true, | ||
showEditJSON: true, | ||
showPreviewForm: true, | ||
showExportJSON: true, | ||
exportText: '导出JSON', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters