zhouna 3 년 전
부모
커밋
10c920273a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/FieldRules/index.js

+ 2 - 2
src/components/FieldRules/index.js

@@ -224,7 +224,7 @@ function FieldRules() {
         },
         {
             title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue', width: 110, render: (text, record) => {
-                return record.standardvalue.length > 10 ? <span title={record.standardvalue}>{record.standardvalue.substring(0, 10) + '...'}</span> : record.standardvalue;
+                return (record.standardvalue||"").length > 10 ? <span title={record.standardvalue}>{record.standardvalue.substring(0, 10) + '...'}</span> : record.standardvalue;
             }
         },
         {
@@ -234,7 +234,7 @@ function FieldRules() {
         },
         {
             title: '说明', dataIndex: 'description', key: 'description', render: (text, record) => {
-                return record.description.length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
+                return (record.description||"").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
             }
         },
         {