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