34 lines
733 B
TypeScript
34 lines
733 B
TypeScript
import React from 'react';
|
|
import { Tree } from '@zhst/biz';
|
|
import { Tooltip } from 'antd';
|
|
import { treeData } from './mock'
|
|
|
|
const demo = () => {
|
|
return (
|
|
<div style={{ width: '320px' }}>
|
|
<Tree
|
|
data={treeData}
|
|
titleRender={(_nodeData) => {
|
|
const { title } = _nodeData as any
|
|
return (
|
|
<div>
|
|
{title}
|
|
<div style={{ float: 'right' }} >
|
|
<Tooltip
|
|
placement="right"
|
|
title={'存在0个'}
|
|
>
|
|
<a>在0个组中包含</a>
|
|
</Tooltip>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default demo;
|