Commit 4a46e298 authored by 田翔's avatar 田翔

fix: 代码修复

parent f244e5af
{
"name": "panda-xform",
"version": "5.5.3",
"description": "5.5.3 增加参数传递",
"version": "5.5.4",
"description": "5.5.4 隐藏显示后默认值不显示",
"keywords": [
"panda-xform"
],
......
......@@ -161,7 +161,6 @@ const getGroupHidden = (form, schema, gorupName) => {
const formFieldHide = async (params) => {
if ((new Date().getTime() - params.startTime) < 2000) return
console.log(1, jsonToValues(params.form.getValues(), params.paths))
let param = {
tableName: params.tableName,
filedFormulas: params.filedFormulas,
......@@ -175,7 +174,8 @@ const formFieldHide = async (params) => {
if (params?.initField?.length === 0 || (params?.initField?.length !== 0 && params?.initField.includes(v.fieldName))) {
let path = getPath(params.schema, v.fieldName)
if (path) {
params?.form?.setSchemaByPath(path, { ...params?.form?.getSchemaByPath(path), hidden: v.isHide, presetValue: v.fieldValue })
const schema = params?.form?.getSchemaByPath(path)
params?.form?.setSchemaByPath(path, { ...schema, hidden: v.isHide, presetValue: v.fieldValue || schema.presetValue || '' })
let hidden = getGroupHidden(params?.form, params.schema, params.gorupName)
params?.form?.setSchemaByPath(params.gorupName, { ...params?.form?.getSchemaByPath(params.gorupName), hidden: hidden })
}
......
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