mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:46:13 +00:00
fix: enable link style
This commit is contained in:
parent
aa7fc12f99
commit
2eab58e1ba
@ -25,6 +25,7 @@ const toValue = (value, placeholder) => {
|
||||
export const ReadPrettyInternalViewer: React.FC = observer((props: any) => {
|
||||
const fieldSchema = useFieldSchema();
|
||||
const recordCtx = useRecord();
|
||||
const { enableLink } = fieldSchema['x-component-props'];
|
||||
const { getCollectionJoinField } = useCollectionManager();
|
||||
// value 做了转换,但 props.value 和原来 useField().value 的值不一致
|
||||
const field = useField();
|
||||
@ -50,7 +51,7 @@ export const ReadPrettyInternalViewer: React.FC = observer((props: any) => {
|
||||
<span>
|
||||
{snapshot || isTagsMode ? (
|
||||
text
|
||||
) : (
|
||||
) : enableLink!==false ? (
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@ -63,6 +64,8 @@ export const ReadPrettyInternalViewer: React.FC = observer((props: any) => {
|
||||
>
|
||||
{text}
|
||||
</a>
|
||||
) : (
|
||||
text
|
||||
)}
|
||||
</span>
|
||||
{index < arr.length - 1 ? <span style={{ marginRight: 4, color: '#aaa' }}>,</span> : null}
|
||||
|
@ -33,9 +33,8 @@ export const ReadPretty = observer((props: any) => {
|
||||
}
|
||||
return (
|
||||
<AssociationFieldProvider>
|
||||
{['Select', 'Picker'].includes(currentMode) && enableLink !== false && <ReadPrettyInternalViewer {...props} />}
|
||||
{['Select', 'Picker'].includes(currentMode) && <ReadPrettyInternalViewer {...props} />}
|
||||
{currentMode === 'Nester' && <InternalNester {...props} />}
|
||||
{['Select', 'Picker'].includes(currentMode) && enableLink === false && <AssociationSelectReadPretty {...props} />}
|
||||
{currentMode === 'SubTable' && <InternalSubTable {...props} />}
|
||||
{currentMode === 'FileManager' && <FileManageReadPretty {...props} />}
|
||||
</AssociationFieldProvider>
|
||||
|
Loading…
Reference in New Issue
Block a user