feat: telmplate transform support readonly

This commit is contained in:
Joel 2024-03-20 16:52:01 +08:00
parent c9168c19cd
commit 0aa984219f
1 changed files with 2 additions and 2 deletions

View File

@ -22,9 +22,9 @@ const Panel: FC<NodePanelProps<TemplateTransformNodeType>> = ({
data,
}) => {
const { t } = useTranslation()
const readOnly = false
const {
readOnly,
inputs,
handleVarListChange,
handleAddVariable,
@ -49,7 +49,7 @@ const Panel: FC<NodePanelProps<TemplateTransformNodeType>> = ({
<Field
title={t(`${i18nPrefix}.inputVars`)}
operations={
<AddButton onClick={handleAddVariable} />
!readOnly ? <AddButton onClick={handleAddVariable} /> : undefined
}
>
<VarList