From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx b/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
index 2649cfb..6bbdeae 100644
--- a/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
+++ b/app/components/workflow/panel/chat-variable-panel/components/object-value-item.tsx
@@ -38,7 +38,7 @@
const handleKeyChange = useCallback((index: number) => {
return (e: React.ChangeEvent<HTMLInputElement>) => {
const newList = produce(list, (draft: any[]) => {
- if (!/^\w+$/.test(e.target.value))
+ if (!/^[a-zA-Z0-9_]+$/.test(e.target.value))
return notify({ type: 'error', message: 'key is can only contain letters, numbers and underscores' })
draft[index].key = e.target.value
})
@@ -95,7 +95,7 @@
{/* Key */}
<div className='w-[120px] border-r border-gray-200'>
<input
- className='system-xs-regular placeholder:system-xs-regular block h-7 w-full appearance-none px-2 text-text-secondary caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:bg-state-base-hover focus:bg-components-input-bg-active'
+ className='block px-2 w-full h-7 text-text-secondary system-xs-regular appearance-none outline-none caret-primary-600 hover:bg-state-base-hover focus:bg-components-input-bg-active placeholder:system-xs-regular placeholder:text-components-input-text-placeholder'
placeholder={t('workflow.chatVariable.modal.objectKey') || ''}
value={list[index].key}
onChange={handleKeyChange(index)}
@@ -114,7 +114,7 @@
{/* Value */}
<div className='relative w-[230px]'>
<input
- className='system-xs-regular placeholder:system-xs-regular block h-7 w-full appearance-none px-2 text-text-secondary caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:bg-state-base-hover focus:bg-components-input-bg-active'
+ className='block px-2 w-full h-7 text-text-secondary system-xs-regular appearance-none outline-none caret-primary-600 hover:bg-state-base-hover focus:bg-components-input-bg-active placeholder:system-xs-regular placeholder:text-components-input-text-placeholder'
placeholder={t('workflow.chatVariable.modal.objectValue') || ''}
value={list[index].value}
onChange={handleValueChange(index)}
@@ -124,7 +124,7 @@
/>
{list.length > 1 && !isFocus && (
<RemoveButton
- className='absolute right-1 top-0.5 z-10 hidden group-hover:block'
+ className='z-10 group-hover:block hidden absolute right-1 top-0.5'
onClick={handleItemRemove(index)}
/>
)}
--
Gitblit v1.8.0