Closed chsword closed 1 year ago
ts 类型文件的注释 需要好好盘点下了 事件如何解?
@tangjinzhou 我个人觉得事件不适合以 property 的形式存在 ,可以考虑以接口方式定义事件
class Button extends AntdComponent implements OnClick{}
interface BaseAntdEvent{
}
interface OnClick extends BaseAntdEvent{
}
使用接口来定义标准行为,这样可以通过实现的接口来生成相应文档
增加了两个配置文件
./build/specialExcludeMap.ts 用于配置忽略生成的文件
./build/specialAttributesMap.ts 用于配置文件名/类名特殊的情况生成的标签
当前配置了如下规则,这个希望日后在对应类上增加 Decorator 或注释
const specialAttributesMap: Record<string, string> = {
"a-datepicker-common": "a-date-picker",
"mentions/a-option": "a-mentions-option",
"meta/a-meta": "a-list-item-meta",
"select/a-option": "a-select-option",
"select/a-option-group": "a-select-opt-group",
"table/a-column": "a-table-column",
"table/a-column-group": "a-table-column-group",
"a-tooltip-common": "a-tooltip",
};
另外解决了 layout 的类生成tags错误的Bug
更新了新的 vscode 依赖包,包括,使用新的 vscode-test 编写单元测试
使用 Gulp 重写了 Compile 流程,以方便不同平台下复制 src/config 到 out 文件夹
增加了新的命令
npm run sync
, 将会自动分析安装至 npm 的 ant-design-vue 文件中和 types文件,自动生成 ui-tags.json , ui-attributes.js 以及 "src/config/attributes/*.json",描述和类型将自动读取 node_modules/ant-design-vue/types/*/.d.ts 的文件结构及注释。并使用这个信息生成 tags 相关内容及 attributes 的 ommit / defaultValue / types也就是日后更新流程如下
另外,当前提交中的内容是自动生成自 1.5.5