Commit 017be2d9 authored by 田翔's avatar 田翔

fix: 支持传入config

parent 175721e5
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "4.4.5", "version": "4.4.6",
"description": "4.4.5 台账选择器问题修复", "description": "4.4.6 支持传入表格配置",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -37,7 +37,7 @@ const Account = (props, ref) => { ...@@ -37,7 +37,7 @@ const Account = (props, ref) => {
} }
)) ))
const { accountName, readOnly } = props const { accountName, parentConfig, readOnly } = props
const userID = window?.globalConfig?.userInfo?.OID || 1 const userID = window?.globalConfig?.userInfo?.OID || 1
const initParams = { const initParams = {
user: userID, user: userID,
...@@ -65,7 +65,7 @@ const Account = (props, ref) => { ...@@ -65,7 +65,7 @@ const Account = (props, ref) => {
const batchEditRef = useRef() const batchEditRef = useRef()
const getTableColumns = () => { const getTableColumns = () => {
return tablePackRef.current.fileColumns return tablePackRef?.current?.fileColumns || []
} }
const btnsClick = async ({ type, row }) => { const btnsClick = async ({ type, row }) => {
...@@ -312,7 +312,12 @@ const Account = (props, ref) => { ...@@ -312,7 +312,12 @@ const Account = (props, ref) => {
} }
useEffect(() => { useEffect(() => {
if (parentConfig) {
setConfig(parentConfig)
getDataSource({ siteFilter: Boolean(parentConfig.enableSiteFilter) })
} else {
getConfig() getConfig()
}
}, []) }, [])
return ( return (
......
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