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

fix: 描述控件支持分组内

parent 3ebbdc7f
{
"name": "panda-xform",
"version": "6.10.21",
"description": "6.10.21 台账选择器支持自动回填",
"version": "6.10.22",
"description": "6.10.22 描述控件支持分组内",
"keywords": [
"panda-xform"
],
......
......@@ -1982,7 +1982,7 @@ const baseWidgets = [
displayType: 'row',
labelWidth: 110,
widget: 'BooleanSwitch',
description: '开启后会将台账中的值自动映射在表单中(移动端)',
description: '开启后会将台账中的值自动映射在表单中',
},
isMultiple: {
title: '多选',
......
......@@ -286,10 +286,10 @@ const FormDesigner = (props, ref) => {
if (isObject(child)) {
let childObj = {}
for (let s in child) {
if (child[s].type === 'html') {
outError = true
}
if (child[s].type !== 'object' && child[s].type !== 'html') {
// if (child[s].type === 'html') {
// outError = true
// }
if (child[s].type !== 'object') {
array.push({ ...child[s], fieldName: s })
childObj[s] = child[s]
} else {
......
......@@ -130,7 +130,10 @@ const XRender = (props, ref) => {
value = Number(value).toFixed(Number(decimalDigits))
}
}
formValue.push({ fieldName: key, fieldValue: value })
//兼容描述控件有值问题
if (!key?.includes('描述说明_')) {
formValue.push({ fieldName: key, fieldValue: value })
}
})
}
})
......
......@@ -7,23 +7,49 @@ const StyleHTML = (props) => {
const { value, onChange } = props
const colorChange = (e) => {
const backColorChange = (e) => {
onChange({ ...value, background: e.hex })
}
const colorChange = (e) => {
onChange({ ...value, color: e.hex })
}
return (
<div style={{ paddingLeft: '10px' }}>
<Form
name="dynamic_rule"
layout={'vertical'}
>
<Form.Item label="字体颜色">
<Popconfirm
overlayClassName={styles.Popconfirmtitle}
placement="topLeft"
icon={false}
title={
<SketchPicker width="217px" color={value?.color} onChange={e => colorChange(e)} />
}
>
<div className={styles.borderColor}>
<div
style={{
background: value?.color,
width: '18px',
height: '10px',
marginLeft: '1px',
marginTop: '4px',
}}
/>
</div>
</Popconfirm>
</Form.Item>
<Form.Item label="背景色">
<Popconfirm
overlayClassName={styles.Popconfirmtitle}
placement="topLeft"
icon={false}
title={
<SketchPicker width="217px" color={value?.background} onChange={e => colorChange(e)} />
<SketchPicker width="217px" color={value?.background} onChange={e => backColorChange(e)} />
}
>
<div className={styles.borderColor}>
......@@ -39,9 +65,11 @@ const StyleHTML = (props) => {
</div>
</Popconfirm>
</Form.Item>
<Form.Item label="内边距(px)">
<Form.Item label="内边距(%)">
<Slider
defaultValue={0}
min={0}
max={100}
value={value?.padding}
onChange={padding => onChange({ ...value, padding: padding })}
/>
......
......@@ -7,7 +7,7 @@ const TextHTML = (props) => {
if (isText) {
return (
<div>{contentText}</div>
<div style={{ color: styleHTML?.color, padding: styleHTML?.padding ? `0 ${styleHTML.padding}%` : '' }}>{contentText}</div>
)
}
......
......@@ -242,7 +242,7 @@ body #app {
}
.@{ant-prefix}-checkbox-wrapper {
margin-top: 10px;
// margin-top: 10px;
margin-left: 5px;
}
......
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