瀏覽代碼

fix: 修改场景联动编辑中图标,以及表单校验效果

xieyonghong 3 年之前
父節點
當前提交
4951393a23

文件差異過大導致無法顯示
+ 57 - 1
public/icons/iconfont.js


+ 1 - 1
src/pages/rule-engine/Scene/Save/action/ListItem/FilterGroup.tsx

@@ -204,7 +204,7 @@ export default observer((props: TermsProps) => {
             </div>
           </Popconfirm>
         </div>
-        {!props.isLast && (
+        {props.isLast && (
           <div className="terms-group-add" onClick={props.onAddGroup}>
             <div className="terms-content">
               <PlusOutlined style={{ fontSize: 12, paddingRight: 4 }} />

+ 1 - 0
src/pages/rule-engine/Scene/Save/action/ListItem/Item.tsx

@@ -402,6 +402,7 @@ export default (props: ItemProps) => {
                   data={termsItem}
                   columns={optionsColumns}
                   isLast={index === thenTerms.length - 1}
+                  isFirst={index === 0}
                   paramsOptions={paramsOptions}
                   label={props.options?.terms?.[index]}
                   actionColumns={props.options?.otherColumns}

+ 1 - 0
src/pages/rule-engine/Scene/Save/action/ListItem/index.less

@@ -263,6 +263,7 @@
       }
 
       .ant-form-item {
+        margin-bottom: 8px;
         &:not(:first-child) {
           .ant-form-item-explain-error {
             padding-left: 80px !important;

+ 15 - 3
src/pages/rule-engine/Scene/Save/device/index.tsx

@@ -48,14 +48,21 @@ export default observer((props: Props) => {
 
     const _label = [
       <div style={{ display: 'flex', alignItems: 'center' }}>
-        {options.selectorIcon ? <AIcon type={options.selectorIcon} /> : null}
+        {options.selectorIcon ? (
+          <AIcon type={options.selectorIcon} style={{ paddingRight: 4 }} />
+        ) : null}
         <span className="trigger-options-name">{options.name}</span>
         {options.extraName ? <span>{options.extraName}</span> : null}
       </div>,
     ];
     if (!options.onlyName) {
       if (options.productName) {
-        _label.push(<span className="trigger-options-type">{options.productName}</span>);
+        _label.push(
+          <div style={{ display: 'flex', alignItems: 'center' }}>
+            <AIcon type={'icon-chanpin1'} style={{ paddingRight: 4 }} />
+            <span className="trigger-options-type">{options.productName}</span>
+          </div>,
+        );
       }
       if (options.when) {
         _label.push(<span className="trigger-options-when">{options.when}</span>);
@@ -70,7 +77,12 @@ export default observer((props: Props) => {
         _label.push(<span className="trigger-options-action">{options.action}</span>);
       }
       if (options.type) {
-        _label.push(<span className="trigger-options-type">{options.type}</span>);
+        _label.push(
+          <div style={{ display: 'flex', alignItems: 'center' }}>
+            <AIcon type={options.typeIcon} style={{ paddingRight: 4 }} />
+            <span className="trigger-options-type">{options.type}</span>
+          </div>,
+        );
       }
     }
     return _label;

+ 1 - 0
src/pages/rule-engine/Scene/Save/terms/index.less

@@ -135,6 +135,7 @@
     }
 
     .ant-form-item {
+      margin-bottom: 8px;
       &:not(:first-child) {
         .ant-form-item-explain-error {
           padding-left: 80px !important;