Kaynağa Gözat

fix: bug修复

Wzyyy98 3 yıl önce
ebeveyn
işleme
6b66edf935

+ 5 - 1
src/pages/rule-engine/Scene/Save/components/Buttons/Dropdown.tsx

@@ -125,9 +125,13 @@ const DropdownButton = (props: DropdownButtonProps) => {
       <div
         className={classNames(styles['dropdown-button'], props.className, typeClassName)}
         onClick={() => {
-          if (props.options.length === 0) {
+          console.log(props.options);
+          if (props.options.length === 0 && props.type !== 'termType') {
             onlyMessage('请先配置设备触发规则', 'warning');
           }
+          if (props.options.length === 0 && props.type === 'termType') {
+            onlyMessage('请先配置属性值', 'warning');
+          }
         }}
       >
         {label || props.placeholder}