mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
feat: knowledge base node
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo } from 'react'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
export type BoxProps = {
|
||||
@ -6,7 +7,7 @@ export type BoxProps = {
|
||||
children?: ReactNode
|
||||
withBorderBottom?: boolean
|
||||
}
|
||||
export const Box = ({
|
||||
export const Box = memo(({
|
||||
className,
|
||||
children,
|
||||
withBorderBottom,
|
||||
@ -21,4 +22,4 @@ export const Box = ({
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo } from 'react'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
@ -8,7 +9,7 @@ export type FieldTitleProps = {
|
||||
subTitle?: string | ReactNode
|
||||
tooltip?: string
|
||||
}
|
||||
export const FieldTitle = ({
|
||||
export const FieldTitle = memo(({
|
||||
title,
|
||||
operation,
|
||||
subTitle,
|
||||
@ -35,4 +36,4 @@ export const FieldTitle = ({
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo } from 'react'
|
||||
import type { FieldTitleProps } from '.'
|
||||
import { FieldTitle } from '.'
|
||||
|
||||
@ -6,7 +7,7 @@ export type FieldProps = {
|
||||
fieldTitleProps: FieldTitleProps
|
||||
children: ReactNode
|
||||
}
|
||||
export const Field = ({
|
||||
export const Field = memo(({
|
||||
fieldTitleProps,
|
||||
children,
|
||||
}: FieldProps) => {
|
||||
@ -16,4 +17,4 @@ export const Field = ({
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo } from 'react'
|
||||
import {
|
||||
Box,
|
||||
Group,
|
||||
@ -13,7 +14,7 @@ type GroupWithBoxProps = {
|
||||
boxProps?: Omit<BoxProps, 'children'>
|
||||
groupProps?: Omit<GroupProps, 'children'>
|
||||
}
|
||||
export const GroupWithBox = ({
|
||||
export const GroupWithBox = memo(({
|
||||
children,
|
||||
boxProps,
|
||||
groupProps,
|
||||
@ -25,4 +26,4 @@ export const GroupWithBox = ({
|
||||
</Group>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import { memo } from 'react'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
export type GroupProps = {
|
||||
@ -6,7 +7,7 @@ export type GroupProps = {
|
||||
children?: ReactNode
|
||||
withBorderBottom?: boolean
|
||||
}
|
||||
export const Group = ({
|
||||
export const Group = memo(({
|
||||
className,
|
||||
children,
|
||||
withBorderBottom,
|
||||
@ -21,4 +22,4 @@ export const Group = ({
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user