Commit 63573866 authored by 田翔's avatar 田翔

fix: 样式问题

parent 37cf5205
{
"name": "panda-xform",
"version": "4.3.7",
"description": "4.3.7 滚动条",
"version": "4.3.8",
"description": "4.3.8 样式问题",
"keywords": [
"panda-xform"
],
......
import React, { useMemo, useState, forwardRef, useImperativeHandle } from 'react'
import React, { useMemo, useState, forwardRef, useImperativeHandle, useRef } from 'react'
import { Table, Tooltip, Button, Popconfirm, Input, Space, Tag, Popover, Checkbox } from 'antd'
import { TweenOneGroup } from 'rc-tween-one'
import styles from './index.less'
......@@ -34,12 +34,13 @@ const TablePack = (props, ref) => {
}))
const { parent, readOnly, config, fieldList, loading, dataSource, rowSelection, onRow, tableChange, btnsClick } = props
const { webShowFieldGroup, formJson } = config
const { accountFieids, webShowFieldGroup, formJson } = config
const [fieldResize, setFieldResize] = useState({})
const [filteredInfo, setFilteredInfo] = useState({})
const [sortedInfo, setSortedInfo] = useState({})
const [open, setOpen] = useState(false)
const [checks, setChecks] = useState([])
const searchInput = useRef(null)
const filtered = useMemo(() => {
let array = []
......@@ -55,6 +56,7 @@ const TablePack = (props, ref) => {
//台账列表、台账选择器表头
const getColumnProps = (json, v) => {
const { widget, sourceType, options } = json?.[v]
let searchProps = {
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => {
return (
......@@ -111,7 +113,6 @@ const TablePack = (props, ref) => {
/>
),
}
const { widget, sourceType, options } = json?.[v]
if (['CheckBox', 'ComboBox', 'RadioButton'].includes(widget)) {
if (sourceType === '手动输入') {
searchProps = {
......@@ -119,7 +120,6 @@ const TablePack = (props, ref) => {
}
}
}
return {
title: json[v]?.title || v,
dataIndex: v,
......@@ -292,7 +292,6 @@ const TablePack = (props, ref) => {
}
const showField = useMemo(() => {
const { webShowFieldGroup, formJson } = config
let showField = []
if (Array.isArray(fieldList) && fieldList.length > 0) {
showField = fieldList
......@@ -506,6 +505,7 @@ const TablePack = (props, ref) => {
rowSelection={rowSelection}
onRow={onRow}
pagination={parent === '关联表单' ? { total: dataSource.length, showTotal: (value) => `总计 ${value} 条` } : false}
// scroll={parent === '关联表单' ? null : { x: '100%', y: 'calc(100% - 40px)' }}
scroll={{ x: '100%', y: 'calc(100% - 40px)' }}
onChange={onChange}
components={{
......@@ -514,24 +514,6 @@ const TablePack = (props, ref) => {
}
}}
/>
{/* <Drag
title={'列配置'}
width={500}
bodyStyle={{ height: '400px', overflow: 'auto' }}
onOk={() => setVisible(false)}
onCancel={() => setVisible(false)}
visible={visible}
getContainer={false}
>
{
checks.map(v => {
return (
)
})
}
</Drag> */}
</div>
)
......
......@@ -36,7 +36,7 @@ const Account = (props) => {
const [params, setParams] = useState(initParams)
const [loading, setLoading] = useState(false)
const [dataSource, setDataSource] = useState([])
const [config, setConfig] = useState({ webShowFieldGroup: '', addFieldGroup: '', formJson: {} })
const [config, setConfig] = useState({ accountFieids: [], webShowFieldGroup: '', addFieldGroup: '', formJson: {} })
const [schemaValues, setSchemaValues] = useState({ formJson: {}, values: [] })
const [submitLoading, setSubmitLoading] = useState(false)
const [operation, setOperation] = useState({ id: null, state: '添加' })
......
......@@ -44,7 +44,7 @@ const RelationForm = (props) => {
const codes = window?.pandaXform?.codes || {}
const { value, onChange, schema, addons } = props
const { disabled, '台账名称': accountName, '默认显示': defaultShow, '控制规则': controlShow, titleShow, '映射字段': mappedField } = schema
const [config, setConfig] = useState({ webShowFieldGroup: '', fieldGroup: '' })
const [config, setConfig] = useState({ accountFieids: [], webShowFieldGroup: '', fieldGroup: '' })
const [dataSource, setDataSource] = useState([])
const [visible, setVisible] = useState(false)
const [formState, setFormState] = useState('详情')
......
......@@ -18,7 +18,7 @@ const AccountSelector = (props) => {
const [params, setParams] = useState(initParams)
const [loading, setLoading] = useState(false)
const [dataSource, setDataSource] = useState([])
const [config, setConfig] = useState({ webShowFieldGroup: '', addFieldGroup: '', formJson: {} })
const [config, setConfig] = useState({ accountFieids: [], webShowFieldGroup: '', addFieldGroup: '', formJson: {} })
const [visible, setVisible] = useState(false)
const [keys, setKeys] = useState([])
const tablePackRef = useRef(null)
......
......@@ -5,6 +5,7 @@ import { PlusOutlined } from '@ant-design/icons'
import { LoadTableFields, ReloadTableFields } from '../../../../../apis/process'
import styles from './index.less'
import { widgetData, getStyles } from '../../../../../constant'
import { getNanoid } from '../../../../../utils/index'
const FieldNames = (props) => {
......@@ -93,7 +94,17 @@ const FieldNames = (props) => {
if (value && value.includes('#/')) {
let array = value.split('/')
if (array.length === 3) {
if (array[2].includes('_')) {
let copy = array[2].split('_')
if (copy.length > 3 && copy[1].length === 6) {
let nanoid = getNanoid(6, `${copy[0]}_`)
onChange(nanoid)
} else {
onChange(array[2])
}
} else {
onChange(array[2])
}
} else if (array.length === 2) {
onChange(array[1])
}
......
......@@ -180,12 +180,6 @@ body #app {
padding: 10px 10px;
}
&-group {
// .@{pandaXform-prefix-cls}-title {
// display: flex;
// align-items: center;
// justify-content: center;
// font-size: 16px;
// }
i {
width: 3px;
height: 16px;
......@@ -215,6 +209,7 @@ body #app {
}
}
/** @Tips: 在原有框架下,表单渲染后,使用的是flex自动布局,与calc来计算组件宽度,未设置固定宽度,导致页面布局错乱 */
.fr-content,
.fr-content .fr-item-wrapper>div {
width: 100%;
}
......
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