Browse Source

feat:当entity没有comment的时候用propertyName做为列名而不是报错

kidv 1 year ago
parent
commit
37adbf5eb3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/helper/hooks/code.ts

+ 1 - 1
src/modules/helper/hooks/code.ts

@@ -158,7 +158,7 @@ export function useCode() {
 		}
 
 		// 格式化标题
-		label = label.split(" ")[0];
+		label = label?.split?.(" ")?.[0] || column.propertyName;
 
 		return {
 			column: {