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