fix(map): ellipsis with tooltip

This commit is contained in:
chenos 2023-02-18 11:10:26 +08:00
parent 780f2d556e
commit 4ec19e9c0c

View File

@ -1,5 +1,5 @@
import { useField, useFieldSchema } from '@formily/react';
import { useCollection } from '@nocobase/client';
import { EllipsisWithTooltip, useCollection } from '@nocobase/client';
import React, { useEffect } from 'react';
import AMapComponent from './AMap';
@ -19,12 +19,10 @@ const ReadPretty = (props) => {
if (!readOnly)
return (
<div
style={{
whiteSpace: 'pre-wrap',
}}
>
<div>
<EllipsisWithTooltip ellipsis={true}>
{value?.map((item) => (Array.isArray(item) ? `(${item.join(',')})` : item)).join(',')}
</EllipsisWithTooltip>
</div>
);