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

fix: 支持传入config

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