Bladeren bron

fix(style): style

lind 3 jaren geleden
bovenliggende
commit
aa00f210b5

+ 3 - 8
src/pages/notice/Template/Detail/index.tsx

@@ -218,11 +218,9 @@ const Detail = observer(() => {
                 ?.match(pattern)
                 ?.filter((i: string) => i)
                 .map((item: string) => ({ id: item, type: 'string', format: '--' }));
-            if (idList && idList.length > 0) {
-              form1.setFieldState('variableDefinitions', (state1) => {
-                state1.visible = true;
-              });
-            }
+            form1.setFieldState('variableDefinitions', (state1) => {
+              state1.visible = !!idList && idList.length > 0;
+            });
             if (form1.modified) {
               form1.setValuesIn('variableDefinitions', idList);
             }
@@ -235,8 +233,6 @@ const Detail = observer(() => {
               (index) => `variableDefinitions.${parseInt(index)}.format`,
             );
             const format = field.query(formatPath).take() as any;
-
-            console.log(format, 'format', value);
             if (!format) return;
             switch (value) {
               case 'date':
@@ -251,7 +247,6 @@ const Detail = observer(() => {
                 format.setValue('string');
                 break;
               case 'string':
-                console.log('string');
                 format.setComponent(PreviewText.Input);
                 format.setValue('%s');
                 break;

+ 5 - 3
src/pages/rule-engine/Alarm/Configuration/Save/index.tsx

@@ -1,4 +1,4 @@
-import { message, Modal } from 'antd';
+import { message, Modal, Typography } from 'antd';
 import { useMemo } from 'react';
 import { createForm } from '@formily/core';
 import { createSchemaField } from '@formily/react';
@@ -26,9 +26,11 @@ const service = new Service('alarm/config');
 
 const createImageLabel = (image: string, text: string) => {
   return (
-    <div style={{ textAlign: 'center', marginTop: 10, fontSize: '25px' }}>
+    <div style={{ textAlign: 'center', marginTop: 10, fontSize: '15px', width: '90px' }}>
       <img alt="" height="40px" src={image} />
-      {text}
+      <Typography.Text style={{ maxWidth: '50px', marginBottom: 10 }} ellipsis={{ tooltip: text }}>
+        {text}
+      </Typography.Text>
     </div>
   );
 };

+ 4 - 3
src/pages/system/User/ResetPassword/index.tsx

@@ -56,6 +56,7 @@ const ResetPassword = (props: Props) => {
             message: '密码最多可输入128位',
           },
           {
+            min: 8,
             message: '密码不能少于6位',
           },
           {
@@ -82,8 +83,8 @@ const ResetPassword = (props: Props) => {
             message: '密码最多可输入128位',
           },
           {
-            min: 6,
-            message: '密码不能少于6位',
+            min: 8,
+            message: '密码不能少于8位',
           },
           {
             required: true,
@@ -119,9 +120,9 @@ const ResetPassword = (props: Props) => {
           const resp = await service.resetPassword(props.data.id, value.confirmPassword);
           if (resp.status === 200) {
             message.success('操作成功');
+            props.close();
           }
         }
-        props.close();
       }}
     >
       <Form form={form} layout="vertical">