Commit 8146c7dd authored by 田翔's avatar 田翔

fix: 描述控件修复

parent 58c37e5e
{
"name": "panda-xform",
"version": "6.0.0",
"description": "6.0.0 图片显示问题",
"version": "6.0.1",
"description": "6.0.1 描述控件修复",
"keywords": [
"panda-xform"
],
......
......@@ -30,7 +30,6 @@ import html2canvas from 'html2canvas';
import jsPDF from 'jspdf';
import { saveAs } from 'file-saver';
import FormRender from '../FormRender';
import { set } from 'lodash';
const initConfig = {
accountFieids: [],
......@@ -381,7 +380,9 @@ const Account = (props, ref) => {
} else {
getConfig({ accountName });
}
getTree();
if (superAccount) {
getTree()
}
}, []);
const items = (
......
......@@ -43,7 +43,7 @@ const layoutWidgets = [
name: '描述控件',
icon: <IconPack.SearchLocation />,
schema: {
title: '描述控件',
title: '',
type: 'html',
widget: 'TextHTML',
placeholder: '',
......
......@@ -51,7 +51,8 @@ const FormDesigner = (props, ref) => {
let ungroupedChild = {}
if (isObject(properties)) {
for (let v in properties) {
if (properties[v].type === 'object') {
//分组或者描述控件
if (properties[v].type === 'object' || properties[v].type === 'html') {
parent[v] = properties[v]
if (v !== '(未分组)') {
paths.push(v)
......@@ -260,7 +261,10 @@ const FormDesigner = (props, ref) => {
if (isObject(child)) {
let childObj = {}
for (let s in child) {
if (child[s].type !== 'object') {
if (child[s].type === 'html') {
outError = true
}
if (child[s].type !== 'object' && child[s].type !== 'html') {
array.push({ ...child[s], fieldName: s })
childObj[s] = child[s]
} else {
......@@ -276,6 +280,8 @@ const FormDesigner = (props, ref) => {
}
parentObj[v].properties = childObj
}
} else if (parent[v].type === 'html') {
parentObj[v] = parent[v]
} else {
outError = true
let nanoid = getNanoid()
......
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