Commit fe205210 authored by 田翔's avatar 田翔

显示属性修改

parent 10215674
{
"name": "panda-xform",
"version": "2.4.9",
"description": "2.4.9: 增加字段名称详细信息显示,设置更换为上下结构",
"version": "2.5.0",
"description": "2.5.0: 显示属性修改",
"keywords": [
"panda-xform"
],
......
......@@ -2,7 +2,7 @@ const baseSettings = {}
const commonSettings = {
$id: {
title: '字段名称',
title: '数据源',
type: 'string',
widget: 'FieldNames',
required: true,
......@@ -11,7 +11,7 @@ const commonSettings = {
// width: '70%',
},
title: {
title: '标题',
title: '展示名称',
required: true,
type: 'string',
widget: 'htmlInput',
......
This diff is collapsed.
......@@ -19,7 +19,7 @@ const FormDesigner = (props, ref) => {
}
))
const { tableName } = props
const { tableName, extra } = props
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext)
const prefixCls = getPrefixCls('pandaXform')
......@@ -159,25 +159,30 @@ const FormDesigner = (props, ref) => {
}
}
const extraButtons = [
false,
false,
false,
false,
// {
// text: '清空',
// onClick: clear
// },
// {
// text: '预览',
// onClick: preview
// },
// {
// text: '提交',
// type: 'primary',
// onClick: submit
// }
]
const extraButtons = useMemo(() => {
if (extra) {
return [
false,
false,
true,
true,
{
text: '清空',
onClick: clear
},
{
text: '预览',
onClick: preview
},
{
text: '提交',
type: 'primary',
onClick: submit
}
]
}
return [false, false, false, false]
}, [extra])
const getFields = (schema) => {
let array = []
......@@ -198,7 +203,6 @@ const FormDesigner = (props, ref) => {
const onSchemaChange = (schema) => {
let fields = getFields(schema)
window.designer = fields
console.log(1)
}
const testSubmit = async () => {
......
......@@ -125,7 +125,7 @@ const getAutoWatch = (schema, form, startTime) => {
let paths = []
let { relationForm } = form?.getValues()
const configs = relationForm?.configs || []
const AutoCalculate = getWidgetInfo(schema, 'AutoCalculate')
const AutoCalculate = getWidgetInfo(schema, 'NumberInput')
if (Array.isArray(AutoCalculate)) {
AutoCalculate.forEach(item => {
const { fieldName, rules, calculateRule } = item
......
import React from 'react'
import React, { useMemo } from 'react'
import { Select } from 'antd'
import { widgetData, getStyles } from '../../../../../constant/constant'
const WidgetType = (props) => {
const { value, onChange } = props
// const options = useMemo(() => {
// }, [])
return (
<span
onClick={e => onChange('TextInput')}
style={{
borderRadius: '5px',
padding: '0 7px',
......@@ -17,6 +21,19 @@ const WidgetType = (props) => {
{widgetData[value]?.name}
</span>
)
// return (
// <Select
// showArrow
// tagRender={tagRender}
// defaultValue={['gold', 'cyan']}
// style={{
// width: '100%',
// }}
// options={options}
// >
// </Select>
// )
}
......
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