Commit d15ad32c authored by 秦文海's avatar 秦文海

fix: 获取组件dom

parent 494f51c8
Pipeline #38454 canceled with stages
import React, { useState, useContext } from 'react'; import React, { useState, useContext, forwardRef } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { ConfigProvider } from 'antd'; import { ConfigProvider } from 'antd';
import { Header } from './header'; import { Header } from './header';
...@@ -6,7 +6,7 @@ import { LeftList } from './leftList'; ...@@ -6,7 +6,7 @@ import { LeftList } from './leftList';
import _ from 'lodash'; import _ from 'lodash';
import './index.less'; import './index.less';
const TipTool = (props) => { const TipTool = forwardRef((props, ref) => {
const { style } = props; const { style } = props;
const { leftSetting, headerSetting, events } = props.dataList; const { leftSetting, headerSetting, events } = props.dataList;
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
...@@ -82,7 +82,7 @@ const TipTool = (props) => { ...@@ -82,7 +82,7 @@ const TipTool = (props) => {
} }
}; };
return ( return (
<div className={classNames(`${prefixCls}-Tipwripconter`)} style={computedStyle()}> <div className={classNames(`${prefixCls}-Tipwripconter`)} ref={ref} style={computedStyle()}>
<Header <Header
headerSetting={headerSetting} headerSetting={headerSetting}
events={events} events={events}
...@@ -99,7 +99,7 @@ const TipTool = (props) => { ...@@ -99,7 +99,7 @@ const TipTool = (props) => {
</div> </div>
</div> </div>
); );
}; });
//分类可见与不可见属性的数组 //分类可见与不可见属性的数组
export const getVisibleAttribues = function (attribuesArr, fields) { export const getVisibleAttribues = function (attribuesArr, fields) {
var attrs = []; var attrs = [];
......
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