Commit 2bb0f57a authored by 田翔's avatar 田翔

fix: 关联表单优化

parent 9de6310e
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.1.5", "version": "5.1.6",
"description": "5.1.5 可编辑表格自动计算修复", "description": "5.1.6 关联表单优化",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -44,7 +44,6 @@ const TablePack = (props, ref) => { ...@@ -44,7 +44,6 @@ const TablePack = (props, ref) => {
//台账列表、台账选择器表头 //台账列表、台账选择器表头
const getColumnProps = (json, v) => { const getColumnProps = (json, v) => {
console.log('v', v)
const { fieldName, columnWidth, isSort, accurateSearch, alignment } = v const { fieldName, columnWidth, isSort, accurateSearch, alignment } = v
const { widget, sourceType, options } = json?.[fieldName] || {} const { widget, sourceType, options } = json?.[fieldName] || {}
let searchProps = {} let searchProps = {}
...@@ -148,7 +147,7 @@ const TablePack = (props, ref) => { ...@@ -148,7 +147,7 @@ const TablePack = (props, ref) => {
//关联表单表头 //关联表单表头
const getRelevanceColumnProps = ({ json, field, isEdit, autoArray }) => { const getRelevanceColumnProps = ({ json, field, isEdit, autoArray }) => {
const { fieldName, columnWidth, isSort, accurateSearch } = field const { fieldName, columnWidth, isSort, accurateSearch, alignment } = field
const { widget } = json?.[fieldName] || {} const { widget } = json?.[fieldName] || {}
let searchProps = {} let searchProps = {}
if (accurateSearch) { if (accurateSearch) {
...@@ -224,6 +223,7 @@ const TablePack = (props, ref) => { ...@@ -224,6 +223,7 @@ const TablePack = (props, ref) => {
sorter: Boolean(isSort) ? (a, b) => a[fieldName] - b[fieldName] : false, sorter: Boolean(isSort) ? (a, b) => a[fieldName] - b[fieldName] : false,
filteredValue: filteredInfo[fieldName] || null, filteredValue: filteredInfo[fieldName] || null,
...searchProps, ...searchProps,
align: alignment === '中' ? 'center' : (alignment === '右' ? 'right' : 'left'),
onHeaderCell: (column) => ({ onHeaderCell: (column) => ({
width: column.width, width: column.width,
onResize: (e, props) => { onResize: (e, props) => {
......
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