公告板
版本库
filestore
活动
搜索
登录
谭勇
/
bositao_web
波斯涛前端代码
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
Initial commit: bositao web (jnpf-web-monorepo-framework-v6.1)
刘光辉
3 小时以前
cf11e63b659afcc9792ab3e395f1b45d844431a8
[~tanyong/bositao_web.git]
/
apps
/
jnpf-web-apps-main
/
src
/
components
/
FormGenerator
/
src
/
helper
/
fieldEvent.ts
1
2
3
4
5
6
7
8
9
10
export const defaultInputClickEventScript =
'({ data, rowIndex, formData, setFormData, setShowOrHide, setRequired, setDisabled, onlineUtils }) => {\n // 在此编写代码\n \n}';
export function getInputClickEventScript(events?: Record<string, unknown>) {
return typeof events?.click === 'string' ? events.click : defaultInputClickEventScript;
}
export function getVisibleFieldEvents(events: Record<string, unknown> | undefined, isInput: boolean) {
return Object.entries(events || {}).filter(([eventName]) => !isInput || eventName !== 'click');
}