Commit c2d67f10 authored by 田翔's avatar 田翔

fix: 台账选择器增加SQL报错问题

parent 86eb56ab
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "2.4.3", "version": "2.4.4",
"description": "2.4.3: 数值默认值问题", "description": "2.4.4: 台账选择器增加SQL报错问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -146,6 +146,7 @@ const FormDesigner = (props, ref) => { ...@@ -146,6 +146,7 @@ const FormDesigner = (props, ref) => {
}, },
{ {
text: '提交', text: '提交',
type: 'primary',
onClick: async (value) => { onClick: async (value) => {
const errors = designerRef.current.getErrorFields() const errors = designerRef.current.getErrorFields()
if (errors.length) { if (errors.length) {
......
...@@ -84,7 +84,7 @@ const AccountSelector = (props) => { ...@@ -84,7 +84,7 @@ const AccountSelector = (props) => {
setLoading(true) setLoading(true)
let param = { let param = {
accountName: accountName, accountName: accountName,
condition: sql ? window.btoa(encodeURIComponent(condition)) : '', condition: sql ? window.btoa(encodeURIComponent(sql)) : '',
sortFields: '录入时间', sortFields: '录入时间',
queryWheres: queryWheres, queryWheres: queryWheres,
...params, ...params,
......
import React, { useState, useEffect, useMemo } from 'react' import React, { useState, useEffect, useMemo } from 'react'
import { Input } from 'antd' import { Input } from 'antd'
const TextArea = ({ value, onChange, schema }) => { const TextArea = (props) => {
const { value, onChange, schema, addons } = props
const { disabled, placeholder, presetValue, maxLength, rows } = schema const { disabled, placeholder, presetValue, maxLength, rows } = schema
useEffect(() => { useEffect(() => {
onChange(presetValue) if (addons) {
addons.setValueByPath(addons.dataPath, presetValue)
} else {
onChange(presetValue)
}
}, [presetValue]) }, [presetValue])
const handleChange = (e) => { const handleChange = (e) => {
onChange(e.target.value) onChange(e.target.value)
} }
......
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