Procházet zdrojové kódy

fix: workflow if-else node variable tag style (#16583)

zxhlyh před 1 měsícem
rodič
revize
17b4d4c7b2

+ 2 - 2
web/app/components/workflow/nodes/if-else/components/condition-list/condition-var-selector.tsx

@@ -32,8 +32,8 @@ const ConditionVarSelector = ({
         crossAxis: 0,
       }}
     >
-      <PortalToFollowElemTrigger onClick={() => onOpenChange(!open)}>
-        <div className="cursor-pointer">
+      <PortalToFollowElemTrigger asChild onClick={() => onOpenChange(!open)}>
+        <div className="w-full cursor-pointer">
           <VariableTag
             valueSelector={valueSelector}
             varType={varType}

+ 3 - 3
web/app/components/workflow/nodes/if-else/components/condition-value.tsx

@@ -78,11 +78,11 @@ const ConditionValue = ({
     <div className='flex h-6 items-center rounded-md bg-workflow-block-parma-bg px-1'>
       {!isEnvVar && !isChatVar && <Variable02 className={cn('mr-1 h-3.5 w-3.5 shrink-0 text-text-accent', isException && 'text-text-warning')} />}
       {isEnvVar && <Env className='mr-1 h-3.5 w-3.5 shrink-0 text-util-colors-violet-violet-600' />}
-      {isChatVar && <BubbleX className='h-3.5 w-3.5 text-util-colors-teal-teal-700' />}
+      {isChatVar && <BubbleX className='h-3.5 w-3.5 shrink-0 text-util-colors-teal-teal-700' />}
 
       <div
         className={cn(
-          'ml-0.5 shrink-0 truncate text-xs font-medium text-text-accent',
+          'ml-0.5 shrink-[2] truncate text-xs font-medium text-text-accent',
           !notHasValue && 'max-w-[70px]',
           isException && 'text-text-warning',
         )}
@@ -98,7 +98,7 @@ const ConditionValue = ({
       </div>
       {
         !notHasValue && (
-          <div className='truncate text-xs text-text-secondary' title={formatValue}>{isSelect ? selectName : formatValue}</div>
+          <div className='shrink-[3] truncate text-xs text-text-secondary' title={formatValue}>{isSelect ? selectName : formatValue}</div>
         )
       }
     </div>