Commit e0c250e2 authored by 田翔's avatar 田翔

fix: 关联表单显示隐藏逻辑调整,添加报错问题

parent fe205210
{
"name": "panda-xform",
"version": "2.5.0",
"description": "2.5.0: 显示属性修改",
"version": "2.5.1",
"description": "2.5.1: 关联表单显示隐藏逻辑调整,添加报错问题",
"keywords": [
"panda-xform"
],
......
import React from 'react'
import { commonSettings, switchSettings, elementSettings } from './otherSettings'
import {
GroupOutlined,
EditOutlined,
FormOutlined,
FieldBinaryOutlined,
HighlightOutlined,
FieldTimeOutlined,
LinkOutlined,
} from '@ant-design/icons'
import { GroupOutlined } from '@ant-design/icons'
import IconPack from '../../widgets/IconPack'
const groupStyle = {
......@@ -91,6 +83,7 @@ const textWidgets = [
required: true,
type: 'string',
widget: 'htmlInput',
dependencies: ['widget']
},
placeholder: {
title: '提示语',
......@@ -248,6 +241,7 @@ const textWidgets = [
required: true,
type: 'string',
widget: 'htmlInput',
dependencies: ['widget']
},
placeholder: {
title: '提示语',
......@@ -358,9 +352,9 @@ const textWidgets = [
},
title: {
title: '展示名称',
required: true,
type: 'string',
widget: 'htmlInput',
required: true,
dependencies: ['widget']
},
placeholder: {
title: '提示语',
......
......@@ -3,7 +3,7 @@ import { ConfigProvider } from 'antd'
import FormRender, { useForm } from 'form-render'
import widgets from './widgets'
import { isObject } from '../../../../../utils'
import getWatch from '../../../../FormRender/watch'
import { getWatch } from '../../../../FormRender/watch'
const BaseForm = (props, ref) => {
......
......@@ -72,6 +72,7 @@ const RelationForm = (props) => {
str = str.replace(v, `'${fieldValue}'`)
})
}
str = str.replace(/=/g, '==')
str = str.replace(/and/g, '&&')
str = str.replace(/or/, '||')
if (str && eval(str)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment