zhouna 3 years ago
parent
commit
10c920273a
1 changed files with 2 additions and 2 deletions
  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) => {
             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) => {
             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;
             }
             }
         },
         },
         {
         {