From 8d7c3eed8bdac1e77c8de90a3227d801708c358e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 五月 2023 21:12:56 +0800 Subject: [PATCH] 2023-05-15 --- src/tabviews/custom/components/share/tabtransfer/index.jsx | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx index f7bbac1..79c6827 100644 --- a/src/tabviews/custom/components/share/tabtransfer/index.jsx +++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx @@ -174,13 +174,10 @@ }) } - getComponents = () => { - const { config } = this.props + getComponents = (components) => { const { mainSearch, data } = this.state - if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) - - return config.components.map(item => { + return components.map(item => { let style = null if (item.style && item.style.clear === 'left') { @@ -355,8 +352,12 @@ } render() { + const { config } = this.props + + if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) + return ( - <Row className="component-wrap" gutter={8}>{this.getComponents()}</Row> + <Row className="component-wrap" id={'anchor' + config.uuid} gutter={8}>{this.getComponents(config.components)}</Row> ) } } -- Gitblit v1.8.0