fix: external link click (#3908)

This commit is contained in:
jack zhang 2024-04-03 15:56:13 +08:00 committed by GitHub
parent 986dc85392
commit 0fc1d96a48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -558,13 +558,20 @@ Menu.URL = observer(
key: schema.name,
eventKey: schema.name,
schema,
onClick: () => {
window.open(props.href, '_blank');
},
onClick: () => {},
label: (
<SchemaContext.Provider value={schema}>
<FieldContext.Provider value={field}>
<SortableItem className={designerCss} removeParentsIfNoChildren={false} aria-label={t(field.title)}>
<SortableItem
className={designerCss}
onClick={(event) => {
window.open(props.href, '_blank');
event.preventDefault();
event.stopPropagation();
}}
removeParentsIfNoChildren={false}
aria-label={t(field.title)}
>
<Icon type={icon} />
<span
style={{