Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Whale CommonCode GeneratorNew to Visual Studio Code? Get it now.
Whale CommonCode Generator

Whale CommonCode Generator

shy.yiyu

|
14 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

欢迎使用 Whale CommonCode Generator


功能介绍

  • 通过 Java 代码生成 ProTable Columns:gen table column;
  • 通过 Java 代码生成 SchemaForm Fields:gen schema field
  • 通过 TypeScript 代码生成 Interface:gen interface;

1、gen table column

  • 在 ts 或 tsx 中键入以下代码,并单击鼠标右键,选择 gen table column;
/**
* 单据号
*/
private String documentNo;
/**
* 业务单号
  */
private String bizDocumentNo;
/**
* 财鲸单据号
  */
private String sourceSeqNo;
/**
* 业务场景Code
  */
private String scenarioCode;
  • 最终效果
const tableColumns = useMemo<ProTableColumnProps[]>(() => {
  return [
    { title: "单据号", dataIndex: "documentNo", width: 160 },
    { title: "业务单号", dataIndex: "bizDocumentNo", width: 160 },
    { title: "财鲸单据号", dataIndex: "sourceSeqNo", width: 160 },
    { title: "业务场景Code", dataIndex: "scenarioCode", width: 160 },
  ];
}, []);

2、gen interface

  • 在 ts 或 tsx 中键入以下代码,并单击鼠标右键,选择 gen interface;
//代码 1
const person = {
	name: 'bob',
	age: 13,
};

// 代码 2, 此处应为标准 json 格式
{
	"name":"bob",
	"age": 13
}
  • 最终效果
export interface Person {
  name: string;
  age: number;
}

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft