소스 검색

Merge pull request #121 from EasonQwQ/7.x

feat:当entity没有comment的时候用propertyName做为列名而不是报错
icssoa 9 달 전
부모
커밋
1b08434daa
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/modules/helper/hooks/code.ts

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

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