mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:13:59 +08:00
refactor(web): mark Props of datasets/hit-testing components as read-only (#37118)
Co-authored-by: archievi <13202986+archievi@users.noreply.github.com>
This commit is contained in:
parent
6b12152ce8
commit
1c0080be6f
@ -6,8 +6,8 @@ import { SliceContent } from '../../formatted-text/flavours/shared'
|
||||
import Score from './score'
|
||||
|
||||
type Props = {
|
||||
payload: HitTestingChildChunk
|
||||
isShowAll: boolean
|
||||
readonly payload: HitTestingChildChunk
|
||||
readonly isShowAll: boolean
|
||||
}
|
||||
|
||||
const ChildChunks: FC<Props> = ({
|
||||
|
||||
@ -12,8 +12,8 @@ import ResultItemMeta from './result-item-meta'
|
||||
|
||||
const i18nPrefix = ''
|
||||
type Props = {
|
||||
payload: ExternalKnowledgeBaseHitTesting
|
||||
positionId: number
|
||||
readonly payload: ExternalKnowledgeBaseHitTesting
|
||||
readonly positionId: number
|
||||
}
|
||||
|
||||
const ResultItemExternal: FC<Props> = ({ payload, positionId }) => {
|
||||
|
||||
@ -7,9 +7,9 @@ import { useTranslation } from 'react-i18next'
|
||||
import FileIcon from '@/app/components/base/file-uploader/file-type-icon'
|
||||
|
||||
type Props = {
|
||||
docType: FileAppearanceTypeEnum
|
||||
docTitle: string
|
||||
showDetailModal: () => void
|
||||
readonly docType: FileAppearanceTypeEnum
|
||||
readonly docTitle: string
|
||||
readonly showDetailModal: () => void
|
||||
}
|
||||
const i18nPrefix = ''
|
||||
|
||||
|
||||
@ -8,11 +8,11 @@ import { SegmentIndexTag } from '../../documents/detail/completed/common/segment
|
||||
import Score from './score'
|
||||
|
||||
type Props = {
|
||||
labelPrefix: string
|
||||
positionId: number
|
||||
wordCount: number
|
||||
score: number
|
||||
className?: string
|
||||
readonly labelPrefix: string
|
||||
readonly positionId: number
|
||||
readonly wordCount: number
|
||||
readonly score: number
|
||||
readonly className?: string
|
||||
}
|
||||
|
||||
const ResultItemMeta: FC<Props> = ({
|
||||
|
||||
@ -4,8 +4,8 @@ import { cn } from '@langgenius/dify-ui/cn'
|
||||
import * as React from 'react'
|
||||
|
||||
type Props = {
|
||||
value: number | null
|
||||
besideChunkName?: boolean
|
||||
readonly value: number | null
|
||||
readonly besideChunkName?: boolean
|
||||
}
|
||||
|
||||
const Score: FC<Props> = ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user