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;
             }
         },
         {