Commit e0c250e2 authored by 田翔's avatar 田翔

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

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